diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index af1e214791527..69e6bebd72202 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -315,7 +315,7 @@ com.azure.resourcemanager:azure-resourcemanager-changeanalysis;1.1.1;1.2.0-beta.
com.azure.resourcemanager:azure-resourcemanager-resourcegraph;1.1.0;1.2.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-delegatednetwork;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-synapse;1.0.0;1.1.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-resourcehealth;1.0.0;1.1.0-beta.4
+com.azure.resourcemanager:azure-resourcemanager-resourcehealth;1.0.0;1.1.0
com.azure.resourcemanager:azure-resourcemanager-databricks;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-databoxedge;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-frontdoor;1.1.0;1.2.0-beta.1
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
index 862d2c155e458..508257d0d0707 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md
@@ -1,14 +1,228 @@
# Release History
-## 1.1.0-beta.4 (Unreleased)
+## 1.1.0 (2026-10-27)
-### Features Added
+- Azure Resource Manager ResourceHealth client library for Java. This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package api-version 2026-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.AvailabilityStatusListResult` was removed
+
+#### `models.ServiceImpactingEventStatus` was modified
+
+* `ServiceImpactingEventStatus()` was changed to private access
+* `validate()` was removed
+* `withValue(java.lang.String)` was removed
+
+#### `models.RecommendedAction` was modified
+
+* `RecommendedAction()` was changed to private access
+* `validate()` was removed
+* `withActionUrlText(java.lang.String)` was removed
+* `withActionUrl(java.lang.String)` was removed
+* `withAction(java.lang.String)` was removed
+
+#### `models.AvailabilityStatusProperties` was modified
+
+* `AvailabilityStatusProperties()` was changed to private access
+* `withHealthEventCause(java.lang.String)` was removed
+* `withOccuredTime(java.time.OffsetDateTime)` was removed
+* `withRecommendedActions(java.util.List)` was removed
+* `withHealthEventType(java.lang.String)` was removed
+* `withServiceImpactingEvents(java.util.List)` was removed
+* `validate()` was removed
+* `withRootCauseAttributionTime(java.time.OffsetDateTime)` was removed
+* `withHealthEventId(java.lang.String)` was removed
+* `withTitle(java.lang.String)` was removed
+* `withReasonType(java.lang.String)` was removed
+* `withAvailabilityState(models.AvailabilityStateValues)` was removed
+* `withRecentlyResolved(models.AvailabilityStatusPropertiesRecentlyResolved)` was removed
+* `withResolutionEta(java.time.OffsetDateTime)` was removed
+* `withHealthEventCategory(java.lang.String)` was removed
+* `withSummary(java.lang.String)` was removed
+* `withDetailedStatus(java.lang.String)` was removed
+* `withReasonChronicity(models.ReasonChronicityTypes)` was removed
+* `withReportedTime(java.time.OffsetDateTime)` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `OperationDisplay()` was changed to private access
+* `withDescription(java.lang.String)` was removed
+* `withProvider(java.lang.String)` was removed
+* `withOperation(java.lang.String)` was removed
+* `validate()` was removed
+* `withResource(java.lang.String)` was removed
+
+#### `models.ServiceImpactingEvent` was modified
+
+* `ServiceImpactingEvent()` was changed to private access
+* `validate()` was removed
+* `withIncidentProperties(models.ServiceImpactingEventIncidentProperties)` was removed
+* `withCorrelationId(java.lang.String)` was removed
+* `withEventStartTime(java.time.OffsetDateTime)` was removed
+* `withEventStatusLastModifiedTime(java.time.OffsetDateTime)` was removed
+* `withStatus(models.ServiceImpactingEventStatus)` was removed
+
+#### `models.ServiceImpactingEventIncidentProperties` was modified
+
+* `ServiceImpactingEventIncidentProperties()` was changed to private access
+* `withIncidentType(java.lang.String)` was removed
+* `validate()` was removed
+* `withTitle(java.lang.String)` was removed
+* `withRegion(java.lang.String)` was removed
+* `withService(java.lang.String)` was removed
+
+#### `models.Operation` was modified
+
+* `Operation()` was changed to private access
+* `withDisplay(models.OperationDisplay)` was removed
+* `validate()` was removed
+* `withName(java.lang.String)` was removed
+
+#### `models.AvailabilityStatusPropertiesRecentlyResolved` was modified
+
+* `AvailabilityStatusPropertiesRecentlyResolved()` was changed to private access
+* `withResolvedTime(java.time.OffsetDateTime)` was removed
+* `withUnavailableSummary(java.lang.String)` was removed
+* `validate()` was removed
+* `withUnavailableOccuredTime(java.time.OffsetDateTime)` was removed
+
+### Features Added
+
+* `models.EventsOperations` was added
+
+* `models.EventLevelValues` was added
+
+* `models.IssueNameParameter` was added
+
+* `models.SecurityAdvisoryImpactedResources` was added
+
+* `models.KeyValueItem` was added
+
+* `models.Impact` was added
+
+* `models.ImpactedResources` was added
+
+* `models.EventTypeValues` was added
+
+* `models.MetadataEntity` was added
+
+* `models.StatusBanner` was added
+
+* `models.EventPropertiesRecommendedActionsItem` was added
+
+* `models.ApiOperationLink` was added
+
+* `models.ImpactedServiceRegion` was added
+
+* `models.EventStatusValues` was added
+
+* `models.EmergingIssueImpact` was added
+
+* `models.EventOperations` was added
+
+* `models.Event` was added
+
+* `models.ChildAvailabilityStatuses` was added
+
+* `models.EmergingIssues` was added
+
+* `models.EmergingIssuesGetResult` was added
+
+* `models.Metadatas` was added
+
+* `models.SeverityValues` was added
+
+* `models.StageValues` was added
+
+* `models.ChildResources` was added
+
+* `models.ImpactedRegion` was added
+
+* `models.EventSubTypeValues` was added
+
+* `models.EventPropertiesRecommendedActions` was added
+
+* `models.StatusActiveEvent` was added
+
+* `models.LinkTypeValues` was added
+
+* `models.EventImpactedResource` was added
+
+* `models.LevelValues` was added
+
+* `models.Faq` was added
+
+* `models.EventSourceValues` was added
+
+* `models.Link` was added
+
+* `models.Scenario` was added
+
+* `models.LinkDisplayText` was added
+
+* `models.Update` was added
+
+* `models.EventPropertiesArticle` was added
+
+* `models.EventPropertiesAdditionalInformation` was added
+
+* `models.MetadataSupportedValueDetail` was added
+
+#### `models.ServiceImpactingEventStatus` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.RecommendedAction` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `actionUrlComment()` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `ResourceHealthManager` was modified
+
+* `emergingIssues()` was added
+* `metadatas()` was added
+* `childResources()` was added
+* `impactedResources()` was added
+* `childAvailabilityStatuses()` was added
+* `eventsOperations()` was added
+* `eventOperations()` was added
+* `securityAdvisoryImpactedResources()` was added
+
+#### `models.AvailabilityStatusProperties` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+* `category()` was added
+* `context()` was added
+* `articleId()` was added
+
+#### `models.OperationDisplay` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ServiceImpactingEvent` was modified
+
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
+
+#### `models.ServiceImpactingEventIncidentProperties` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.Operation` was modified
+
+* `fromJson(com.azure.json.JsonReader)` was added
+* `toJson(com.azure.json.JsonWriter)` was added
+
+#### `models.AvailabilityStatusPropertiesRecentlyResolved` was modified
-### Other Changes
+* `toJson(com.azure.json.JsonWriter)` was added
+* `fromJson(com.azure.json.JsonReader)` was added
## 1.1.0-beta.3 (2024-12-06)
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/README.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/README.md
index bbef5482494d0..5115947e40a73 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-preview-2023-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package api-version 2026-07-01. 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.1.0-beta.4
+ 1.1.0
```
[//]: # ({x-version-update-end})
@@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
```java
-AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
@@ -60,7 +60,7 @@ ResourceHealthManager manager = ResourceHealthManager
.authenticate(credential, profile);
```
-The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
See [Authentication][authenticate] for more options.
@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
-
-
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
index 1432eb3f78a94..cce9526a3a1b9 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md
@@ -24,6 +24,7 @@
## EventOperation
+- [FetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingId](#eventoperation_fetchbilllingcommunicationdetailsbysubscriptionidandtrackingid)
- [FetchDetailsBySubscriptionIdAndTrackingId](#eventoperation_fetchdetailsbysubscriptionidandtrackingid)
- [FetchDetailsByTenantIdAndTrackingId](#eventoperation_fetchdetailsbytenantidandtrackingid)
- [GetBySubscriptionIdAndTrackingId](#eventoperation_getbysubscriptionidandtrackingid)
@@ -63,9 +64,7 @@
*/
public final class AvailabilityStatusesGetByResourceSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * AvailabilityStatus_GetByResource.json
+ * x-ms-original-file: 2026-07-01/AvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetCurrentHealthByResource.
@@ -88,9 +87,7 @@ public final class AvailabilityStatusesGetByResourceSamples {
*/
public final class AvailabilityStatusesListSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * AvailabilityStatuses_List.json
+ * x-ms-original-file: 2026-07-01/AvailabilityStatuses_List.json
*/
/**
* Sample code: GetHealthHistoryByResource.
@@ -112,9 +109,7 @@ public final class AvailabilityStatusesListSamples {
*/
public final class AvailabilityStatusesListByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * AvailabilityStatuses_ListByResourceGroup.json
+ * x-ms-original-file: 2026-07-01/AvailabilityStatuses_ListByResourceGroup.json
*/
/**
* Sample code: ListByResourceGroup.
@@ -136,9 +131,7 @@ public final class AvailabilityStatusesListByResourceGroupSamples {
*/
public final class AvailabilityStatusesListBySubscriptionIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * AvailabilityStatuses_ListBySubscriptionId.json
+ * x-ms-original-file: 2026-07-01/AvailabilityStatuses_ListBySubscriptionId.json
*/
/**
* Sample code: ListHealthBySubscriptionId.
@@ -161,9 +154,7 @@ public final class AvailabilityStatusesListBySubscriptionIdSamples {
*/
public final class ChildAvailabilityStatusesGetByResourceSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * ChildAvailabilityStatus_GetByResource.json
+ * x-ms-original-file: 2026-07-01/ChildAvailabilityStatus_GetByResource.json
*/
/**
* Sample code: GetChildCurrentHealthByResource.
@@ -188,9 +179,7 @@ public final class ChildAvailabilityStatusesGetByResourceSamples {
*/
public final class ChildAvailabilityStatusesListSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * ChildAvailabilityStatuses_List.json
+ * x-ms-original-file: 2026-07-01/ChildAvailabilityStatuses_List.json
*/
/**
* Sample code: GetChildHealthHistoryByResource.
@@ -215,9 +204,7 @@ public final class ChildAvailabilityStatusesListSamples {
*/
public final class ChildResourcesListSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * ChildResources_List.json
+ * x-ms-original-file: 2026-07-01/ChildResources_List.json
*/
/**
* Sample code: GetCurrentChildHealthByResource.
@@ -226,7 +213,10 @@ public final class ChildResourcesListSamples {
*/
public static void
getCurrentChildHealthByResource(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
- manager.childResources().list("resourceUri", null, null, com.azure.core.util.Context.NONE);
+ manager.childResources()
+ .list(
+ "subscriptions/227b734f-e14f-4de6-b7fc-3190c21e69f6/resourceGroups/JUHACKETRHCTEST/providers/Microsoft.Compute/virtualMachineScaleSets/rhctest",
+ null, null, com.azure.core.util.Context.NONE);
}
}
```
@@ -241,9 +231,7 @@ import com.azure.resourcemanager.resourcehealth.models.IssueNameParameter;
*/
public final class EmergingIssuesGetSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * EmergingIssues_Get.json
+ * x-ms-original-file: 2026-07-01/EmergingIssues_Get.json
*/
/**
* Sample code: GetEmergingIssues.
@@ -264,9 +252,7 @@ public final class EmergingIssuesGetSamples {
*/
public final class EmergingIssuesListSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * EmergingIssues_List.json
+ * x-ms-original-file: 2026-07-01/EmergingIssues_List.json
*/
/**
* Sample code: GetEmergingIssues.
@@ -279,6 +265,30 @@ public final class EmergingIssuesListSamples {
}
```
+### EventOperation_FetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingId
+
+```java
+/**
+ * Samples for EventOperation FetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingId.
+ */
+public final class EventOperationFetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingIdSamples {
+ /*
+ * x-ms-original-file: 2026-07-01/Event_fetchBillingCommunicationDetailsBySubscriptionIdAndTrackingId.json
+ */
+ /**
+ * Sample code: BillingEventDetailsBySubscriptionIdAndTrackingId.
+ *
+ * @param manager Entry point to ResourceHealthManager.
+ */
+ public static void billingEventDetailsBySubscriptionIdAndTrackingId(
+ com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
+ manager.eventOperations()
+ .fetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingIdWithResponse("eventTrackingId",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### EventOperation_FetchDetailsBySubscriptionIdAndTrackingId
```java
@@ -287,9 +297,7 @@ public final class EmergingIssuesListSamples {
*/
public final class EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Event_fetchDetailsBySubscriptionIdAndTrackingId.json
+ * x-ms-original-file: 2026-07-01/Event_fetchDetailsBySubscriptionIdAndTrackingId.json
*/
/**
* Sample code: EventDetailsBySubscriptionIdAndTrackingId.
@@ -312,9 +320,7 @@ public final class EventOperationFetchDetailsBySubscriptionIdAndTrackingIdSample
*/
public final class EventOperationFetchDetailsByTenantIdAndTrackingIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Event_fetchDetailsByTenantIdAndTrackingId.json
+ * x-ms-original-file: 2026-07-01/Event_fetchDetailsByTenantIdAndTrackingId.json
*/
/**
* Sample code: EventDetailsByTenantIdAndTrackingId.
@@ -337,20 +343,18 @@ public final class EventOperationFetchDetailsByTenantIdAndTrackingIdSamples {
*/
public final class EventOperationGetBySubscriptionIdAndTrackingIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Event_GetBySubscriptionIdAndTrackingId.json
+ * x-ms-original-file: 2026-07-01/Event_GetBySubscriptionIdAndTrackingId.json
*/
/**
- * Sample code: SecurityAdvisoriesEventBySubscriptionIdAndTrackingId.
+ * Sample code: GetRetirementEventBySubscriptionIdAndTrackingId.
*
* @param manager Entry point to ResourceHealthManager.
*/
- public static void securityAdvisoriesEventBySubscriptionIdAndTrackingId(
+ public static void getRetirementEventBySubscriptionIdAndTrackingId(
com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) {
manager.eventOperations()
.getBySubscriptionIdAndTrackingIdWithResponse("eventTrackingId", "properties/status eq 'Active'",
- "7/10/2022", com.azure.core.util.Context.NONE);
+ "5/12/2025", com.azure.core.util.Context.NONE);
}
}
```
@@ -363,9 +367,7 @@ public final class EventOperationGetBySubscriptionIdAndTrackingIdSamples {
*/
public final class EventOperationGetByTenantIdAndTrackingIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Event_GetByTenantIdAndTrackingId.json
+ * x-ms-original-file: 2026-07-01/Event_GetByTenantIdAndTrackingId.json
*/
/**
* Sample code: EventByTenantIdAndTrackingId.
@@ -389,9 +391,7 @@ public final class EventOperationGetByTenantIdAndTrackingIdSamples {
*/
public final class EventsOperationListSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Events_ListBySubscriptionId.json
+ * x-ms-original-file: 2026-07-01/Events_ListBySubscriptionId.json
*/
/**
* Sample code: ListEventsBySubscriptionId.
@@ -401,7 +401,7 @@ public final class EventsOperationListSamples {
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",
+ .list("service eq 'Virtual Machines' or region eq 'West US'", "5/12/2025",
com.azure.core.util.Context.NONE);
}
}
@@ -415,9 +415,7 @@ public final class EventsOperationListSamples {
*/
public final class EventsOperationListBySingleResourceSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Events_ListBySingleResource.json
+ * x-ms-original-file: 2026-07-01/Events_ListBySingleResource.json
*/
/**
* Sample code: ListEventsBySingleResource.
@@ -442,9 +440,7 @@ public final class EventsOperationListBySingleResourceSamples {
*/
public final class EventsOperationListByTenantIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Events_ListByTenantId.json
+ * x-ms-original-file: 2026-07-01/Events_ListByTenantId.json
*/
/**
* Sample code: ListEventsByTenantId.
@@ -467,9 +463,7 @@ public final class EventsOperationListByTenantIdSamples {
*/
public final class ImpactedResourcesGetSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * ImpactedResources_Get.json
+ * x-ms-original-file: 2026-07-01/ImpactedResources_Get.json
*/
/**
* Sample code: ImpactedResourcesGet.
@@ -490,9 +484,7 @@ public final class ImpactedResourcesGetSamples {
*/
public final class ImpactedResourcesGetByTenantIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * ImpactedResources_GetByTenantId.json
+ * x-ms-original-file: 2026-07-01/ImpactedResources_GetByTenantId.json
*/
/**
* Sample code: ImpactedResourcesGet.
@@ -514,9 +506,7 @@ public final class ImpactedResourcesGetByTenantIdSamples {
*/
public final class ImpactedResourcesListBySubscriptionIdAndEventIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * ImpactedResources_ListBySubscriptionId_ListByEventId.json
+ * x-ms-original-file: 2026-07-01/ImpactedResources_ListBySubscriptionId_ListByEventId.json
*/
/**
* Sample code: ListImpactedResourcesBySubscriptionId.
@@ -539,9 +529,7 @@ public final class ImpactedResourcesListBySubscriptionIdAndEventIdSamples {
*/
public final class ImpactedResourcesListByTenantIdAndEventIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * ImpactedResources_ListByTenantId_ListByEventId.json
+ * x-ms-original-file: 2026-07-01/ImpactedResources_ListByTenantId_ListByEventId.json
*/
/**
* Sample code: ListEventsByTenantId.
@@ -563,9 +551,7 @@ public final class ImpactedResourcesListByTenantIdAndEventIdSamples {
*/
public final class MetadataGetEntitySamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Metadata_GetEntity.json
+ * x-ms-original-file: 2026-07-01/Metadata_GetEntity.json
*/
/**
* Sample code: GetMetadata.
@@ -586,9 +572,7 @@ public final class MetadataGetEntitySamples {
*/
public final class MetadataListSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Metadata_List.json
+ * x-ms-original-file: 2026-07-01/Metadata_List.json
*/
/**
* Sample code: GetMetadata.
@@ -609,9 +593,7 @@ public final class MetadataListSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * Operations_List.json
+ * x-ms-original-file: 2026-07-01/Operations_List.json
*/
/**
* Sample code: GetOperationsList.
@@ -632,9 +614,7 @@ public final class OperationsListSamples {
*/
public final class SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEventIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
+ * x-ms-original-file: 2026-07-01/SecurityAdvisoryImpactedResources_ListBySubscriptionId_ListByEventId.json
*/
/**
* Sample code: ListSecurityAdvisoryImpactedResourcesBySubscriptionId.
@@ -657,9 +637,7 @@ public final class SecurityAdvisoryImpactedResourcesListBySubscriptionIdAndEvent
*/
public final class SecurityAdvisoryImpactedResourcesListByTenantIdAndEventIdSamples {
/*
- * x-ms-original-file:
- * specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/preview/2023-10-01-preview/examples/
- * SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
+ * x-ms-original-file: 2026-07-01/SecurityAdvisoryImpactedResources_ListByTenantId_ListByEventId.json
*/
/**
* Sample code: ListSecurityAdvisoryImpactedResourcesByTenantId.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
index 4f741d2e0eeef..32c4065d0a568 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml
@@ -1,9 +1,9 @@
-
+4.0.0com.azure
@@ -14,11 +14,11 @@
com.azure.resourcemanagerazure-resourcemanager-resourcehealth
- 1.1.0-beta.4
+ 1.1.0jarMicrosoft 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-preview-2023-10.
+ This package contains Microsoft Azure SDK for ResourceHealth Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Resource Health Client. Package api-version 2026-07-01.https://github.com/Azure/azure-sdk-for-java
@@ -46,7 +46,6 @@
00true
- false
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 9f8bc6e49d273..864426b7cfef9 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth;
@@ -22,6 +22,7 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.resourcehealth.fluent.MicrosoftResourceHealth;
import com.azure.resourcemanager.resourcehealth.implementation.AvailabilityStatusesImpl;
@@ -49,6 +50,7 @@
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@@ -57,26 +59,26 @@
* The Resource Health Client.
*/
public final class ResourceHealthManager {
- private AvailabilityStatuses availabilityStatuses;
-
private Operations operations;
- private Metadatas metadatas;
+ private AvailabilityStatuses availabilityStatuses;
- private ImpactedResources impactedResources;
+ private ChildAvailabilityStatuses childAvailabilityStatuses;
- private SecurityAdvisoryImpactedResources securityAdvisoryImpactedResources;
+ private ImpactedResources impactedResources;
- private EventsOperations eventsOperations;
+ private Metadatas metadatas;
private EventOperations eventOperations;
- private ChildAvailabilityStatuses childAvailabilityStatuses;
+ private EventsOperations eventsOperations;
- private ChildResources childResources;
+ private SecurityAdvisoryImpactedResources securityAdvisoryImpactedResources;
private EmergingIssues emergingIssues;
+ private ChildResources childResources;
+
private final MicrosoftResourceHealth clientObject;
private ResourceHealthManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -129,6 +131,9 @@ public static Configurable configure() {
*/
public static final class Configurable {
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
+ private static final String SDK_VERSION = "version";
+ private static final Map PROPERTIES
+ = CoreUtils.getProperties("azure-resourcemanager-resourcehealth.properties");
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
@@ -236,12 +241,14 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.resourcehealth")
.append("/")
- .append("1.1.0-beta.3");
+ .append(clientVersion);
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
@@ -287,18 +294,6 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi
}
}
- /**
- * 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);
- }
- return availabilityStatuses;
- }
-
/**
* Gets the resource collection API of Operations.
*
@@ -312,52 +307,52 @@ public Operations operations() {
}
/**
- * Gets the resource collection API of Metadatas.
+ * Gets the resource collection API of AvailabilityStatuses.
*
- * @return Resource collection API of Metadatas.
+ * @return Resource collection API of AvailabilityStatuses.
*/
- public Metadatas metadatas() {
- if (this.metadatas == null) {
- this.metadatas = new MetadatasImpl(clientObject.getMetadatas(), this);
+ public AvailabilityStatuses availabilityStatuses() {
+ if (this.availabilityStatuses == null) {
+ this.availabilityStatuses = new AvailabilityStatusesImpl(clientObject.getAvailabilityStatuses(), this);
}
- return metadatas;
+ return availabilityStatuses;
}
/**
- * Gets the resource collection API of ImpactedResources.
+ * Gets the resource collection API of ChildAvailabilityStatuses.
*
- * @return Resource collection API of ImpactedResources.
+ * @return Resource collection API of ChildAvailabilityStatuses.
*/
- public ImpactedResources impactedResources() {
- if (this.impactedResources == null) {
- this.impactedResources = new ImpactedResourcesImpl(clientObject.getImpactedResources(), this);
+ public ChildAvailabilityStatuses childAvailabilityStatuses() {
+ if (this.childAvailabilityStatuses == null) {
+ this.childAvailabilityStatuses
+ = new ChildAvailabilityStatusesImpl(clientObject.getChildAvailabilityStatuses(), this);
}
- return impactedResources;
+ return childAvailabilityStatuses;
}
/**
- * Gets the resource collection API of SecurityAdvisoryImpactedResources.
+ * Gets the resource collection API of ImpactedResources.
*
- * @return Resource collection API of SecurityAdvisoryImpactedResources.
+ * @return Resource collection API of ImpactedResources.
*/
- public SecurityAdvisoryImpactedResources securityAdvisoryImpactedResources() {
- if (this.securityAdvisoryImpactedResources == null) {
- this.securityAdvisoryImpactedResources
- = new SecurityAdvisoryImpactedResourcesImpl(clientObject.getSecurityAdvisoryImpactedResources(), this);
+ public ImpactedResources impactedResources() {
+ if (this.impactedResources == null) {
+ this.impactedResources = new ImpactedResourcesImpl(clientObject.getImpactedResources(), this);
}
- return securityAdvisoryImpactedResources;
+ return impactedResources;
}
/**
- * Gets the resource collection API of EventsOperations.
+ * Gets the resource collection API of Metadatas.
*
- * @return Resource collection API of EventsOperations.
+ * @return Resource collection API of Metadatas.
*/
- public EventsOperations eventsOperations() {
- if (this.eventsOperations == null) {
- this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this);
+ public Metadatas metadatas() {
+ if (this.metadatas == null) {
+ this.metadatas = new MetadatasImpl(clientObject.getMetadatas(), this);
}
- return eventsOperations;
+ return metadatas;
}
/**
@@ -373,28 +368,28 @@ public EventOperations eventOperations() {
}
/**
- * Gets the resource collection API of ChildAvailabilityStatuses.
+ * Gets the resource collection API of EventsOperations.
*
- * @return Resource collection API of ChildAvailabilityStatuses.
+ * @return Resource collection API of EventsOperations.
*/
- public ChildAvailabilityStatuses childAvailabilityStatuses() {
- if (this.childAvailabilityStatuses == null) {
- this.childAvailabilityStatuses
- = new ChildAvailabilityStatusesImpl(clientObject.getChildAvailabilityStatuses(), this);
+ public EventsOperations eventsOperations() {
+ if (this.eventsOperations == null) {
+ this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this);
}
- return childAvailabilityStatuses;
+ return eventsOperations;
}
/**
- * Gets the resource collection API of ChildResources.
+ * Gets the resource collection API of SecurityAdvisoryImpactedResources.
*
- * @return Resource collection API of ChildResources.
+ * @return Resource collection API of SecurityAdvisoryImpactedResources.
*/
- public ChildResources childResources() {
- if (this.childResources == null) {
- this.childResources = new ChildResourcesImpl(clientObject.getChildResources(), this);
+ public SecurityAdvisoryImpactedResources securityAdvisoryImpactedResources() {
+ if (this.securityAdvisoryImpactedResources == null) {
+ this.securityAdvisoryImpactedResources
+ = new SecurityAdvisoryImpactedResourcesImpl(clientObject.getSecurityAdvisoryImpactedResources(), this);
}
- return childResources;
+ return securityAdvisoryImpactedResources;
}
/**
@@ -409,6 +404,18 @@ public EmergingIssues emergingIssues() {
return emergingIssues;
}
+ /**
+ * Gets the resource collection API of ChildResources.
+ *
+ * @return Resource collection API of ChildResources.
+ */
+ public ChildResources childResources() {
+ if (this.childResources == null) {
+ this.childResources = new ChildResourcesImpl(clientObject.getChildResources(), this);
+ }
+ return childResources;
+ }
+
/**
* Gets 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 2296423a529b3..a5fc070c214d8 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -16,46 +16,47 @@
*/
public interface AvailabilityStatusesClient {
/**
- * Lists the current availability status for all the resources in the subscription.
+ * Gets current availability status for a single resource.
*
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ * @return current availability status for a single resource along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listBySubscriptionId();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceWithResponse(String resourceUri, String filter, String expand,
+ Context context);
/**
- * Lists the current availability status for all the resources in the subscription.
+ * Gets current availability status for a single resource.
*
- * @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.
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 List availabilityStatus operation response as paginated response with {@link PagedIterable}.
+ * @return current availability status for a single resource.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listBySubscriptionId(String filter, String expand, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AvailabilityStatusInner getByResource(String resourceUri);
/**
- * Lists the current availability status for all the resources in the resource group.
+ * Lists the current availability status for all the resources in the subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ PagedIterable listBySubscriptionId();
/**
- * Lists the current availability status for all the resources in the resource group.
+ * Lists the current availability status for all the resources in the subscription.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -66,70 +67,52 @@ public interface AvailabilityStatusesClient {
* @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, String filter, String expand,
- Context context);
+ PagedIterable listBySubscriptionId(String filter, String expand, Context context);
/**
- * Gets current availability status for a single resource.
+ * Lists all historical availability transitions and impacting events 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.
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 current availability status for a single resource along with {@link Response}.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceWithResponse(String resourceUri, String filter, String expand,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri);
/**
- * Gets current availability status for a single resource.
+ * Lists all historical availability transitions and impacting events 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 resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @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 the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- AvailabilityStatusInner getByResource(String resourceUri);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri, String filter, String expand, Context context);
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceUri);
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -140,5 +123,6 @@ Response getByResourceWithResponse(String resourceUri,
* @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(String resourceUri, String filter, String expand, Context context);
+ PagedIterable listByResourceGroup(String resourceGroupName, String filter, String expand,
+ Context context);
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildAvailabilityStatusesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildAvailabilityStatusesClient.java
index 5d5b83db04512..1ab816916937e 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildAvailabilityStatusesClient.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildAvailabilityStatusesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -18,9 +18,7 @@ public interface ChildAvailabilityStatusesClient {
/**
* Gets current availability status for a single resource.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param resourceUri undefined.
* @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.
@@ -37,9 +35,7 @@ Response getByResourceWithResponse(String resourceUri,
/**
* Gets current availability status for a single resource.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param resourceUri undefined.
* @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.
@@ -52,9 +48,7 @@ Response getByResourceWithResponse(String resourceUri,
* Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
* to get the next page of availability status.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param resourceUri undefined.
* @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.
@@ -67,9 +61,7 @@ Response getByResourceWithResponse(String resourceUri,
* Lists the historical availability statuses for a single child resource. Use the nextLink property in the response
* to get the next page of availability status.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param resourceUri undefined.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildResourcesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildResourcesClient.java
index 2d265fda7ecdb..9d69584fce9bd 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildResourcesClient.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/ChildResourcesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -18,9 +18,7 @@ public interface ChildResourcesClient {
* Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
* response to get the next page of children current health.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support not nested parent resource type:
- * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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.
@@ -33,9 +31,7 @@ public interface ChildResourcesClient {
* Lists the all the children and its current health status for a parent resource. Use the nextLink property in the
* response to get the next page of children current health.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support not nested parent resource type:
- * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name}.
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java
index 5cb2104f8abc1..0aab1aa3a6882 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -17,49 +17,49 @@
*/
public interface EmergingIssuesClient {
/**
- * Lists Azure services' emerging issues.
+ * Gets Azure services' emerging issues.
*
+ * @param issueName The name of the emerging issue.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of emerging issues as paginated response with {@link PagedIterable}.
+ * @return azure services' emerging issues along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(IssueNameParameter issueName, Context context);
/**
- * Lists Azure services' emerging issues.
+ * Gets Azure services' emerging issues.
*
- * @param context The context to associate with this operation.
+ * @param issueName The name of the emerging issue.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of emerging issues as paginated response with {@link PagedIterable}.
+ * @return azure services' emerging issues.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EmergingIssuesGetResultInner get(IssueNameParameter issueName);
/**
- * Gets Azure services' emerging issues.
+ * Lists Azure services' emerging issues.
*
- * @param issueName The name of the emerging issue.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return azure services' emerging issues along with {@link Response}.
+ * @return the list of emerging issues as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getWithResponse(IssueNameParameter issueName, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
- * Gets Azure services' emerging issues.
+ * Lists Azure services' emerging issues.
*
- * @param issueName The name of the emerging issue.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return azure services' emerging issues.
+ * @return the list of emerging issues as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- EmergingIssuesGetResultInner get(IssueNameParameter issueName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
}
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
index 2702bc16ac1a2..b82c97decaf04 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -20,8 +20,8 @@ public interface EventOperationsClient {
* @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 queryStartTime Specifies from when to return events (default is 3 days), 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.
@@ -46,7 +46,8 @@ Response getBySubscriptionIdAndTrackingIdWithResponse(String eventTr
/**
* Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
- * properties for Security Advisory events.
+ * properties for Security Advisory events. Please see
+ * https://learn.microsoft.com/en-us/azure/service-health/security-advisories-elevated-access.
*
* @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
* @param context The context to associate with this operation.
@@ -60,7 +61,8 @@ Response getBySubscriptionIdAndTrackingIdWithResponse(String eventTr
/**
* Service health event details in the subscription by event tracking id. This can be used to fetch sensitive
- * properties for Security Advisory events.
+ * properties for Security Advisory events. Please see
+ * https://learn.microsoft.com/en-us/azure/service-health/security-advisories-elevated-access.
*
* @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -71,14 +73,42 @@ Response getBySubscriptionIdAndTrackingIdWithResponse(String eventTr
@ServiceMethod(returns = ReturnType.SINGLE)
EventInner fetchDetailsBySubscriptionIdAndTrackingId(String eventTrackingId);
+ /**
+ * Service health event details specific in the subscription by event tracking id. This can be used to fetch
+ * sensitive properties for Billing event type.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return service health event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response fetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingIdWithResponse(
+ String eventTrackingId, Context context);
+
+ /**
+ * Service health event details specific in the subscription by event tracking id. This can be used to fetch
+ * sensitive properties for Billing event type.
+ *
+ * @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 fetchBilllingCommunicationDetailsBySubscriptionIdAndTrackingId(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 queryStartTime Specifies from when to return events (default is 3 days), 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.
@@ -103,7 +133,8 @@ Response getByTenantIdAndTrackingIdWithResponse(String eventTracking
/**
* Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
- * for Security Advisory events.
+ * for Security Advisory events. Please see
+ * https://learn.microsoft.com/en-us/azure/service-health/security-advisories-elevated-access.
*
* @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
* @param context The context to associate with this operation.
@@ -117,7 +148,8 @@ Response getByTenantIdAndTrackingIdWithResponse(String eventTracking
/**
* Service health event details in the tenant by event tracking id. This can be used to fetch sensitive properties
- * for Security Advisory events.
+ * for Security Advisory events. Please see
+ * https://learn.microsoft.com/en-us/azure/service-health/security-advisories-elevated-access.
*
* @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
* @throws IllegalArgumentException thrown if parameters fail the validation.
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
index 9021334376307..d8c7d75b114e6 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -29,8 +29,8 @@ public interface EventsOperationsClient {
*
* @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 queryStartTime Specifies from when to return events (default is 3 days), 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.
@@ -55,8 +55,8 @@ public interface EventsOperationsClient {
*
* @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 queryStartTime Specifies from when to return events (default is 3 days), 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.
@@ -69,11 +69,7 @@ public interface EventsOperationsClient {
/**
* 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 resourceUri The fully qualified Azure Resource manager identifier of the 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.
@@ -85,11 +81,7 @@ public interface EventsOperationsClient {
/**
* 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 resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @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.
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
index 0518320a24e6a..e92d7b2ca1ab9 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -16,7 +16,35 @@
*/
public interface ImpactedResourcesClient {
/**
- * Lists impacted resources in the subscription by an event.
+ * Gets the specific impacted resource in the tenant by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param impactedResourceName Name of the Impacted Resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specific impacted resource in the tenant by an event along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByTenantIdWithResponse(String eventTrackingId, String impactedResourceName,
+ Context context);
+
+ /**
+ * Gets the specific impacted resource in the tenant by an event.
+ *
+ * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
+ * @param impactedResourceName Name of the Impacted Resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specific impacted resource in the tenant by an event.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EventImpactedResourceInner getByTenantId(String eventTrackingId, String impactedResourceName);
+
+ /**
+ * Lists impacted resources in the tenant by an event.
*
* @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -25,10 +53,10 @@ public interface ImpactedResourcesClient {
* @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId);
+ PagedIterable listByTenantIdAndEventId(String eventTrackingId);
/**
- * Lists impacted resources in the subscription by an event.
+ * Lists impacted resources in the tenant by an event.
*
* @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
* @param filter The filter to apply on the operation. For more information please see
@@ -40,7 +68,7 @@ public interface ImpactedResourcesClient {
* @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId, String filter,
+ PagedIterable listByTenantIdAndEventId(String eventTrackingId, String filter,
Context context);
/**
@@ -72,7 +100,7 @@ Response getWithResponse(String eventTrackingId, Str
EventImpactedResourceInner get(String eventTrackingId, String impactedResourceName);
/**
- * Lists impacted resources in the tenant by an event.
+ * 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.
@@ -81,10 +109,10 @@ Response getWithResponse(String eventTrackingId, Str
* @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByTenantIdAndEventId(String eventTrackingId);
+ PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId);
/**
- * Lists impacted resources in the tenant by an event.
+ * 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
@@ -96,34 +124,6 @@ Response getWithResponse(String eventTrackingId, Str
* @return the List of eventImpactedResources operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByTenantIdAndEventId(String eventTrackingId, String filter,
- Context context);
-
- /**
- * Gets the specific impacted resource in the tenant by an event.
- *
- * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
- * @param impactedResourceName Name of the Impacted Resource.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the specific impacted resource in the tenant by an event along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByTenantIdWithResponse(String eventTrackingId, String impactedResourceName,
+ PagedIterable listBySubscriptionIdAndEventId(String eventTrackingId, String filter,
Context context);
-
- /**
- * Gets the specific impacted resource in the tenant by an event.
- *
- * @param eventTrackingId Event Id which uniquely identifies ServiceHealth event.
- * @param impactedResourceName Name of the Impacted Resource.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the specific impacted resource in the tenant by an event.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- EventImpactedResourceInner getByTenantId(String eventTrackingId, String impactedResourceName);
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MetadatasClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MetadatasClient.java
index 9ce3a76b620ee..247d15e8405c0 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MetadatasClient.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/MetadatasClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -18,47 +18,47 @@ public interface MetadatasClient {
/**
* Gets the list of metadata entities.
*
+ * @param name Name of metadata entity.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of metadata entities as paginated response with {@link PagedIterable}.
+ * @return the list of metadata entities along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getEntityWithResponse(String name, Context context);
/**
* Gets the list of metadata entities.
*
- * @param context The context to associate with this operation.
+ * @param name Name of metadata entity.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of metadata entities as paginated response with {@link PagedIterable}.
+ * @return the list of metadata entities.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ MetadataEntityInner getEntity(String name);
/**
* Gets the list of metadata entities.
*
- * @param name Name of metadata entity.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of metadata entities along with {@link Response}.
+ * @return the list of metadata entities as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getEntityWithResponse(String name, Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
* Gets the list of metadata entities.
*
- * @param name Name of metadata entity.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of metadata entities.
+ * @return the list of metadata entities as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- MetadataEntityInner getEntity(String name);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
}
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 70e023f511d7d..7de86c8e43db6 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
@@ -12,26 +12,26 @@
*/
public interface MicrosoftResourceHealth {
/**
- * Gets The ID of the target subscription.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -46,13 +46,6 @@ public interface MicrosoftResourceHealth {
*/
Duration getDefaultPollInterval();
- /**
- * Gets the AvailabilityStatusesClient object to access its operations.
- *
- * @return the AvailabilityStatusesClient object.
- */
- AvailabilityStatusesClient getAvailabilityStatuses();
-
/**
* Gets the OperationsClient object to access its operations.
*
@@ -61,32 +54,32 @@ public interface MicrosoftResourceHealth {
OperationsClient getOperations();
/**
- * Gets the MetadatasClient object to access its operations.
+ * Gets the AvailabilityStatusesClient object to access its operations.
*
- * @return the MetadatasClient object.
+ * @return the AvailabilityStatusesClient object.
*/
- MetadatasClient getMetadatas();
+ AvailabilityStatusesClient getAvailabilityStatuses();
/**
- * Gets the ImpactedResourcesClient object to access its operations.
+ * Gets the ChildAvailabilityStatusesClient object to access its operations.
*
- * @return the ImpactedResourcesClient object.
+ * @return the ChildAvailabilityStatusesClient object.
*/
- ImpactedResourcesClient getImpactedResources();
+ ChildAvailabilityStatusesClient getChildAvailabilityStatuses();
/**
- * Gets the SecurityAdvisoryImpactedResourcesClient object to access its operations.
+ * Gets the ImpactedResourcesClient object to access its operations.
*
- * @return the SecurityAdvisoryImpactedResourcesClient object.
+ * @return the ImpactedResourcesClient object.
*/
- SecurityAdvisoryImpactedResourcesClient getSecurityAdvisoryImpactedResources();
+ ImpactedResourcesClient getImpactedResources();
/**
- * Gets the EventsOperationsClient object to access its operations.
+ * Gets the MetadatasClient object to access its operations.
*
- * @return the EventsOperationsClient object.
+ * @return the MetadatasClient object.
*/
- EventsOperationsClient getEventsOperations();
+ MetadatasClient getMetadatas();
/**
* Gets the EventOperationsClient object to access its operations.
@@ -96,18 +89,18 @@ public interface MicrosoftResourceHealth {
EventOperationsClient getEventOperations();
/**
- * Gets the ChildAvailabilityStatusesClient object to access its operations.
+ * Gets the EventsOperationsClient object to access its operations.
*
- * @return the ChildAvailabilityStatusesClient object.
+ * @return the EventsOperationsClient object.
*/
- ChildAvailabilityStatusesClient getChildAvailabilityStatuses();
+ EventsOperationsClient getEventsOperations();
/**
- * Gets the ChildResourcesClient object to access its operations.
+ * Gets the SecurityAdvisoryImpactedResourcesClient object to access its operations.
*
- * @return the ChildResourcesClient object.
+ * @return the SecurityAdvisoryImpactedResourcesClient object.
*/
- ChildResourcesClient getChildResources();
+ SecurityAdvisoryImpactedResourcesClient getSecurityAdvisoryImpactedResources();
/**
* Gets the EmergingIssuesClient object to access its operations.
@@ -115,4 +108,11 @@ public interface MicrosoftResourceHealth {
* @return the EmergingIssuesClient object.
*/
EmergingIssuesClient getEmergingIssues();
+
+ /**
+ * Gets the ChildResourcesClient object to access its operations.
+ *
+ * @return the ChildResourcesClient object.
+ */
+ ChildResourcesClient getChildResources();
}
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 a001f93be7b21..b644cf3289d7f 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/SecurityAdvisoryImpactedResourcesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/SecurityAdvisoryImpactedResourcesClient.java
index 5aae2ddd3f511..59c32cf44b33f 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/SecurityAdvisoryImpactedResourcesClient.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/SecurityAdvisoryImpactedResourcesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent;
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 30163b79d879c..dc8811245e524 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
@@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusProperties;
@@ -15,97 +15,46 @@
/**
* availabilityStatus of a resource.
*/
-@Fluent
-public final class AvailabilityStatusInner implements JsonSerializable {
+@Immutable
+public final class AvailabilityStatusInner extends ProxyResource {
/*
- * Azure Resource Manager Identity for the availabilityStatuses resource.
+ * Properties of availability state.
*/
- private String id;
+ private AvailabilityStatusProperties properties;
/*
- * current.
+ * Azure Resource Manager geo location of the resource.
*/
- private String name;
+ private String location;
/*
- * Microsoft.ResourceHealth/AvailabilityStatuses.
+ * Azure Resource Manager Identity for the availabilityStatuses resource.
*/
- private String type;
+ private String id;
/*
- * Azure Resource Manager geo location of the resource.
+ * The name property.
*/
- private String location;
+ private String name;
/*
- * Properties of availability state.
+ * Microsoft.ResourceHealth/AvailabilityStatuses.
*/
- private AvailabilityStatusProperties properties;
+ private String type;
/**
* Creates an instance of AvailabilityStatusInner class.
*/
- public AvailabilityStatusInner() {
- }
-
- /**
- * Get the id property: Azure Resource Manager Identity for the availabilityStatuses resource.
- *
- * @return the id value.
- */
- public String id() {
- return this.id;
- }
-
- /**
- * Set the id property: Azure Resource Manager Identity for the availabilityStatuses resource.
- *
- * @param id the id value to set.
- * @return the AvailabilityStatusInner object itself.
- */
- public AvailabilityStatusInner withId(String id) {
- this.id = id;
- return this;
- }
-
- /**
- * Get the name property: current.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: current.
- *
- * @param name the name value to set.
- * @return the AvailabilityStatusInner object itself.
- */
- public AvailabilityStatusInner withName(String name) {
- this.name = name;
- return this;
+ private AvailabilityStatusInner() {
}
/**
- * Get the type property: Microsoft.ResourceHealth/AvailabilityStatuses.
- *
- * @return the type value.
- */
- public String type() {
- return this.type;
- }
-
- /**
- * Set the type property: Microsoft.ResourceHealth/AvailabilityStatuses.
+ * Get the properties property: Properties of availability state.
*
- * @param type the type value to set.
- * @return the AvailabilityStatusInner object itself.
+ * @return the properties value.
*/
- public AvailabilityStatusInner withType(String type) {
- this.type = type;
- return this;
+ public AvailabilityStatusProperties properties() {
+ return this.properties;
}
/**
@@ -118,45 +67,30 @@ public String location() {
}
/**
- * Set the location property: Azure Resource Manager geo location of the resource.
- *
- * @param location the location value to set.
- * @return the AvailabilityStatusInner object itself.
- */
- public AvailabilityStatusInner withLocation(String location) {
- this.location = location;
- return this;
- }
-
- /**
- * Get the properties property: Properties of availability state.
+ * Get the id property: Azure Resource Manager Identity for the availabilityStatuses resource.
*
- * @return the properties value.
+ * @return the id value.
*/
- public AvailabilityStatusProperties properties() {
- return this.properties;
+ public String id() {
+ return this.id;
}
/**
- * Set the properties property: Properties of availability state.
+ * Get the name property: The name property.
*
- * @param properties the properties value to set.
- * @return the AvailabilityStatusInner object itself.
+ * @return the name value.
*/
- public AvailabilityStatusInner withProperties(AvailabilityStatusProperties properties) {
- this.properties = properties;
- return this;
+ public String name() {
+ return this.name;
}
/**
- * Validates the instance.
+ * Get the type property: Microsoft.ResourceHealth/AvailabilityStatuses.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the type value.
*/
- public void validate() {
- if (properties() != null) {
- properties().validate();
- }
+ public String type() {
+ return this.type;
}
/**
@@ -165,11 +99,11 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("location", this.location);
jsonWriter.writeStringField("id", this.id);
jsonWriter.writeStringField("name", this.name);
jsonWriter.writeStringField("type", this.type);
- jsonWriter.writeStringField("location", this.location);
- jsonWriter.writeJsonField("properties", this.properties);
return jsonWriter.writeEndObject();
}
@@ -188,16 +122,16 @@ public static AvailabilityStatusInner fromJson(JsonReader jsonReader) throws IOE
String fieldName = reader.getFieldName();
reader.nextToken();
- if ("id".equals(fieldName)) {
+ if ("properties".equals(fieldName)) {
+ deserializedAvailabilityStatusInner.properties = AvailabilityStatusProperties.fromJson(reader);
+ } else if ("location".equals(fieldName)) {
+ deserializedAvailabilityStatusInner.location = reader.getString();
+ } else if ("id".equals(fieldName)) {
deserializedAvailabilityStatusInner.id = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedAvailabilityStatusInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedAvailabilityStatusInner.type = reader.getString();
- } else if ("location".equals(fieldName)) {
- deserializedAvailabilityStatusInner.location = reader.getString();
- } else if ("properties".equals(fieldName)) {
- deserializedAvailabilityStatusInner.properties = AvailabilityStatusProperties.fromJson(reader);
} else {
reader.skipChildren();
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssue.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssue.java
index d6262c5acb5f6..9122562ca8ae0 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssue.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssue.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
@@ -20,7 +20,7 @@
/**
* On-going emerging issue from azure status.
*/
-@Fluent
+@Immutable
public final class EmergingIssue implements JsonSerializable {
/*
* Timestamp for when last time refreshed for ongoing emerging issue.
@@ -40,7 +40,7 @@ public final class EmergingIssue implements JsonSerializable {
/**
* Creates an instance of EmergingIssue class.
*/
- public EmergingIssue() {
+ private EmergingIssue() {
}
/**
@@ -52,17 +52,6 @@ public OffsetDateTime refreshTimestamp() {
return this.refreshTimestamp;
}
- /**
- * Set the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue.
- *
- * @param refreshTimestamp the refreshTimestamp value to set.
- * @return the EmergingIssue object itself.
- */
- public EmergingIssue withRefreshTimestamp(OffsetDateTime refreshTimestamp) {
- this.refreshTimestamp = refreshTimestamp;
- return this;
- }
-
/**
* Get the statusBanners property: The list of emerging issues of banner type.
*
@@ -72,17 +61,6 @@ public List statusBanners() {
return this.statusBanners;
}
- /**
- * Set the statusBanners property: The list of emerging issues of banner type.
- *
- * @param statusBanners the statusBanners value to set.
- * @return the EmergingIssue object itself.
- */
- public EmergingIssue withStatusBanners(List statusBanners) {
- this.statusBanners = statusBanners;
- return this;
- }
-
/**
* Get the statusActiveEvents property: The list of emerging issues of active event type.
*
@@ -92,31 +70,6 @@ public List statusActiveEvents() {
return this.statusActiveEvents;
}
- /**
- * Set the statusActiveEvents property: The list of emerging issues of active event type.
- *
- * @param statusActiveEvents the statusActiveEvents value to set.
- * @return the EmergingIssue object itself.
- */
- public EmergingIssue withStatusActiveEvents(List statusActiveEvents) {
- this.statusActiveEvents = statusActiveEvents;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (statusBanners() != null) {
- statusBanners().forEach(e -> e.validate());
- }
- if (statusActiveEvents() != null) {
- statusActiveEvents().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java
index 5d8db4ddd8961..e89914ad2973c 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
@@ -19,7 +19,7 @@
/**
* The Get EmergingIssues operation response.
*/
-@Fluent
+@Immutable
public final class EmergingIssuesGetResultInner extends ProxyResource {
/*
* The emerging issue entity properties.
@@ -49,7 +49,7 @@ public final class EmergingIssuesGetResultInner extends ProxyResource {
/**
* Creates an instance of EmergingIssuesGetResultInner class.
*/
- public EmergingIssuesGetResultInner() {
+ private EmergingIssuesGetResultInner() {
}
/**
@@ -109,20 +109,6 @@ public OffsetDateTime refreshTimestamp() {
return this.innerProperties() == null ? null : this.innerProperties().refreshTimestamp();
}
- /**
- * Set the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue.
- *
- * @param refreshTimestamp the refreshTimestamp value to set.
- * @return the EmergingIssuesGetResultInner object itself.
- */
- public EmergingIssuesGetResultInner withRefreshTimestamp(OffsetDateTime refreshTimestamp) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EmergingIssue();
- }
- this.innerProperties().withRefreshTimestamp(refreshTimestamp);
- return this;
- }
-
/**
* Get the statusBanners property: The list of emerging issues of banner type.
*
@@ -132,20 +118,6 @@ public List statusBanners() {
return this.innerProperties() == null ? null : this.innerProperties().statusBanners();
}
- /**
- * Set the statusBanners property: The list of emerging issues of banner type.
- *
- * @param statusBanners the statusBanners value to set.
- * @return the EmergingIssuesGetResultInner object itself.
- */
- public EmergingIssuesGetResultInner withStatusBanners(List statusBanners) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EmergingIssue();
- }
- this.innerProperties().withStatusBanners(statusBanners);
- return this;
- }
-
/**
* Get the statusActiveEvents property: The list of emerging issues of active event type.
*
@@ -155,31 +127,6 @@ public List statusActiveEvents() {
return this.innerProperties() == null ? null : this.innerProperties().statusActiveEvents();
}
- /**
- * Set the statusActiveEvents property: The list of emerging issues of active event type.
- *
- * @param statusActiveEvents the statusActiveEvents value to set.
- * @return the EmergingIssuesGetResultInner object itself.
- */
- public EmergingIssuesGetResultInner withStatusActiveEvents(List statusActiveEvents) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EmergingIssue();
- }
- this.innerProperties().withStatusActiveEvents(statusActiveEvents);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java
index 85b243165baad..c0ed5150810b5 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
@@ -17,7 +17,7 @@
/**
* Impacted resource for an event.
*/
-@Fluent
+@Immutable
public final class EventImpactedResourceInner extends ProxyResource {
/*
* Properties of impacted resource.
@@ -47,7 +47,7 @@ public final class EventImpactedResourceInner extends ProxyResource {
/**
* Creates an instance of EventImpactedResourceInner class.
*/
- public EventImpactedResourceInner() {
+ private EventImpactedResourceInner() {
}
/**
@@ -125,51 +125,6 @@ public String targetRegion() {
return this.innerProperties() == null ? null : this.innerProperties().targetRegion();
}
- /**
- * Get the resourceName property: Resource name of the impacted resource.
- *
- * @return the resourceName value.
- */
- public String resourceName() {
- return this.innerProperties() == null ? null : this.innerProperties().resourceName();
- }
-
- /**
- * Get the resourceGroup property: Resource group name of the impacted resource.
- *
- * @return the resourceGroup value.
- */
- public String resourceGroup() {
- return this.innerProperties() == null ? null : this.innerProperties().resourceGroup();
- }
-
- /**
- * Get the status property: Status of the impacted resource.
- *
- * @return the status value.
- */
- public String status() {
- return this.innerProperties() == null ? null : this.innerProperties().status();
- }
-
- /**
- * Get the maintenanceStartTime property: Start time of maintenance for the impacted resource.
- *
- * @return the maintenanceStartTime value.
- */
- public String maintenanceStartTime() {
- return this.innerProperties() == null ? null : this.innerProperties().maintenanceStartTime();
- }
-
- /**
- * Get the maintenanceEndTime property: End time of maintenance for the impacted resource.
- *
- * @return the maintenanceEndTime value.
- */
- public String maintenanceEndTime() {
- return this.innerProperties() == null ? null : this.innerProperties().maintenanceEndTime();
- }
-
/**
* Get the info property: Additional information.
*
@@ -179,31 +134,6 @@ 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();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java
index 6c1c5910be76f..37ff43b0a965f 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventImpactedResourceProperties.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -16,7 +16,7 @@
/**
* Properties of impacted resource.
*/
-@Fluent
+@Immutable
public final class EventImpactedResourceProperties implements JsonSerializable {
/*
* Resource type within Microsoft cloud.
@@ -33,31 +33,6 @@ public final class EventImpactedResourceProperties implements JsonSerializable 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());
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -204,16 +112,6 @@ public static EventImpactedResourceProperties fromJson(JsonReader jsonReader) th
deserializedEventImpactedResourceProperties.targetResourceId = reader.getString();
} else if ("targetRegion".equals(fieldName)) {
deserializedEventImpactedResourceProperties.targetRegion = reader.getString();
- } else if ("resourceName".equals(fieldName)) {
- deserializedEventImpactedResourceProperties.resourceName = reader.getString();
- } else if ("resourceGroup".equals(fieldName)) {
- deserializedEventImpactedResourceProperties.resourceGroup = reader.getString();
- } else if ("status".equals(fieldName)) {
- deserializedEventImpactedResourceProperties.status = reader.getString();
- } else if ("maintenanceStartTime".equals(fieldName)) {
- deserializedEventImpactedResourceProperties.maintenanceStartTime = reader.getString();
- } else if ("maintenanceEndTime".equals(fieldName)) {
- deserializedEventImpactedResourceProperties.maintenanceEndTime = reader.getString();
} else if ("info".equals(fieldName)) {
List info = reader.readArray(reader1 -> KeyValueItem.fromJson(reader1));
deserializedEventImpactedResourceProperties.info = info;
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
index e26a5f1fb6c70..d04a630dbf078 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java
@@ -1,15 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.resourcehealth.models.ApiOperationLink;
import com.azure.resourcemanager.resourcehealth.models.EventLevelValues;
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesAdditionalInformation;
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesArticle;
@@ -29,7 +30,7 @@
/**
* Service health event.
*/
-@Fluent
+@Immutable
public final class EventInner extends ProxyResource {
/*
* Properties of event.
@@ -59,7 +60,7 @@ public final class EventInner extends ProxyResource {
/**
* Creates an instance of EventInner class.
*/
- public EventInner() {
+ private EventInner() {
}
/**
@@ -120,22 +121,7 @@ public EventTypeValues 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 eventSubType property: Sub type of the event. Currently used to determine retirement communications for
- * health advisory events.
+ * Get the eventSubType property: Sub-type of event.
*
* @return the eventSubType value.
*/
@@ -144,18 +130,13 @@ public EventSubTypeValues eventSubType() {
}
/**
- * Set the eventSubType property: Sub type of the event. Currently used to determine retirement communications for
- * health advisory events.
+ * Get the advisorRecommendations property: Operation for listing Advisor recommendations associated with this
+ * event's tracking ID in the response subscription.
*
- * @param eventSubType the eventSubType value to set.
- * @return the EventInner object itself.
+ * @return the advisorRecommendations value.
*/
- public EventInner withEventSubType(EventSubTypeValues eventSubType) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withEventSubType(eventSubType);
- return this;
+ public ApiOperationLink advisorRecommendations() {
+ return this.innerProperties() == null ? null : this.innerProperties().advisorRecommendations();
}
/**
@@ -167,20 +148,6 @@ 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.
*
@@ -190,20 +157,6 @@ 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.
*
@@ -214,21 +167,8 @@ public String 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.
+ * Get the summary property: Summary text of event. Use fetchEventDetails endpoint to get summary of sensitive
+ * events.
*
* @return the summary value.
*/
@@ -236,20 +176,6 @@ 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.
*
@@ -259,20 +185,6 @@ 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.
*
@@ -282,20 +194,6 @@ 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.
*
@@ -306,17 +204,14 @@ public EventLevelValues eventLevel() {
}
/**
- * Set the eventLevel property: Level of event.
+ * Get the isEventSensitive property: If true the event may contains sensitive data. Use the post
+ * events/{trackingId}/fetchEventDetails endpoint to fetch sensitive data see
+ * https://learn.microsoft.com/en-us/azure/service-health/security-advisories-elevated-access.
*
- * @param eventLevel the eventLevel value to set.
- * @return the EventInner object itself.
+ * @return the isEventSensitive value.
*/
- public EventInner withEventLevel(EventLevelValues eventLevel) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withEventLevel(eventLevel);
- return this;
+ public Boolean isEventSensitive() {
+ return this.innerProperties() == null ? null : this.innerProperties().isEventSensitive();
}
/**
@@ -328,20 +223,6 @@ public String externalIncidentId() {
return this.innerProperties() == null ? null : this.innerProperties().externalIncidentId();
}
- /**
- * Set the externalIncidentId property: The id of the Incident.
- *
- * @param externalIncidentId the externalIncidentId value to set.
- * @return the EventInner object itself.
- */
- public EventInner withExternalIncidentId(String externalIncidentId) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withExternalIncidentId(externalIncidentId);
- return this;
- }
-
/**
* Get the reason property: The reason for the Incident.
*
@@ -351,20 +232,6 @@ public String reason() {
return this.innerProperties() == null ? null : this.innerProperties().reason();
}
- /**
- * Set the reason property: The reason for the Incident.
- *
- * @param reason the reason value to set.
- * @return the EventInner object itself.
- */
- public EventInner withReason(String reason) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withReason(reason);
- return this;
- }
-
/**
* Get the article property: Article of event.
*
@@ -374,20 +241,6 @@ 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.
*
@@ -397,20 +250,6 @@ 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.
*
@@ -420,20 +259,6 @@ 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.
*
@@ -443,20 +268,6 @@ 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.
*
@@ -466,20 +277,6 @@ 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.
*
@@ -489,20 +286,6 @@ 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.
*
@@ -512,20 +295,6 @@ 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.
*
@@ -535,20 +304,6 @@ 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.
*
@@ -558,23 +313,9 @@ 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.
+ * cause and other details. Use fetchEventDetails endpoint to get description of sensitive events.
*
* @return the description value.
*/
@@ -582,21 +323,6 @@ 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.
*
@@ -606,20 +332,6 @@ 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.
*
@@ -629,20 +341,6 @@ 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
@@ -655,23 +353,6 @@ 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.
*
@@ -681,20 +362,6 @@ 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.
*
@@ -704,20 +371,6 @@ 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.
*
@@ -727,20 +380,6 @@ 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.
*
@@ -750,20 +389,6 @@ 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.
*
@@ -774,99 +399,58 @@ public String 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;
- }
-
- /**
- * Get the maintenanceId property: Unique identifier for planned maintenance event.
- *
- * @return the maintenanceId value.
- */
- public String maintenanceId() {
- return this.innerProperties() == null ? null : this.innerProperties().maintenanceId();
- }
-
- /**
- * Set the maintenanceId property: Unique identifier for planned maintenance event.
- *
- * @param maintenanceId the maintenanceId value to set.
- * @return the EventInner object itself.
- */
- public EventInner withMaintenanceId(String maintenanceId) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withMaintenanceId(maintenanceId);
- return this;
- }
-
- /**
- * Get the maintenanceType property: The type of planned maintenance event.
+ * Get the eventTags property: A list of metadata tags associated with the event. Possible values include:
+ * -Action Recommended: Action may be required by you to avoid possible disruptions or mitigate risks for your
+ * services. It is recommended to evaluate these actions and the potential impact on your services.
+ * - False Positive: After investigation, we've determined your service is healthy and service issues did not impact
+ * your services as originally communicated.
+ * - Preliminary PIR: For our largest, most impactful service issues a Preliminary Post Incident Review (PIR) is
+ * published generally within 72 hours of mitigation, to summarize what we have learned so far from the
+ * still-in-progress investigation.
+ * - Final PIR: For service issues, a Final Post Incident Review (PIR) may be published to provide additional
+ * details or learnings. Sometimes this requires us to complete an internal retrospective, generally within 14 days
+ * of mitigation.
*
- * @return the maintenanceType value.
+ * @return the eventTags value.
*/
- public String maintenanceType() {
- return this.innerProperties() == null ? null : this.innerProperties().maintenanceType();
+ public List eventTags() {
+ return this.innerProperties() == null ? null : this.innerProperties().eventTags();
}
/**
- * Set the maintenanceType property: The type of planned maintenance event.
+ * Get the newRate property: Billing rate change information - new rate.
*
- * @param maintenanceType the maintenanceType value to set.
- * @return the EventInner object itself.
+ * @return the newRate value.
*/
- public EventInner withMaintenanceType(String maintenanceType) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withMaintenanceType(maintenanceType);
- return this;
+ public Double newRate() {
+ return this.innerProperties() == null ? null : this.innerProperties().newRate();
}
/**
- * Get the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
- * Resource Graph locations.
+ * Get the oldRate property: Billing rate change information - old rate.
*
- * @return the argQuery value.
+ * @return the oldRate value.
*/
- public String argQuery() {
- return this.innerProperties() == null ? null : this.innerProperties().argQuery();
+ public Double oldRate() {
+ return this.innerProperties() == null ? null : this.innerProperties().oldRate();
}
/**
- * Set the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
- * Resource Graph locations.
+ * Get the currencyType property: Billing currency type information. Example: USD, CAD.
*
- * @param argQuery the argQuery value to set.
- * @return the EventInner object itself.
+ * @return the currencyType value.
*/
- public EventInner withArgQuery(String argQuery) {
- if (this.innerProperties() == null) {
- this.innerProperties = new EventProperties();
- }
- this.innerProperties().withArgQuery(argQuery);
- return this;
+ public String currencyType() {
+ return this.innerProperties() == null ? null : this.innerProperties().currencyType();
}
/**
- * Validates the instance.
+ * Get the billingId property: Billing identifier information.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the billingId value.
*/
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
+ public String billingId() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingId();
}
/**
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
index c4959ce3e569c..7e5a167ff0043 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventProperties.java
@@ -1,15 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.util.CoreUtils;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.resourcehealth.models.ApiOperationLink;
import com.azure.resourcemanager.resourcehealth.models.EventLevelValues;
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesAdditionalInformation;
import com.azure.resourcemanager.resourcehealth.models.EventPropertiesArticle;
@@ -30,7 +31,7 @@
/**
* Properties of event.
*/
-@Fluent
+@Immutable
public final class EventProperties implements JsonSerializable {
/*
* Type of event.
@@ -38,10 +39,16 @@ public final class EventProperties implements JsonSerializable
private EventTypeValues eventType;
/*
- * Sub type of the event. Currently used to determine retirement communications for health advisory events
+ * Sub-type of event.
*/
private EventSubTypeValues eventSubType;
+ /*
+ * Operation for listing Advisor recommendations associated with this event's tracking ID in the response
+ * subscription.
+ */
+ private ApiOperationLink advisorRecommendations;
+
/*
* Source of event.
*/
@@ -58,7 +65,7 @@ public final class EventProperties implements JsonSerializable
private String title;
/*
- * Summary text of event.
+ * Summary text of event. Use fetchEventDetails endpoint to get summary of sensitive events.
*/
private String summary;
@@ -77,6 +84,13 @@ public final class EventProperties implements JsonSerializable
*/
private EventLevelValues eventLevel;
+ /*
+ * If true the event may contains sensitive data. Use the post events/{trackingId}/fetchEventDetails endpoint to
+ * fetch sensitive data see
+ * https://learn.microsoft.com/en-us/azure/service-health/security-advisories-elevated-access
+ */
+ private Boolean isEventSensitive;
+
/*
* The id of the Incident
*/
@@ -133,7 +147,8 @@ public final class EventProperties implements JsonSerializable
private Boolean enableMicrosoftSupport;
/*
- * Contains the communication message for the event, that could include summary, root cause and other details.
+ * Contains the communication message for the event, that could include summary, root cause and other details. Use
+ * fetchEventDetails endpoint to get description of sensitive events.
*/
private String description;
@@ -180,24 +195,44 @@ public final class EventProperties implements JsonSerializable
private String impactType;
/*
- * Unique identifier for planned maintenance event.
+ * A list of metadata tags associated with the event. Possible values include:
+ * -Action Recommended: Action may be required by you to avoid possible disruptions or mitigate risks for your
+ * services. It is recommended to evaluate these actions and the potential impact on your services.
+ * - False Positive: After investigation, we've determined your service is healthy and service issues did not impact
+ * your services as originally communicated.
+ * - Preliminary PIR: For our largest, most impactful service issues a Preliminary Post Incident Review (PIR) is
+ * published generally within 72 hours of mitigation, to summarize what we have learned so far from the
+ * still-in-progress investigation.
+ * - Final PIR: For service issues, a Final Post Incident Review (PIR) may be published to provide additional
+ * details or learnings. Sometimes this requires us to complete an internal retrospective, generally within 14 days
+ * of mitigation.
+ */
+ private List eventTags;
+
+ /*
+ * Billing rate change information - new rate
+ */
+ private Double newRate;
+
+ /*
+ * Billing rate change information - old rate
*/
- private String maintenanceId;
+ private Double oldRate;
/*
- * The type of planned maintenance event.
+ * Billing currency type information. Example: USD, CAD
*/
- private String maintenanceType;
+ private String currencyType;
/*
- * Azure Resource Graph query to fetch the affected resources from their existing Azure Resource Graph locations.
+ * Billing identifier information.
*/
- private String argQuery;
+ private String billingId;
/**
* Creates an instance of EventProperties class.
*/
- public EventProperties() {
+ private EventProperties() {
}
/**
@@ -210,19 +245,7 @@ public EventTypeValues 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 eventSubType property: Sub type of the event. Currently used to determine retirement communications for
- * health advisory events.
+ * Get the eventSubType property: Sub-type of event.
*
* @return the eventSubType value.
*/
@@ -231,15 +254,13 @@ public EventSubTypeValues eventSubType() {
}
/**
- * Set the eventSubType property: Sub type of the event. Currently used to determine retirement communications for
- * health advisory events.
+ * Get the advisorRecommendations property: Operation for listing Advisor recommendations associated with this
+ * event's tracking ID in the response subscription.
*
- * @param eventSubType the eventSubType value to set.
- * @return the EventProperties object itself.
+ * @return the advisorRecommendations value.
*/
- public EventProperties withEventSubType(EventSubTypeValues eventSubType) {
- this.eventSubType = eventSubType;
- return this;
+ public ApiOperationLink advisorRecommendations() {
+ return this.advisorRecommendations;
}
/**
@@ -251,17 +272,6 @@ 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.
*
@@ -271,17 +281,6 @@ 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.
*
@@ -292,18 +291,8 @@ public String 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.
+ * Get the summary property: Summary text of event. Use fetchEventDetails endpoint to get summary of sensitive
+ * events.
*
* @return the summary value.
*/
@@ -311,17 +300,6 @@ 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.
*
@@ -331,17 +309,6 @@ 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.
*
@@ -351,17 +318,6 @@ 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.
*
@@ -372,14 +328,14 @@ public EventLevelValues eventLevel() {
}
/**
- * Set the eventLevel property: Level of event.
+ * Get the isEventSensitive property: If true the event may contains sensitive data. Use the post
+ * events/{trackingId}/fetchEventDetails endpoint to fetch sensitive data see
+ * https://learn.microsoft.com/en-us/azure/service-health/security-advisories-elevated-access.
*
- * @param eventLevel the eventLevel value to set.
- * @return the EventProperties object itself.
+ * @return the isEventSensitive value.
*/
- public EventProperties withEventLevel(EventLevelValues eventLevel) {
- this.eventLevel = eventLevel;
- return this;
+ public Boolean isEventSensitive() {
+ return this.isEventSensitive;
}
/**
@@ -391,17 +347,6 @@ public String externalIncidentId() {
return this.externalIncidentId;
}
- /**
- * Set the externalIncidentId property: The id of the Incident.
- *
- * @param externalIncidentId the externalIncidentId value to set.
- * @return the EventProperties object itself.
- */
- public EventProperties withExternalIncidentId(String externalIncidentId) {
- this.externalIncidentId = externalIncidentId;
- return this;
- }
-
/**
* Get the reason property: The reason for the Incident.
*
@@ -411,17 +356,6 @@ public String reason() {
return this.reason;
}
- /**
- * Set the reason property: The reason for the Incident.
- *
- * @param reason the reason value to set.
- * @return the EventProperties object itself.
- */
- public EventProperties withReason(String reason) {
- this.reason = reason;
- return this;
- }
-
/**
* Get the article property: Article of event.
*
@@ -431,17 +365,6 @@ 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.
*
@@ -451,17 +374,6 @@ 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.
*
@@ -471,17 +383,6 @@ 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.
*
@@ -491,17 +392,6 @@ 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.
*
@@ -511,17 +401,6 @@ 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.
*
@@ -531,17 +410,6 @@ 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.
*
@@ -551,17 +419,6 @@ 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.
*
@@ -571,17 +428,6 @@ 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.
*
@@ -591,20 +437,9 @@ 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.
+ * cause and other details. Use fetchEventDetails endpoint to get description of sensitive events.
*
* @return the description value.
*/
@@ -612,18 +447,6 @@ 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.
*
@@ -633,17 +456,6 @@ 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.
*
@@ -653,17 +465,6 @@ 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
@@ -676,20 +477,6 @@ 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.
*
@@ -699,17 +486,6 @@ 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.
*
@@ -719,17 +495,6 @@ 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.
*
@@ -739,17 +504,6 @@ 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.
*
@@ -759,17 +513,6 @@ 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.
*
@@ -780,102 +523,58 @@ public String 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;
- }
-
- /**
- * Get the maintenanceId property: Unique identifier for planned maintenance event.
- *
- * @return the maintenanceId value.
- */
- public String maintenanceId() {
- return this.maintenanceId;
- }
-
- /**
- * Set the maintenanceId property: Unique identifier for planned maintenance event.
- *
- * @param maintenanceId the maintenanceId value to set.
- * @return the EventProperties object itself.
- */
- public EventProperties withMaintenanceId(String maintenanceId) {
- this.maintenanceId = maintenanceId;
- return this;
- }
-
- /**
- * Get the maintenanceType property: The type of planned maintenance event.
+ * Get the eventTags property: A list of metadata tags associated with the event. Possible values include:
+ * -Action Recommended: Action may be required by you to avoid possible disruptions or mitigate risks for your
+ * services. It is recommended to evaluate these actions and the potential impact on your services.
+ * - False Positive: After investigation, we've determined your service is healthy and service issues did not impact
+ * your services as originally communicated.
+ * - Preliminary PIR: For our largest, most impactful service issues a Preliminary Post Incident Review (PIR) is
+ * published generally within 72 hours of mitigation, to summarize what we have learned so far from the
+ * still-in-progress investigation.
+ * - Final PIR: For service issues, a Final Post Incident Review (PIR) may be published to provide additional
+ * details or learnings. Sometimes this requires us to complete an internal retrospective, generally within 14 days
+ * of mitigation.
*
- * @return the maintenanceType value.
+ * @return the eventTags value.
*/
- public String maintenanceType() {
- return this.maintenanceType;
+ public List eventTags() {
+ return this.eventTags;
}
/**
- * Set the maintenanceType property: The type of planned maintenance event.
+ * Get the newRate property: Billing rate change information - new rate.
*
- * @param maintenanceType the maintenanceType value to set.
- * @return the EventProperties object itself.
+ * @return the newRate value.
*/
- public EventProperties withMaintenanceType(String maintenanceType) {
- this.maintenanceType = maintenanceType;
- return this;
+ public Double newRate() {
+ return this.newRate;
}
/**
- * Get the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
- * Resource Graph locations.
+ * Get the oldRate property: Billing rate change information - old rate.
*
- * @return the argQuery value.
+ * @return the oldRate value.
*/
- public String argQuery() {
- return this.argQuery;
+ public Double oldRate() {
+ return this.oldRate;
}
/**
- * Set the argQuery property: Azure Resource Graph query to fetch the affected resources from their existing Azure
- * Resource Graph locations.
+ * Get the currencyType property: Billing currency type information. Example: USD, CAD.
*
- * @param argQuery the argQuery value to set.
- * @return the EventProperties object itself.
+ * @return the currencyType value.
*/
- public EventProperties withArgQuery(String argQuery) {
- this.argQuery = argQuery;
- return this;
+ public String currencyType() {
+ return this.currencyType;
}
/**
- * Validates the instance.
+ * Get the billingId property: Billing identifier information.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the billingId value.
*/
- 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();
- }
+ public String billingId() {
+ return this.billingId;
}
/**
@@ -893,6 +592,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("header", this.headerProperty);
jsonWriter.writeStringField("level", this.level == null ? null : this.level.toString());
jsonWriter.writeStringField("eventLevel", this.eventLevel == null ? null : this.eventLevel.toString());
+ jsonWriter.writeBooleanField("isEventSensitive", this.isEventSensitive);
jsonWriter.writeStringField("externalIncidentId", this.externalIncidentId);
jsonWriter.writeStringField("reason", this.reason);
jsonWriter.writeJsonField("article", this.article);
@@ -918,9 +618,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeJsonField("additionalInformation", this.additionalInformation);
jsonWriter.writeNumberField("duration", this.duration);
jsonWriter.writeStringField("impactType", this.impactType);
- jsonWriter.writeStringField("maintenanceId", this.maintenanceId);
- jsonWriter.writeStringField("maintenanceType", this.maintenanceType);
- jsonWriter.writeStringField("argQuery", this.argQuery);
+ jsonWriter.writeArrayField("eventTags", this.eventTags, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeNumberField("newRate", this.newRate);
+ jsonWriter.writeNumberField("oldRate", this.oldRate);
+ jsonWriter.writeStringField("currencyType", this.currencyType);
+ jsonWriter.writeStringField("billingId", this.billingId);
return jsonWriter.writeEndObject();
}
@@ -943,6 +645,8 @@ public static EventProperties fromJson(JsonReader jsonReader) throws IOException
deserializedEventProperties.eventType = EventTypeValues.fromString(reader.getString());
} else if ("eventSubType".equals(fieldName)) {
deserializedEventProperties.eventSubType = EventSubTypeValues.fromString(reader.getString());
+ } else if ("advisorRecommendations".equals(fieldName)) {
+ deserializedEventProperties.advisorRecommendations = ApiOperationLink.fromJson(reader);
} else if ("eventSource".equals(fieldName)) {
deserializedEventProperties.eventSource = EventSourceValues.fromString(reader.getString());
} else if ("status".equals(fieldName)) {
@@ -957,6 +661,8 @@ public static EventProperties fromJson(JsonReader jsonReader) throws IOException
deserializedEventProperties.level = LevelValues.fromString(reader.getString());
} else if ("eventLevel".equals(fieldName)) {
deserializedEventProperties.eventLevel = EventLevelValues.fromString(reader.getString());
+ } else if ("isEventSensitive".equals(fieldName)) {
+ deserializedEventProperties.isEventSensitive = reader.getNullable(JsonReader::getBoolean);
} else if ("externalIncidentId".equals(fieldName)) {
deserializedEventProperties.externalIncidentId = reader.getString();
} else if ("reason".equals(fieldName)) {
@@ -1004,12 +710,17 @@ public static EventProperties fromJson(JsonReader jsonReader) throws IOException
deserializedEventProperties.duration = reader.getNullable(JsonReader::getInt);
} else if ("impactType".equals(fieldName)) {
deserializedEventProperties.impactType = reader.getString();
- } else if ("maintenanceId".equals(fieldName)) {
- deserializedEventProperties.maintenanceId = reader.getString();
- } else if ("maintenanceType".equals(fieldName)) {
- deserializedEventProperties.maintenanceType = reader.getString();
- } else if ("argQuery".equals(fieldName)) {
- deserializedEventProperties.argQuery = reader.getString();
+ } else if ("eventTags".equals(fieldName)) {
+ List eventTags = reader.readArray(reader1 -> reader1.getString());
+ deserializedEventProperties.eventTags = eventTags;
+ } else if ("newRate".equals(fieldName)) {
+ deserializedEventProperties.newRate = reader.getNullable(JsonReader::getDouble);
+ } else if ("oldRate".equals(fieldName)) {
+ deserializedEventProperties.oldRate = reader.getNullable(JsonReader::getDouble);
+ } else if ("currencyType".equals(fieldName)) {
+ deserializedEventProperties.currencyType = reader.getString();
+ } else if ("billingId".equals(fieldName)) {
+ deserializedEventProperties.billingId = reader.getString();
} else {
reader.skipChildren();
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityInner.java
index 7538b51c21f2f..21ea23dc9acc9 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityInner.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityInner.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
@@ -18,7 +18,7 @@
/**
* The metadata entity contract.
*/
-@Fluent
+@Immutable
public final class MetadataEntityInner extends ProxyResource {
/*
* The metadata entity properties.
@@ -48,7 +48,7 @@ public final class MetadataEntityInner extends ProxyResource {
/**
* Creates an instance of MetadataEntityInner class.
*/
- public MetadataEntityInner() {
+ private MetadataEntityInner() {
}
/**
@@ -108,20 +108,6 @@ public String displayName() {
return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
- /**
- * Set the displayName property: The display name.
- *
- * @param displayName the displayName value to set.
- * @return the MetadataEntityInner object itself.
- */
- public MetadataEntityInner withDisplayName(String displayName) {
- if (this.innerProperties() == null) {
- this.innerProperties = new MetadataEntityProperties();
- }
- this.innerProperties().withDisplayName(displayName);
- return this;
- }
-
/**
* Get the dependsOn property: The list of keys on which this entity depends on.
*
@@ -131,20 +117,6 @@ public List dependsOn() {
return this.innerProperties() == null ? null : this.innerProperties().dependsOn();
}
- /**
- * Set the dependsOn property: The list of keys on which this entity depends on.
- *
- * @param dependsOn the dependsOn value to set.
- * @return the MetadataEntityInner object itself.
- */
- public MetadataEntityInner withDependsOn(List dependsOn) {
- if (this.innerProperties() == null) {
- this.innerProperties = new MetadataEntityProperties();
- }
- this.innerProperties().withDependsOn(dependsOn);
- return this;
- }
-
/**
* Get the applicableScenarios property: The list of scenarios applicable to this metadata entity.
*
@@ -154,20 +126,6 @@ public List applicableScenarios() {
return this.innerProperties() == null ? null : this.innerProperties().applicableScenarios();
}
- /**
- * Set the applicableScenarios property: The list of scenarios applicable to this metadata entity.
- *
- * @param applicableScenarios the applicableScenarios value to set.
- * @return the MetadataEntityInner object itself.
- */
- public MetadataEntityInner withApplicableScenarios(List applicableScenarios) {
- if (this.innerProperties() == null) {
- this.innerProperties = new MetadataEntityProperties();
- }
- this.innerProperties().withApplicableScenarios(applicableScenarios);
- return this;
- }
-
/**
* Get the supportedValues property: The list of supported values.
*
@@ -177,31 +135,6 @@ public List supportedValues() {
return this.innerProperties() == null ? null : this.innerProperties().supportedValues();
}
- /**
- * Set the supportedValues property: The list of supported values.
- *
- * @param supportedValues the supportedValues value to set.
- * @return the MetadataEntityInner object itself.
- */
- public MetadataEntityInner withSupportedValues(List supportedValues) {
- if (this.innerProperties() == null) {
- this.innerProperties = new MetadataEntityProperties();
- }
- this.innerProperties().withSupportedValues(supportedValues);
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (innerProperties() != null) {
- innerProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityProperties.java
index 8d04587daa89f..31ef12a63344b 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityProperties.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/MetadataEntityProperties.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -17,7 +17,7 @@
/**
* The metadata entity properties.
*/
-@Fluent
+@Immutable
public final class MetadataEntityProperties implements JsonSerializable {
/*
* The display name.
@@ -42,7 +42,7 @@ public final class MetadataEntityProperties implements JsonSerializable dependsOn() {
return this.dependsOn;
}
- /**
- * Set the dependsOn property: The list of keys on which this entity depends on.
- *
- * @param dependsOn the dependsOn value to set.
- * @return the MetadataEntityProperties object itself.
- */
- public MetadataEntityProperties withDependsOn(List dependsOn) {
- this.dependsOn = dependsOn;
- return this;
- }
-
/**
* Get the applicableScenarios property: The list of scenarios applicable to this metadata entity.
*
@@ -94,17 +72,6 @@ public List applicableScenarios() {
return this.applicableScenarios;
}
- /**
- * Set the applicableScenarios property: The list of scenarios applicable to this metadata entity.
- *
- * @param applicableScenarios the applicableScenarios value to set.
- * @return the MetadataEntityProperties object itself.
- */
- public MetadataEntityProperties withApplicableScenarios(List applicableScenarios) {
- this.applicableScenarios = applicableScenarios;
- return this;
- }
-
/**
* Get the supportedValues property: The list of supported values.
*
@@ -114,28 +81,6 @@ public List supportedValues() {
return this.supportedValues;
}
- /**
- * Set the supportedValues property: The list of supported values.
- *
- * @param supportedValues the supportedValues value to set.
- * @return the MetadataEntityProperties object itself.
- */
- public MetadataEntityProperties withSupportedValues(List supportedValues) {
- this.supportedValues = supportedValues;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (supportedValues() != null) {
- supportedValues().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
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 3bef343a283fe..af76d57d4c040 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
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.fluent.models;
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -17,7 +16,7 @@
/**
* Lists the operations response.
*/
-@Fluent
+@Immutable
public final class OperationListResultInner implements JsonSerializable {
/*
* List of operations available in the Microsoft.ResourceHealth resource provider.
@@ -27,7 +26,7 @@ public final class OperationListResultInner implements JsonSerializable value() {
return this.value;
}
- /**
- * Set the value property: List of operations available in the Microsoft.ResourceHealth resource provider.
- *
- * @param value the value value to set.
- * @return the OperationListResultInner object itself.
- */
- public OperationListResultInner withValue(List value) {
- this.value = value;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property value in model OperationListResultInner"));
- } else {
- value().forEach(e -> e.validate());
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(OperationListResultInner.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/package-info.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/package-info.java
index 9adcf72241095..7551f7faa8ccb 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/package-info.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for MicrosoftResourceHealth.
+ * Package containing the inner data models for ResourceHealth.
* The Resource Health Client.
*/
package com.azure.resourcemanager.resourcehealth.fluent.models;
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/package-info.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/package-info.java
index f2dc44c975c98..c4a106b384477 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/package-info.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for MicrosoftResourceHealth.
+ * Package containing the service clients for ResourceHealth.
* The Resource Health Client.
*/
package com.azure.resourcemanager.resourcehealth.fluent;
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusImpl.java
index dd0a22300453e..0b83367933882 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.implementation;
@@ -19,6 +19,14 @@ public final class AvailabilityStatusImpl implements AvailabilityStatus {
this.serviceManager = serviceManager;
}
+ public AvailabilityStatusProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
public String id() {
return this.innerModel().id();
}
@@ -31,14 +39,6 @@ public String type() {
return this.innerModel().type();
}
- public String location() {
- return this.innerModel().location();
- }
-
- public AvailabilityStatusProperties properties() {
- return this.innerModel().properties();
- }
-
public AvailabilityStatusInner innerModel() {
return this.innerObject;
}
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 bc92739a91490..6aa82b753c892 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.implementation;
@@ -27,7 +27,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.resourcehealth.fluent.AvailabilityStatusesClient;
import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusListResult;
+import com.azure.resourcemanager.resourcehealth.implementation.models.AvailabilityStatusListResult;
import reactor.core.publisher.Mono;
/**
@@ -59,44 +59,79 @@ public final class AvailabilityStatusesClientImpl implements AvailabilityStatuse
* The interface defining all the services for MicrosoftResourceHealthAvailabilityStatuses to be used by the proxy
* service to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "MicrosoftResourceHea")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "MicrosoftResourceHealthAvailabilityStatuses")
public interface AvailabilityStatusesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResource(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listBySubscriptionId(@HostParam("$host") String endpoint,
- @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("$expand") String expand,
+ Mono> listBySubscriptionId(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("$filter") String filter, @QueryParam("$expand") String expand,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/availabilityStatuses")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
- @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion,
+ Response listBySubscriptionIdSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@QueryParam("$filter") String filter, @QueryParam("$expand") String expand,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses/current")
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResource(@HostParam("$host") String endpoint,
- @PathParam(value = "resourceUri", encoded = true) String resourceUri,
- @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter,
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
@QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("/{resourceUri}/providers/Microsoft.ResourceHealth/availabilityStatuses")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam(value = "resourceUri", encoded = true) String resourceUri,
- @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter,
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceHealth/availabilityStatuses")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("$filter") String filter,
@QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -104,15 +139,15 @@ Mono> list(@HostParam("$host") String end
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listBySubscriptionIdNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ Response listBySubscriptionIdNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -120,45 +155,78 @@ Mono> listByResourceGroupNext(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
}
/**
- * Lists the current availability status for all the resources in the subscription.
+ * Gets current availability status for a single resource.
*
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return current availability status for a single resource along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listBySubscriptionIdSinglePageAsync(String filter,
+ private Mono> getByResourceWithResponseAsync(String resourceUri, String filter,
String expand) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (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.listBySubscriptionId(this.client.getEndpoint(), this.client.getApiVersion(),
- filter, this.client.getSubscriptionId(), expand, accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(),
- res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .withContext(context -> service.getByResource(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, filter, expand, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Lists the current availability status for all the resources in the subscription.
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 current availability status for a single resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceAsync(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return getByResourceWithResponseAsync(resourceUri, filter, expand)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets current availability status for a single resource.
*
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @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.
@@ -166,27 +234,54 @@ private Mono> listBySubscriptionIdSingleP
* @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) {
+ final String accept = "application/json";
+ return service.getByResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, filter,
+ expand, accept, context);
+ }
+
+ /**
+ * Gets current availability status for a single resource.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 current availability status for a single resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilityStatusInner getByResource(String resourceUri) {
+ final String filter = null;
+ final String expand = null;
+ return getByResourceWithResponse(resourceUri, filter, expand, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists the current availability status for all the resources 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 expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listBySubscriptionIdSinglePageAsync(String filter,
- String expand, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ String expand) {
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listBySubscriptionId(this.client.getEndpoint(), this.client.getApiVersion(), filter,
- this.client.getSubscriptionId(), expand, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ return FluxUtil
+ .withContext(context -> service.listBySubscriptionId(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), filter, expand, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -221,6 +316,26 @@ private PagedFlux listBySubscriptionIdAsync() {
nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink));
}
+ /**
+ * Lists the current availability status for all the resources 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 expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionIdSinglePage(String filter, String expand) {
+ final String accept = "application/json";
+ Response res = service.listBySubscriptionIdSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), filter, expand, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Lists the current availability status for all the resources in the subscription.
*
@@ -231,13 +346,16 @@ private PagedFlux listBySubscriptionIdAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listBySubscriptionIdAsync(String filter, String expand,
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionIdSinglePage(String filter, String expand,
Context context) {
- return new PagedFlux<>(() -> listBySubscriptionIdSinglePageAsync(filter, expand, context),
- nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink, context));
+ final String accept = "application/json";
+ Response res = service.listBySubscriptionIdSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), filter, expand, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -251,7 +369,8 @@ private PagedFlux listBySubscriptionIdAsync(String filt
public PagedIterable listBySubscriptionId() {
final String filter = null;
final String expand = null;
- return new PagedIterable<>(listBySubscriptionIdAsync(filter, expand));
+ return new PagedIterable<>(() -> listBySubscriptionIdSinglePage(filter, expand),
+ nextLink -> listBySubscriptionIdNextSinglePage(nextLink));
}
/**
@@ -268,13 +387,14 @@ public PagedIterable listBySubscriptionId() {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listBySubscriptionId(String filter, String expand, Context context) {
- return new PagedIterable<>(listBySubscriptionIdAsync(filter, expand, context));
+ return new PagedIterable<>(() -> listBySubscriptionIdSinglePage(filter, expand, context),
+ nextLink -> listBySubscriptionIdNextSinglePage(nextLink, context));
}
/**
- * Lists the current availability status for all the resources in the resource group.
+ * Lists all historical availability transitions and impacting events for a single resource.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @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.
@@ -285,72 +405,21 @@ public PagedIterable listBySubscriptionId(String filter
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- String filter, String expand) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
+ private Mono> listSinglePageAsync(String resourceUri, String filter,
+ String expand) {
final String accept = "application/json";
return FluxUtil
- .withContext(
- context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, this.client.getApiVersion(), filter, expand, accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri,
+ filter, expand, accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(),
res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Lists the current availability status for all the resources in the resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param filter The filter to apply on the operation. For more information please see
- * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
- * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- String filter, String expand, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- this.client.getApiVersion(), filter, expand, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
- }
-
- /**
- * Lists the current availability status for all the resources in the resource group.
+ * Lists all historical availability transitions and impacting events for a single resource.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @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.
@@ -360,126 +429,53 @@ private Mono> listByResourceGroupSinglePa
* @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter,
- String expand) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
- }
-
- /**
- * Lists the current availability status for all the resources in the resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- final String filter = null;
- final String expand = null;
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ private PagedFlux listAsync(String resourceUri, String filter, String expand) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, filter, expand),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Lists the current availability status for all the resources in the resource group.
+ * Lists all historical availability transitions and impacting events for a single resource.
*
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param filter The filter to apply on the operation. For more information please see
- * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
- * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
- * @param context The context to associate with this operation.
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 List availabilityStatus operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter,
- String expand, Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * Lists the current availability status for all the resources in the resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
+ private PagedFlux listAsync(String resourceUri) {
final String filter = null;
final String expand = null;
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, expand));
- }
-
- /**
- * Lists the current availability status for all the resources in the resource group.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param filter The filter to apply on the operation. For more information please see
- * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
- * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName, String filter,
- String expand, Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, filter, expand, context));
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, filter, expand),
+ nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Gets current availability status for a single resource.
+ * Lists all historical availability transitions and impacting events 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 resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return current availability status for a single resource along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceWithResponseAsync(String resourceUri, String filter,
- String expand) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceUri == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
- }
+ private PagedResponse listSinglePage(String resourceUri, String filter, String expand) {
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.getByResource(this.client.getEndpoint(), resourceUri,
- this.client.getApiVersion(), filter, expand, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), resourceUri, filter, expand, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Gets current availability status for a single resource.
+ * Lists all historical availability transitions and impacting events 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 resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @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.
@@ -487,54 +483,39 @@ private Mono> getByResourceWithResponseAsync(S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return current availability status for a single resource along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceWithResponseAsync(String resourceUri, String filter,
- String expand, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceUri == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
- }
+ private PagedResponse listSinglePage(String resourceUri, String filter, String expand,
+ Context context) {
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResource(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter,
- expand, accept, context);
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), resourceUri, filter, expand, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Gets current availability status for a single resource.
+ * Lists all historical availability transitions and impacting events 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 resourceUri The fully qualified Azure Resource manager identifier of the 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 current availability status for a single resource on successful completion of {@link Mono}.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceAsync(String resourceUri) {
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri) {
final String filter = null;
final String expand = null;
- return getByResourceWithResponseAsync(resourceUri, filter, expand)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return new PagedIterable<>(() -> listSinglePage(resourceUri, filter, expand),
+ nextLink -> listNextSinglePage(nextLink));
}
/**
- * Gets current availability status for a single resource.
+ * Lists all historical availability transitions and impacting events 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 resourceUri The fully qualified Azure Resource manager identifier of the resource.
* @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.
@@ -542,42 +523,19 @@ private Mono getByResourceAsync(String resourceUri) {
* @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}.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceWithResponse(String resourceUri, String filter, String expand,
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri, String filter, String expand,
Context context) {
- return getByResourceWithResponseAsync(resourceUri, filter, expand, context).block();
- }
-
- /**
- * Gets current availability status for a single resource.
- *
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API 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 current availability status for a single resource.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public AvailabilityStatusInner getByResource(String resourceUri) {
- final String filter = null;
- final String expand = null;
- return getByResourceWithResponse(resourceUri, filter, expand, Context.NONE).getValue();
+ return new PagedIterable<>(() -> listSinglePage(resourceUri, filter, expand, context),
+ nextLink -> listNextSinglePage(nextLink, context));
}
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -588,111 +546,80 @@ public AvailabilityStatusInner getByResource(String resourceUri) {
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceUri, String filter,
- String expand) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceUri == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
- }
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ String filter, String expand) {
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(),
- filter, expand, accept, context))
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, filter, expand, accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(),
res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(String resourceUri, String filter,
- String expand, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceUri == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .list(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter, expand, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, String filter,
+ String expand) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceUri, String filter, String expand) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, filter, expand),
- nextLink -> listNextSinglePageAsync(nextLink));
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ final String filter = null;
+ final String expand = null;
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, filter, expand),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param filter The filter to apply on the operation. For more information please see
+ * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
+ * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceUri) {
- final String filter = null;
- final String expand = null;
- return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, filter, expand),
- nextLink -> listNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName,
+ String filter, String expand) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, filter, expand, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -700,43 +627,40 @@ private PagedFlux listAsync(String resourceUri) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(String resourceUri, String filter, String expand,
- Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, filter, expand, context),
- nextLink -> listNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName,
+ String filter, String expand, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, filter, expand, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceUri) {
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
final String filter = null;
final String expand = null;
- return new PagedIterable<>(listAsync(resourceUri, filter, expand));
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, expand),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
}
/**
- * Lists all historical availability transitions and impacting events for a single resource.
+ * Lists the current availability status for all the resources in the resource group.
*
- * @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 resourceGroupName The name of the resource group. The name is case insensitive.
* @param filter The filter to apply on the operation. For more information please see
* https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
* @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
@@ -747,9 +671,10 @@ public PagedIterable list(String resourceUri) {
* @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(String resourceUri, String filter, String expand,
- Context context) {
- return new PagedIterable<>(listAsync(resourceUri, filter, expand, context));
+ public PagedIterable listByResourceGroup(String resourceGroupName, String filter,
+ String expand, Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, filter, expand, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
}
/**
@@ -764,13 +689,6 @@ public PagedIterable list(String resourceUri, String fi
*/
@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(
@@ -780,6 +698,24 @@ private Mono> listBySubscriptionIdNextSin
.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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionIdNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionIdNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Get the next page of items.
*
@@ -788,24 +724,16 @@ private Mono> listBySubscriptionIdNextSin
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink,
+ private PagedResponse listBySubscriptionIdNextSinglePage(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));
+ Response res
+ = service.listBySubscriptionIdNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -819,23 +747,32 @@ private Mono> listBySubscriptionIdNextSin
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(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."));
- }
+ private Mono> listNextSinglePageAsync(String nextLink) {
final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(),
res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Get the next page of items.
*
@@ -844,24 +781,15 @@ private Mono> listByResourceGroupNextSing
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(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."));
- }
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -875,21 +803,34 @@ private Mono> listByResourceGroupNextSing
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
final String accept = "application/json";
- return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Get the next page of items.
*
@@ -898,22 +839,14 @@ private Mono> listNextSinglePageAsync(Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return the List availabilityStatus operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listNextSinglePageAsync(String nextLink, Context context) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) {
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return 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/AvailabilityStatusesImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/AvailabilityStatusesImpl.java
index ae55a91f58976..5f62942a850ba 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.implementation;
@@ -27,39 +27,12 @@ public AvailabilityStatusesImpl(AvailabilityStatusesClient innerClient,
this.serviceManager = serviceManager;
}
- public PagedIterable listBySubscriptionId() {
- PagedIterable inner = this.serviceClient().listBySubscriptionId();
- return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
- }
-
- public PagedIterable listBySubscriptionId(String filter, String expand, Context context) {
- PagedIterable inner
- = this.serviceClient().listBySubscriptionId(filter, expand, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName, String filter, String expand,
- Context context) {
- PagedIterable inner
- = this.serviceClient().listByResourceGroup(resourceGroupName, filter, expand, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
- }
-
public Response getByResourceWithResponse(String resourceUri, String filter, String expand,
Context context) {
Response inner
= this.serviceClient().getByResourceWithResponse(resourceUri, filter, expand, context);
- if (inner != null) {
- return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
- new AvailabilityStatusImpl(inner.getValue(), this.manager()));
- } else {
- return null;
- }
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AvailabilityStatusImpl(inner.getValue(), this.manager()));
}
public AvailabilityStatus getByResource(String resourceUri) {
@@ -71,6 +44,17 @@ public AvailabilityStatus getByResource(String resourceUri) {
}
}
+ public PagedIterable listBySubscriptionId() {
+ PagedIterable inner = this.serviceClient().listBySubscriptionId();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySubscriptionId(String filter, String expand, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listBySubscriptionId(filter, expand, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
public PagedIterable list(String resourceUri) {
PagedIterable inner = this.serviceClient().list(resourceUri);
return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
@@ -81,6 +65,18 @@ public PagedIterable list(String resourceUri, String filter,
return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
}
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, String filter, String expand,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, filter, expand, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailabilityStatusImpl(inner1, this.manager()));
+ }
+
private AvailabilityStatusesClient serviceClient() {
return this.innerClient;
}
diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesClientImpl.java
index 08998a98a13d0..c1cdc45a904ee 100644
--- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesClientImpl.java
+++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/ChildAvailabilityStatusesClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.resourcehealth.implementation;
@@ -27,7 +27,7 @@
import com.azure.core.util.FluxUtil;
import com.azure.resourcemanager.resourcehealth.fluent.ChildAvailabilityStatusesClient;
import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner;
-import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusListResult;
+import com.azure.resourcemanager.resourcehealth.implementation.models.AvailabilityStatusListResult;
import reactor.core.publisher.Mono;
/**
@@ -59,25 +59,43 @@ public final class ChildAvailabilityStatusesClientImpl implements ChildAvailabil
* The interface defining all the services for MicrosoftResourceHealthChildAvailabilityStatuses to be used by the
* proxy service to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "MicrosoftResourceHea")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "MicrosoftResourceHealthChildAvailabilityStatuses")
public interface ChildAvailabilityStatusesService {
@Headers({ "Content-Type: application/json" })
@Get("/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses/current")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResource(@HostParam("$host") String endpoint,
- @PathParam(value = "resourceUri", encoded = true) String resourceUri,
- @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter,
+ Mono> getByResource(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses/current")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
+ @QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
@QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("/{resourceUri}/providers/Microsoft.ResourceHealth/childAvailabilityStatuses")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam(value = "resourceUri", encoded = true) String resourceUri,
- @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter,
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$filter") String filter,
@QueryParam("$expand") String expand, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -85,16 +103,22 @@ Mono> list(@HostParam("$host") String end
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
}
/**
* Gets current availability status for a single resource.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param resourceUri undefined.
* @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.
@@ -107,58 +131,17 @@ Mono> listNext(
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceWithResponseAsync(String resourceUri, String filter,
String expand) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceUri == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.getByResource(this.client.getEndpoint(), resourceUri,
- this.client.getApiVersion(), filter, expand, accept, context))
+ .withContext(context -> service.getByResource(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, filter, expand, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Gets current availability status for a single resource.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
- * @param filter The filter to apply on the operation. For more information please see
- * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN.
- * @param expand Setting $expand=recommendedactions in url query expands the recommendedactions in the response.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return current availability status for a single resource along with {@link Response} on successful completion of
- * {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceWithResponseAsync(String resourceUri, String filter,
- String expand, Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceUri == null) {
- return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getByResource(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter,
- expand, accept, context);
- }
-
- /**
- * Gets current availability status for a single resource.
- *
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param resourceUri undefined.
* @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.
@@ -175,9 +158,7 @@ private Mono getByResourceAsync(String resourceUri) {
/**
* Gets current availability status for a single resource.
*
- * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type.
- * Currently the API only support one nesting level resource types :
- * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}.
+ * @param resourceUri undefined.
* @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.
@@ -190,15 +171,15 @@ private Mono