diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md index 82d4071ad469..0bf7e0e76b91 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2022-03-17) +- Azure Resource Manager ResourceHealth client library for Java. This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package tag package-2020-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-08) diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/README.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/README.md index 88bdf255d1b1..7ac493972ce9 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-2018-07-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ResourceHealth Management SDK. The Resource Health Client. Package tag package-2020-05-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.resourcemanager azure-resourcemanager-resourcehealth - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on ## Examples +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md) + + ## Troubleshooting ## Next steps diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md new file mode 100644 index 000000000000..1be5f265d1a5 --- /dev/null +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/SAMPLE.md @@ -0,0 +1,126 @@ +# Code snippets and samples + + +## AvailabilityStatuses + +- [GetByResource](#availabilitystatuses_getbyresource) +- [List](#availabilitystatuses_list) +- [ListByResourceGroup](#availabilitystatuses_listbyresourcegroup) +- [ListBySubscriptionId](#availabilitystatuses_listbysubscriptionid) + +## Operations + +- [List](#operations_list) +### AvailabilityStatuses_GetByResource + +```java +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses GetByResource. */ +public final class AvailabilityStatusesGetByResourceSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatus_GetByResource.json + */ + /** + * Sample code: GetCurrentHealthByResource. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void getCurrentHealthByResource( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager + .availabilityStatuses() + .getByResourceWithResponse("resourceUri", null, "recommendedactions", Context.NONE); + } +} +``` + +### AvailabilityStatuses_List + +```java +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses List. */ +public final class AvailabilityStatusesListSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_List.json + */ + /** + * Sample code: GetHealthHistoryByResource. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void getHealthHistoryByResource( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager.availabilityStatuses().list("resourceUri", null, null, Context.NONE); + } +} +``` + +### AvailabilityStatuses_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses ListByResourceGroup. */ +public final class AvailabilityStatusesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListByResourceGroup.json + */ + /** + * Sample code: ListByResourceGroup. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void listByResourceGroup(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager + .availabilityStatuses() + .listByResourceGroup("resourceGroupName", null, "recommendedactions", Context.NONE); + } +} +``` + +### AvailabilityStatuses_ListBySubscriptionId + +```java +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses ListBySubscriptionId. */ +public final class AvailabilityStatusesListBySubscriptionIdSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListBySubscriptionId.json + */ + /** + * Sample code: ListHealthBySubscriptionId. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void listHealthBySubscriptionId( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager.availabilityStatuses().listBySubscriptionId(null, "recommendedactions", Context.NONE); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/Operations_List.json + */ + /** + * Sample code: GetHealthHistoryByResource. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void getHealthHistoryByResource( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +} +``` + diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml index 51f1fa2de558..bf20199f0faf 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/pom.xml @@ -1,55 +1,55 @@ - 4.0.0 - - com.azure - azure-client-sdk-parent - 1.7.0 - ../../parents/azure-client-sdk-parent - + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + - com.azure.resourcemanager - azure-resourcemanager-resourcehealth - 1.0.0-beta.2 - jar + com.azure.resourcemanager + azure-resourcemanager-resourcehealth + 1.0.0-beta.2 + jar - Microsoft Azure SDK for ResourceHealth Management - This package contains Microsoft Azure SDK for ResourceHealth Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Resource Health Client. Package tag package-2018-07-01. - https://github.com/Azure/azure-sdk-for-java + Microsoft Azure SDK for ResourceHealth Management + This package contains Microsoft Azure SDK for ResourceHealth Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Resource Health Client. Package tag package-2020-05-01. + https://github.com/Azure/azure-sdk-for-java - - - The MIT License (MIT) - http://opensource.org/licenses/MIT - repo - - + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + - - https://github.com/Azure/azure-sdk-for-java - scm:git:git@github.com:Azure/azure-sdk-for-java.git - scm:git:git@github.com:Azure/azure-sdk-for-java.git - HEAD - - - - microsoft - Microsoft - - - - UTF-8 - true - - - - com.azure - azure-core - 1.26.0 - - - com.azure - azure-core-management - 1.5.3 - - + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + + + + com.azure + azure-core + 1.26.0 + + + com.azure + azure-core-management + 1.5.3 + + 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 17754bb40c2b..3a75f52e1974 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 @@ -8,8 +8,8 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -17,35 +17,29 @@ import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcehealth.fluent.MicrosoftResourceHealth; import com.azure.resourcemanager.resourcehealth.implementation.AvailabilityStatusesImpl; -import com.azure.resourcemanager.resourcehealth.implementation.EmergingIssuesImpl; -import com.azure.resourcemanager.resourcehealth.implementation.EventsOperationsImpl; import com.azure.resourcemanager.resourcehealth.implementation.MicrosoftResourceHealthBuilder; import com.azure.resourcemanager.resourcehealth.implementation.OperationsImpl; import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatuses; -import com.azure.resourcemanager.resourcehealth.models.EmergingIssues; -import com.azure.resourcemanager.resourcehealth.models.EventsOperations; import com.azure.resourcemanager.resourcehealth.models.Operations; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; /** Entry point to ResourceHealthManager. The Resource Health Client. */ public final class ResourceHealthManager { - private EventsOperations eventsOperations; - private AvailabilityStatuses availabilityStatuses; private Operations operations; - private EmergingIssues emergingIssues; - private final MicrosoftResourceHealth clientObject; private ResourceHealthManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -84,11 +78,12 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; private Duration defaultPollInterval; @@ -128,6 +123,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) { return this; } + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + /** * Sets the retry policy to the HTTP pipeline. * @@ -146,9 +152,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -184,20 +192,33 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi userAgentBuilder.append(" (auto-generated)"); } + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } if (retryPolicy == null) { retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -209,14 +230,6 @@ public ResourceHealthManager authenticate(TokenCredential credential, AzureProfi } } - /** @return Resource collection API of EventsOperations. */ - public EventsOperations eventsOperations() { - if (this.eventsOperations == null) { - this.eventsOperations = new EventsOperationsImpl(clientObject.getEventsOperations(), this); - } - return eventsOperations; - } - /** @return Resource collection API of AvailabilityStatuses. */ public AvailabilityStatuses availabilityStatuses() { if (this.availabilityStatuses == null) { @@ -233,14 +246,6 @@ public Operations operations() { return operations; } - /** @return Resource collection API of EmergingIssues. */ - public EmergingIssues emergingIssues() { - if (this.emergingIssues == null) { - this.emergingIssues = new EmergingIssuesImpl(clientObject.getEmergingIssues(), this); - } - return emergingIssues; - } - /** * @return Wrapped service client MicrosoftResourceHealth providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/AvailabilityStatusesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/AvailabilityStatusesClient.java index 4168ea111f9e..c0c086b78c5f 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 @@ -18,7 +18,7 @@ public interface AvailabilityStatusesClient { * * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySubscriptionId(); @@ -33,7 +33,7 @@ public interface AvailabilityStatusesClient { * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listBySubscriptionId(String filter, String expand, Context context); @@ -45,7 +45,7 @@ public interface AvailabilityStatusesClient { * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -61,7 +61,7 @@ public interface AvailabilityStatusesClient { * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup( @@ -98,7 +98,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return current availability status for a single resource. + * @return current availability status for a single resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceWithResponse( @@ -115,7 +115,7 @@ Response getByResourceWithResponse( * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceUri); @@ -135,7 +135,7 @@ Response getByResourceWithResponse( * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceUri, String filter, String expand, Context context); diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java deleted file mode 100644 index 940f796acc43..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EmergingIssuesClient.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner; - -/** An instance of this class provides access to all the operations defined in EmergingIssuesClient. */ -public interface EmergingIssuesClient { - /** - * Gets Azure services' emerging issues. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EmergingIssuesGetResultInner get(); - - /** - * Gets Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(Context context); - - /** - * Lists Azure services' emerging issues. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} 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 deleted file mode 100644 index 1c715de63ef0..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/EventsOperationsClient.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner; - -/** An instance of this class provides access to all the operations defined in EventsOperationsClient. */ -public interface EventsOperationsClient { - /** - * Lists current service health events in the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists current service health events in the subscription. - * - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, String view, Context context); - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySingleResource(String resourceUri); - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listBySingleResource(String resourceUri, String filter, String view, 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 1697cf46c471..dad8232c60aa 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 @@ -45,13 +45,6 @@ public interface MicrosoftResourceHealth { */ Duration getDefaultPollInterval(); - /** - * Gets the EventsOperationsClient object to access its operations. - * - * @return the EventsOperationsClient object. - */ - EventsOperationsClient getEventsOperations(); - /** * Gets the AvailabilityStatusesClient object to access its operations. * @@ -65,11 +58,4 @@ public interface MicrosoftResourceHealth { * @return the OperationsClient object. */ OperationsClient getOperations(); - - /** - * Gets the EmergingIssuesClient object to access its operations. - * - * @return the EmergingIssuesClient object. - */ - EmergingIssuesClient getEmergingIssues(); } diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/OperationsClient.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/OperationsClient.java index 10e4f68239d0..da83d0af2b67 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 @@ -29,7 +29,7 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations response. + * @return lists the operations response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse(Context context); 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 b2b64a9b5695..6b0d94060095 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 @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcehealth.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** availabilityStatus of a resource. */ @Fluent public final class AvailabilityStatusInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityStatusInner.class); - /* * Azure Resource Manager Identity for the availabilityStatuses resource. */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java deleted file mode 100644 index 229cc6304cd4..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EmergingIssuesGetResultInner.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent; -import com.azure.resourcemanager.resourcehealth.models.StatusBanner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** The Get EmergingIssues operation response. */ -@JsonFlatten -@Fluent -public class EmergingIssuesGetResultInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EmergingIssuesGetResultInner.class); - - /* - * Timestamp for when last time refreshed for ongoing emerging issue. - */ - @JsonProperty(value = "properties.refreshTimestamp") - private OffsetDateTime refreshTimestamp; - - /* - * The list of emerging issues of banner type. - */ - @JsonProperty(value = "properties.statusBanners") - private List statusBanners; - - /* - * The list of emerging issues of active event type. - */ - @JsonProperty(value = "properties.statusActiveEvents") - private List statusActiveEvents; - - /** - * Get the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue. - * - * @return the refreshTimestamp value. - */ - public OffsetDateTime refreshTimestamp() { - return this.refreshTimestamp; - } - - /** - * Set the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue. - * - * @param refreshTimestamp the refreshTimestamp value to set. - * @return the EmergingIssuesGetResultInner object itself. - */ - public EmergingIssuesGetResultInner withRefreshTimestamp(OffsetDateTime refreshTimestamp) { - this.refreshTimestamp = refreshTimestamp; - return this; - } - - /** - * Get the statusBanners property: The list of emerging issues of banner type. - * - * @return the statusBanners value. - */ - public List statusBanners() { - return this.statusBanners; - } - - /** - * Set the statusBanners property: The list of emerging issues of banner type. - * - * @param statusBanners the statusBanners value to set. - * @return the EmergingIssuesGetResultInner object itself. - */ - public EmergingIssuesGetResultInner withStatusBanners(List statusBanners) { - this.statusBanners = statusBanners; - return this; - } - - /** - * Get the statusActiveEvents property: The list of emerging issues of active event type. - * - * @return the statusActiveEvents value. - */ - public List statusActiveEvents() { - return this.statusActiveEvents; - } - - /** - * Set the statusActiveEvents property: The list of emerging issues of active event type. - * - * @param statusActiveEvents the statusActiveEvents value to set. - * @return the EmergingIssuesGetResultInner object itself. - */ - public EmergingIssuesGetResultInner withStatusActiveEvents(List statusActiveEvents) { - this.statusActiveEvents = statusActiveEvents; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (statusBanners() != null) { - statusBanners().forEach(e -> e.validate()); - } - if (statusActiveEvents() != null) { - statusActiveEvents().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java deleted file mode 100644 index ac531472a637..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/fluent/models/EventInner.java +++ /dev/null @@ -1,601 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.models.EventLevelValues; -import com.azure.resourcemanager.resourcehealth.models.EventPropertiesArticle; -import com.azure.resourcemanager.resourcehealth.models.EventPropertiesRecommendedActions; -import com.azure.resourcemanager.resourcehealth.models.EventSourceValues; -import com.azure.resourcemanager.resourcehealth.models.EventStatusValues; -import com.azure.resourcemanager.resourcehealth.models.EventTypeValues; -import com.azure.resourcemanager.resourcehealth.models.Faq; -import com.azure.resourcemanager.resourcehealth.models.Impact; -import com.azure.resourcemanager.resourcehealth.models.LevelValues; -import com.azure.resourcemanager.resourcehealth.models.Link; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Service health event. */ -@JsonFlatten -@Fluent -public class EventInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventInner.class); - - /* - * Type of event. - */ - @JsonProperty(value = "properties.eventType") - private EventTypeValues eventType; - - /* - * Source of event. - */ - @JsonProperty(value = "properties.eventSource") - private EventSourceValues eventSource; - - /* - * Current status of event. - */ - @JsonProperty(value = "properties.status") - private EventStatusValues status; - - /* - * Title text of event. - */ - @JsonProperty(value = "properties.title") - private String title; - - /* - * Summary text of event. - */ - @JsonProperty(value = "properties.summary") - private String summary; - - /* - * Header text of event. - */ - @JsonProperty(value = "properties.header") - private String headerProperty; - - /* - * Level of insight. - */ - @JsonProperty(value = "properties.level") - private LevelValues level; - - /* - * Level of event. - */ - @JsonProperty(value = "properties.eventLevel") - private EventLevelValues eventLevel; - - /* - * Article of event. - */ - @JsonProperty(value = "properties.article") - private EventPropertiesArticle article; - - /* - * Useful links of event. - */ - @JsonProperty(value = "properties.links") - private List links; - - /* - * It provides the Timestamp for when the health impacting event started. - */ - @JsonProperty(value = "properties.impactStartTime") - private OffsetDateTime impactStartTime; - - /* - * It provides the Timestamp for when the health impacting event resolved. - */ - @JsonProperty(value = "properties.impactMitigationTime") - private OffsetDateTime impactMitigationTime; - - /* - * List services impacted by the service health event. - */ - @JsonProperty(value = "properties.impact") - private List impact; - - /* - * Recommended actions of event. - */ - @JsonProperty(value = "properties.recommendedActions") - private EventPropertiesRecommendedActions recommendedActions; - - /* - * Frequently asked questions for the service health event. - */ - @JsonProperty(value = "properties.faqs") - private List faqs; - - /* - * It provides information if the event is High incident rate event or not. - */ - @JsonProperty(value = "properties.isHIR") - private Boolean isHir; - - /* - * Tells if we want to enable or disable Microsoft Support for this event. - */ - @JsonProperty(value = "properties.enableMicrosoftSupport") - private Boolean enableMicrosoftSupport; - - /* - * Tells if we want to enable or disable Microsoft Support for this event. - */ - @JsonProperty(value = "properties.enableChatWithUs") - private Boolean enableChatWithUs; - - /* - * Priority level of the event. - */ - @JsonProperty(value = "properties.priority") - private Integer priority; - - /* - * It provides the Timestamp for when the health impacting event was last - * updated. - */ - @JsonProperty(value = "properties.lastUpdateTime") - private OffsetDateTime lastUpdateTime; - - /* - * Stage for HIR Document - */ - @JsonProperty(value = "properties.hirStage") - private String hirStage; - - /** - * Get the eventType property: Type of event. - * - * @return the eventType value. - */ - public EventTypeValues eventType() { - return this.eventType; - } - - /** - * Set the eventType property: Type of event. - * - * @param eventType the eventType value to set. - * @return the EventInner object itself. - */ - public EventInner withEventType(EventTypeValues eventType) { - this.eventType = eventType; - return this; - } - - /** - * Get the eventSource property: Source of event. - * - * @return the eventSource value. - */ - public EventSourceValues eventSource() { - return this.eventSource; - } - - /** - * Set the eventSource property: Source of event. - * - * @param eventSource the eventSource value to set. - * @return the EventInner object itself. - */ - public EventInner withEventSource(EventSourceValues eventSource) { - this.eventSource = eventSource; - return this; - } - - /** - * Get the status property: Current status of event. - * - * @return the status value. - */ - public EventStatusValues status() { - return this.status; - } - - /** - * Set the status property: Current status of event. - * - * @param status the status value to set. - * @return the EventInner object itself. - */ - public EventInner withStatus(EventStatusValues status) { - this.status = status; - return this; - } - - /** - * Get the title property: Title text of event. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Title text of event. - * - * @param title the title value to set. - * @return the EventInner object itself. - */ - public EventInner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the summary property: Summary text of event. - * - * @return the summary value. - */ - public String summary() { - return this.summary; - } - - /** - * Set the summary property: Summary text of event. - * - * @param summary the summary value to set. - * @return the EventInner object itself. - */ - public EventInner withSummary(String summary) { - this.summary = summary; - return this; - } - - /** - * Get the headerProperty property: Header text of event. - * - * @return the headerProperty value. - */ - public String headerProperty() { - return this.headerProperty; - } - - /** - * Set the headerProperty property: Header text of event. - * - * @param headerProperty the headerProperty value to set. - * @return the EventInner object itself. - */ - public EventInner withHeaderProperty(String headerProperty) { - this.headerProperty = headerProperty; - return this; - } - - /** - * Get the level property: Level of insight. - * - * @return the level value. - */ - public LevelValues level() { - return this.level; - } - - /** - * Set the level property: Level of insight. - * - * @param level the level value to set. - * @return the EventInner object itself. - */ - public EventInner withLevel(LevelValues level) { - this.level = level; - return this; - } - - /** - * Get the eventLevel property: Level of event. - * - * @return the eventLevel value. - */ - public EventLevelValues eventLevel() { - return this.eventLevel; - } - - /** - * Set the eventLevel property: Level of event. - * - * @param eventLevel the eventLevel value to set. - * @return the EventInner object itself. - */ - public EventInner withEventLevel(EventLevelValues eventLevel) { - this.eventLevel = eventLevel; - return this; - } - - /** - * Get the article property: Article of event. - * - * @return the article value. - */ - public EventPropertiesArticle article() { - return this.article; - } - - /** - * Set the article property: Article of event. - * - * @param article the article value to set. - * @return the EventInner object itself. - */ - public EventInner withArticle(EventPropertiesArticle article) { - this.article = article; - return this; - } - - /** - * Get the links property: Useful links of event. - * - * @return the links value. - */ - public List links() { - return this.links; - } - - /** - * Set the links property: Useful links of event. - * - * @param links the links value to set. - * @return the EventInner object itself. - */ - public EventInner withLinks(List links) { - this.links = links; - return this; - } - - /** - * Get the impactStartTime property: It provides the Timestamp for when the health impacting event started. - * - * @return the impactStartTime value. - */ - public OffsetDateTime impactStartTime() { - return this.impactStartTime; - } - - /** - * Set the impactStartTime property: It provides the Timestamp for when the health impacting event started. - * - * @param impactStartTime the impactStartTime value to set. - * @return the EventInner object itself. - */ - public EventInner withImpactStartTime(OffsetDateTime impactStartTime) { - this.impactStartTime = impactStartTime; - return this; - } - - /** - * Get the impactMitigationTime property: It provides the Timestamp for when the health impacting event resolved. - * - * @return the impactMitigationTime value. - */ - public OffsetDateTime impactMitigationTime() { - return this.impactMitigationTime; - } - - /** - * Set the impactMitigationTime property: It provides the Timestamp for when the health impacting event resolved. - * - * @param impactMitigationTime the impactMitigationTime value to set. - * @return the EventInner object itself. - */ - public EventInner withImpactMitigationTime(OffsetDateTime impactMitigationTime) { - this.impactMitigationTime = impactMitigationTime; - return this; - } - - /** - * Get the impact property: List services impacted by the service health event. - * - * @return the impact value. - */ - public List impact() { - return this.impact; - } - - /** - * Set the impact property: List services impacted by the service health event. - * - * @param impact the impact value to set. - * @return the EventInner object itself. - */ - public EventInner withImpact(List impact) { - this.impact = impact; - return this; - } - - /** - * Get the recommendedActions property: Recommended actions of event. - * - * @return the recommendedActions value. - */ - public EventPropertiesRecommendedActions recommendedActions() { - return this.recommendedActions; - } - - /** - * Set the recommendedActions property: Recommended actions of event. - * - * @param recommendedActions the recommendedActions value to set. - * @return the EventInner object itself. - */ - public EventInner withRecommendedActions(EventPropertiesRecommendedActions recommendedActions) { - this.recommendedActions = recommendedActions; - return this; - } - - /** - * Get the faqs property: Frequently asked questions for the service health event. - * - * @return the faqs value. - */ - public List faqs() { - return this.faqs; - } - - /** - * Set the faqs property: Frequently asked questions for the service health event. - * - * @param faqs the faqs value to set. - * @return the EventInner object itself. - */ - public EventInner withFaqs(List faqs) { - this.faqs = faqs; - return this; - } - - /** - * Get the isHir property: It provides information if the event is High incident rate event or not. - * - * @return the isHir value. - */ - public Boolean isHir() { - return this.isHir; - } - - /** - * Set the isHir property: It provides information if the event is High incident rate event or not. - * - * @param isHir the isHir value to set. - * @return the EventInner object itself. - */ - public EventInner withIsHir(Boolean isHir) { - this.isHir = isHir; - return this; - } - - /** - * Get the enableMicrosoftSupport property: Tells if we want to enable or disable Microsoft Support for this event. - * - * @return the enableMicrosoftSupport value. - */ - public Boolean enableMicrosoftSupport() { - return this.enableMicrosoftSupport; - } - - /** - * Set the enableMicrosoftSupport property: Tells if we want to enable or disable Microsoft Support for this event. - * - * @param enableMicrosoftSupport the enableMicrosoftSupport value to set. - * @return the EventInner object itself. - */ - public EventInner withEnableMicrosoftSupport(Boolean enableMicrosoftSupport) { - this.enableMicrosoftSupport = enableMicrosoftSupport; - return this; - } - - /** - * Get the enableChatWithUs property: Tells if we want to enable or disable Microsoft Support for this event. - * - * @return the enableChatWithUs value. - */ - public Boolean enableChatWithUs() { - return this.enableChatWithUs; - } - - /** - * Set the enableChatWithUs property: Tells if we want to enable or disable Microsoft Support for this event. - * - * @param enableChatWithUs the enableChatWithUs value to set. - * @return the EventInner object itself. - */ - public EventInner withEnableChatWithUs(Boolean enableChatWithUs) { - this.enableChatWithUs = enableChatWithUs; - return this; - } - - /** - * Get the priority property: Priority level of the event. - * - * @return the priority value. - */ - public Integer priority() { - return this.priority; - } - - /** - * Set the priority property: Priority level of the event. - * - * @param priority the priority value to set. - * @return the EventInner object itself. - */ - public EventInner withPriority(Integer priority) { - this.priority = priority; - return this; - } - - /** - * Get the lastUpdateTime property: It provides the Timestamp for when the health impacting event was last updated. - * - * @return the lastUpdateTime value. - */ - public OffsetDateTime lastUpdateTime() { - return this.lastUpdateTime; - } - - /** - * Set the lastUpdateTime property: It provides the Timestamp for when the health impacting event was last updated. - * - * @param lastUpdateTime the lastUpdateTime value to set. - * @return the EventInner object itself. - */ - public EventInner withLastUpdateTime(OffsetDateTime lastUpdateTime) { - this.lastUpdateTime = lastUpdateTime; - return this; - } - - /** - * Get the hirStage property: Stage for HIR Document. - * - * @return the hirStage value. - */ - public String hirStage() { - return this.hirStage; - } - - /** - * Set the hirStage property: Stage for HIR Document. - * - * @param hirStage the hirStage value to set. - * @return the EventInner object itself. - */ - public EventInner withHirStage(String hirStage) { - this.hirStage = hirStage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (article() != null) { - article().validate(); - } - if (links() != null) { - links().forEach(e -> e.validate()); - } - if (impact() != null) { - impact().forEach(e -> e.validate()); - } - if (recommendedActions() != null) { - recommendedActions().validate(); - } - if (faqs() != null) { - faqs().forEach(e -> e.validate()); - } - } -} 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 f39902d2590c..0d803918dc0e 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 @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcehealth.models.Operation; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Lists the operations response. */ @Fluent public final class OperationListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class); - /* * List of operations available in the resourcehealth resource provider. */ @@ -49,11 +46,13 @@ public OperationListResultInner withValue(List value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model OperationListResultInner")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(OperationListResultInner.class); } 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 d1043f1ad547..3a9fa218ab9c 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 @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcehealth.fluent.AvailabilityStatusesClient; import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner; import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatusListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in AvailabilityStatusesClient. */ public final class AvailabilityStatusesClientImpl implements AvailabilityStatusesClient { - private final ClientLogger logger = new ClientLogger(AvailabilityStatusesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AvailabilityStatusesService service; @@ -155,7 +152,8 @@ Mono> listNext( * @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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionIdSinglePageAsync( @@ -207,7 +205,8 @@ 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 the List availabilityStatus operation response. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionIdSinglePageAsync( @@ -255,7 +254,7 @@ 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 the List availabilityStatus operation response. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySubscriptionIdAsync(String filter, String expand) { @@ -269,7 +268,7 @@ private PagedFlux listBySubscriptionIdAsync(String filt * * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySubscriptionIdAsync() { @@ -290,7 +289,7 @@ 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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listBySubscriptionIdAsync( @@ -305,7 +304,7 @@ private PagedFlux listBySubscriptionIdAsync( * * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySubscriptionId() { @@ -324,7 +323,7 @@ public PagedIterable listBySubscriptionId() { * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listBySubscriptionId(String filter, String expand, Context context) { @@ -341,7 +340,8 @@ public PagedIterable listBySubscriptionId(String filter * @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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -399,7 +399,8 @@ private Mono> listByResourceGroupSinglePa * @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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -453,7 +454,7 @@ private Mono> listByResourceGroupSinglePa * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -470,7 +471,7 @@ private PagedFlux listByResourceGroupAsync( * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -492,7 +493,7 @@ private PagedFlux listByResourceGroupAsync(String resou * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync( @@ -509,7 +510,7 @@ private PagedFlux listByResourceGroupAsync( * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -529,7 +530,7 @@ public PagedIterable listByResourceGroup(String resourc * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup( @@ -551,7 +552,8 @@ public PagedIterable listByResourceGroup( * @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. + * @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( @@ -596,7 +598,8 @@ private Mono> getByResourceWithResponseAsync( * @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. + * @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( @@ -631,7 +634,7 @@ private Mono> getByResourceWithResponseAsync( * @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. + * @return current availability status for a single resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceAsync(String resourceUri, String filter, String expand) { @@ -657,7 +660,7 @@ private Mono getByResourceAsync(String resourceUri, 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 current availability status for a single resource. + * @return current availability status for a single resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceAsync(String resourceUri) { @@ -709,7 +712,7 @@ public AvailabilityStatusInner getByResource(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. + * @return current availability status for a single resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceWithResponse( @@ -731,7 +734,8 @@ public Response getByResourceWithResponse( * @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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -785,7 +789,8 @@ private Mono> listSinglePageAsync( * @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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -828,7 +833,7 @@ private Mono> listSinglePageAsync( * @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. + * @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) { @@ -847,7 +852,7 @@ private PagedFlux listAsync(String resourceUri, String * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceUri) { @@ -872,7 +877,7 @@ 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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -893,7 +898,7 @@ private PagedFlux listAsync( * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceUri) { @@ -917,7 +922,7 @@ public PagedIterable list(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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -932,7 +937,8 @@ public PagedIterable list( * @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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink) { @@ -969,7 +975,8 @@ 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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionIdNextSinglePageAsync( @@ -1005,7 +1012,8 @@ 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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1042,7 +1050,8 @@ 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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -1078,7 +1087,8 @@ 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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1114,7 +1124,8 @@ 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. + * @return the List availabilityStatus operation response along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { 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 8731309e44c1..0bba94049df7 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 @@ -13,10 +13,9 @@ import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner; import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatus; import com.azure.resourcemanager.resourcehealth.models.AvailabilityStatuses; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AvailabilityStatusesImpl implements AvailabilityStatuses { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityStatusesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AvailabilityStatusesImpl.class); private final AvailabilityStatusesClient innerClient; diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesClientImpl.java deleted file mode 100644 index 7b15becdf2b8..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesClientImpl.java +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.fluent.EmergingIssuesClient; -import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner; -import com.azure.resourcemanager.resourcehealth.models.EmergingIssueListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EmergingIssuesClient. */ -public final class EmergingIssuesClientImpl implements EmergingIssuesClient { - private final ClientLogger logger = new ClientLogger(EmergingIssuesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final EmergingIssuesService service; - - /** The service client containing this operation class. */ - private final MicrosoftResourceHealthImpl client; - - /** - * Initializes an instance of EmergingIssuesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EmergingIssuesClientImpl(MicrosoftResourceHealthImpl client) { - this.service = - RestProxy.create(EmergingIssuesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MicrosoftResourceHealthEmergingIssues to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "MicrosoftResourceHea") - private interface EmergingIssuesService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.ResourceHealth/emergingIssues/{issueName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("issueName") String issueName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.ResourceHealth/emergingIssues") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets Azure services' emerging issues. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String issueName = "default"; - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service.get(this.client.getEndpoint(), issueName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String issueName = "default"; - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), issueName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets Azure services' emerging issues. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync() { - return getWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets Azure services' emerging issues. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EmergingIssuesGetResultInner get() { - return getAsync().block(); - } - - /** - * Gets Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(Context context) { - return getWithResponseAsync(context).block(); - } - - /** - * Lists Azure services' emerging issues. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists Azure services' emerging issues. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Azure services' emerging issues. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java deleted file mode 100644 index a0f288fa88b9..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesGetResultImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.implementation; - -import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner; -import com.azure.resourcemanager.resourcehealth.models.EmergingIssuesGetResult; -import com.azure.resourcemanager.resourcehealth.models.StatusActiveEvent; -import com.azure.resourcemanager.resourcehealth.models.StatusBanner; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class EmergingIssuesGetResultImpl implements EmergingIssuesGetResult { - private EmergingIssuesGetResultInner innerObject; - - private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager; - - EmergingIssuesGetResultImpl( - EmergingIssuesGetResultInner innerObject, - com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public OffsetDateTime refreshTimestamp() { - return this.innerModel().refreshTimestamp(); - } - - public List statusBanners() { - List inner = this.innerModel().statusBanners(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List statusActiveEvents() { - List inner = this.innerModel().statusActiveEvents(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EmergingIssuesGetResultInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesImpl.java deleted file mode 100644 index 40b0f49440a0..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EmergingIssuesImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.fluent.EmergingIssuesClient; -import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner; -import com.azure.resourcemanager.resourcehealth.models.EmergingIssues; -import com.azure.resourcemanager.resourcehealth.models.EmergingIssuesGetResult; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class EmergingIssuesImpl implements EmergingIssues { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EmergingIssuesImpl.class); - - private final EmergingIssuesClient innerClient; - - private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager; - - public EmergingIssuesImpl( - EmergingIssuesClient innerClient, - com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public EmergingIssuesGetResult get() { - EmergingIssuesGetResultInner inner = this.serviceClient().get(); - if (inner != null) { - return new EmergingIssuesGetResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(Context context) { - Response inner = this.serviceClient().getWithResponse(context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EmergingIssuesGetResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new EmergingIssuesGetResultImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new EmergingIssuesGetResultImpl(inner1, this.manager())); - } - - private EmergingIssuesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java deleted file mode 100644 index 9640c2075cde..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventImpl.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.implementation; - -import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner; -import com.azure.resourcemanager.resourcehealth.models.Event; -import com.azure.resourcemanager.resourcehealth.models.EventLevelValues; -import com.azure.resourcemanager.resourcehealth.models.EventPropertiesArticle; -import com.azure.resourcemanager.resourcehealth.models.EventPropertiesRecommendedActions; -import com.azure.resourcemanager.resourcehealth.models.EventSourceValues; -import com.azure.resourcemanager.resourcehealth.models.EventStatusValues; -import com.azure.resourcemanager.resourcehealth.models.EventTypeValues; -import com.azure.resourcemanager.resourcehealth.models.Faq; -import com.azure.resourcemanager.resourcehealth.models.Impact; -import com.azure.resourcemanager.resourcehealth.models.LevelValues; -import com.azure.resourcemanager.resourcehealth.models.Link; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class EventImpl implements Event { - private EventInner innerObject; - - private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager; - - EventImpl(EventInner innerObject, com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EventTypeValues eventType() { - return this.innerModel().eventType(); - } - - public EventSourceValues eventSource() { - return this.innerModel().eventSource(); - } - - public EventStatusValues status() { - return this.innerModel().status(); - } - - public String title() { - return this.innerModel().title(); - } - - public String summary() { - return this.innerModel().summary(); - } - - public String headerProperty() { - return this.innerModel().headerProperty(); - } - - public LevelValues level() { - return this.innerModel().level(); - } - - public EventLevelValues eventLevel() { - return this.innerModel().eventLevel(); - } - - public EventPropertiesArticle article() { - return this.innerModel().article(); - } - - public List links() { - List inner = this.innerModel().links(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public OffsetDateTime impactStartTime() { - return this.innerModel().impactStartTime(); - } - - public OffsetDateTime impactMitigationTime() { - return this.innerModel().impactMitigationTime(); - } - - public List impact() { - List inner = this.innerModel().impact(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public EventPropertiesRecommendedActions recommendedActions() { - return this.innerModel().recommendedActions(); - } - - public List faqs() { - List inner = this.innerModel().faqs(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Boolean isHir() { - return this.innerModel().isHir(); - } - - public Boolean enableMicrosoftSupport() { - return this.innerModel().enableMicrosoftSupport(); - } - - public Boolean enableChatWithUs() { - return this.innerModel().enableChatWithUs(); - } - - public Integer priority() { - return this.innerModel().priority(); - } - - public OffsetDateTime lastUpdateTime() { - return this.innerModel().lastUpdateTime(); - } - - public String hirStage() { - return this.innerModel().hirStage(); - } - - public EventInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsClientImpl.java deleted file mode 100644 index 5e6ee032e406..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsClientImpl.java +++ /dev/null @@ -1,643 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.fluent.EventsOperationsClient; -import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner; -import com.azure.resourcemanager.resourcehealth.models.Events; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EventsOperationsClient. */ -public final class EventsOperationsClientImpl implements EventsOperationsClient { - private final ClientLogger logger = new ClientLogger(EventsOperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final EventsOperationsService service; - - /** The service client containing this operation class. */ - private final MicrosoftResourceHealthImpl client; - - /** - * Initializes an instance of EventsOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EventsOperationsClientImpl(MicrosoftResourceHealthImpl client) { - this.service = - RestProxy.create(EventsOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for MicrosoftResourceHealthEventsOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "MicrosoftResourceHea") - private interface EventsOperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceHealth/events") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("view") String view, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/{resourceUri}/providers/Microsoft.ResourceHealth/events") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySingleResource( - @HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @QueryParam("view") String view, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionIdNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySingleResourceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists current service health events in the subscription. - * - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, String view) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - filter, - this.client.getSubscriptionId(), - view, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists current service health events in the 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 view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, String view, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - filter, - this.client.getSubscriptionId(), - view, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists current service health events in the 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 view setting view=full expands the article parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, String view) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter, view), nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink)); - } - - /** - * Lists current service health events in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String filter = null; - final String view = null; - return new PagedFlux<>( - () -> listSinglePageAsync(filter, view), nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink)); - } - - /** - * Lists current service health events in the subscription. - * - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, String view, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(filter, view, context), - nextLink -> listBySubscriptionIdNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists current service health events in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String filter = null; - final String view = null; - return new PagedIterable<>(listAsync(filter, view)); - } - - /** - * Lists current service health events in the subscription. - * - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, String view, Context context) { - return new PagedIterable<>(listAsync(filter, view, context)); - } - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySingleResourceSinglePageAsync( - String resourceUri, String filter, String view) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listBySingleResource( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - filter, - view, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySingleResourceSinglePageAsync( - String resourceUri, String filter, String view, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySingleResource( - this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), filter, view, accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySingleResourceAsync(String resourceUri, String filter, String view) { - return new PagedFlux<>( - () -> listBySingleResourceSinglePageAsync(resourceUri, filter, view), - nextLink -> listBySingleResourceNextSinglePageAsync(nextLink)); - } - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySingleResourceAsync(String resourceUri) { - final String filter = null; - final String view = null; - return new PagedFlux<>( - () -> listBySingleResourceSinglePageAsync(resourceUri, filter, view), - nextLink -> listBySingleResourceNextSinglePageAsync(nextLink)); - } - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listBySingleResourceAsync( - String resourceUri, String filter, String view, Context context) { - return new PagedFlux<>( - () -> listBySingleResourceSinglePageAsync(resourceUri, filter, view, context), - nextLink -> listBySingleResourceNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySingleResource(String resourceUri) { - final String filter = null; - final String view = null; - return new PagedIterable<>(listBySingleResourceAsync(resourceUri, filter, view)); - } - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listBySingleResource( - String resourceUri, String filter, String view, Context context) { - return new PagedIterable<>(listBySingleResourceAsync(resourceUri, filter, view, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionIdNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionIdNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySubscriptionIdNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySingleResourceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySingleResourceNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySingleResourceNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listBySingleResourceNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsImpl.java deleted file mode 100644 index 3288902df952..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/EventsOperationsImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.fluent.EventsOperationsClient; -import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner; -import com.azure.resourcemanager.resourcehealth.models.Event; -import com.azure.resourcemanager.resourcehealth.models.EventsOperations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class EventsOperationsImpl implements EventsOperations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventsOperationsImpl.class); - - private final EventsOperationsClient innerClient; - - private final com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager; - - public EventsOperationsImpl( - EventsOperationsClient innerClient, - com.azure.resourcemanager.resourcehealth.ResourceHealthManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, String view, Context context) { - PagedIterable inner = this.serviceClient().list(filter, view, context); - return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - public PagedIterable listBySingleResource(String resourceUri) { - PagedIterable inner = this.serviceClient().listBySingleResource(resourceUri); - return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - public PagedIterable listBySingleResource(String resourceUri, String filter, String view, Context context) { - PagedIterable inner = this.serviceClient().listBySingleResource(resourceUri, filter, view, context); - return Utils.mapPage(inner, inner1 -> new EventImpl(inner1, this.manager())); - } - - private EventsOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java index 08bb8042b05d..136d1586af53 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/MicrosoftResourceHealthImpl.java @@ -22,8 +22,6 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.resourcehealth.fluent.AvailabilityStatusesClient; -import com.azure.resourcemanager.resourcehealth.fluent.EmergingIssuesClient; -import com.azure.resourcemanager.resourcehealth.fluent.EventsOperationsClient; import com.azure.resourcemanager.resourcehealth.fluent.MicrosoftResourceHealth; import com.azure.resourcemanager.resourcehealth.fluent.OperationsClient; import java.io.IOException; @@ -39,8 +37,6 @@ /** Initializes a new instance of the MicrosoftResourceHealthImpl type. */ @ServiceClient(builder = MicrosoftResourceHealthBuilder.class) public final class MicrosoftResourceHealthImpl implements MicrosoftResourceHealth { - private final ClientLogger logger = new ClientLogger(MicrosoftResourceHealthImpl.class); - /** * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of * the URI for every service call. @@ -117,18 +113,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The EventsOperationsClient object to access its operations. */ - private final EventsOperationsClient eventsOperations; - - /** - * Gets the EventsOperationsClient object to access its operations. - * - * @return the EventsOperationsClient object. - */ - public EventsOperationsClient getEventsOperations() { - return this.eventsOperations; - } - /** The AvailabilityStatusesClient object to access its operations. */ private final AvailabilityStatusesClient availabilityStatuses; @@ -153,18 +137,6 @@ public OperationsClient getOperations() { return this.operations; } - /** The EmergingIssuesClient object to access its operations. */ - private final EmergingIssuesClient emergingIssues; - - /** - * Gets the EmergingIssuesClient object to access its operations. - * - * @return the EmergingIssuesClient object. - */ - public EmergingIssuesClient getEmergingIssues() { - return this.emergingIssues; - } - /** * Initializes an instance of MicrosoftResourceHealth client. * @@ -188,11 +160,9 @@ public EmergingIssuesClient getEmergingIssues() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2018-07-01"; - this.eventsOperations = new EventsOperationsClientImpl(this); + this.apiVersion = "2020-05-01"; this.availabilityStatuses = new AvailabilityStatusesClientImpl(this); this.operations = new OperationsClientImpl(this); - this.emergingIssues = new EmergingIssuesClientImpl(this); } /** @@ -278,7 +248,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -337,4 +307,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(MicrosoftResourceHealthImpl.class); } diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsClientImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsClientImpl.java index a4698871d4b0..516f17ca3bb2 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsClientImpl.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsClientImpl.java @@ -20,15 +20,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcehealth.fluent.OperationsClient; import com.azure.resourcemanager.resourcehealth.fluent.models.OperationListResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -69,7 +66,7 @@ Mono> list( * * @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 lists the operations response. + * @return lists the operations response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync() { @@ -93,7 +90,7 @@ private Mono> listWithResponseAsync() { * @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 lists the operations response. + * @return lists the operations response along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync(Context context) { @@ -113,7 +110,7 @@ private Mono> listWithResponseAsync(Context c * * @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 lists the operations response. + * @return lists the operations response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync() { @@ -147,7 +144,7 @@ public OperationListResultInner list() { * @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 lists the operations response. + * @return lists the operations response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse(Context context) { diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsImpl.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsImpl.java index e937e1e9be1e..7e5467d8790b 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsImpl.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/implementation/OperationsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.resourcehealth.fluent.models.OperationListResultInner; import com.azure.resourcemanager.resourcehealth.models.OperationListResult; import com.azure.resourcemanager.resourcehealth.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusListResult.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusListResult.java index 3b87ebf3cafd..43f64d81834b 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusListResult.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusListResult.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.resourcehealth.fluent.models.AvailabilityStatusInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The List availabilityStatus operation response. */ @Fluent public final class AvailabilityStatusListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityStatusListResult.class); - /* * The list of availabilityStatuses. */ @@ -78,7 +75,7 @@ public AvailabilityStatusListResult withNextLink(String nextLink) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property value in model AvailabilityStatusListResult")); @@ -86,4 +83,6 @@ public void validate() { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(AvailabilityStatusListResult.class); } diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusProperties.java index 8ec23780b284..9ca72b94ece6 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusProperties.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusProperties.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; @@ -14,8 +12,6 @@ /** Properties of availability state. */ @Fluent public final class AvailabilityStatusProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailabilityStatusProperties.class); - /* * Availability status of the resource. When it is null, this * availabilityStatus object represents an availability impacting event @@ -23,6 +19,12 @@ public final class AvailabilityStatusProperties { @JsonProperty(value = "availabilityState") private AvailabilityStateValues availabilityState; + /* + * Title description of the availability status. + */ + @JsonProperty(value = "title") + private String title; + /* * Summary description of the availability status. */ @@ -149,6 +151,26 @@ public AvailabilityStatusProperties withAvailabilityState(AvailabilityStateValue return this; } + /** + * Get the title property: Title description of the availability status. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Title description of the availability status. + * + * @param title the title value to set. + * @return the AvailabilityStatusProperties object itself. + */ + public AvailabilityStatusProperties withTitle(String title) { + this.title = title; + return this; + } + /** * Get the summary property: Summary description of the availability status. * diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusPropertiesRecentlyResolved.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusPropertiesRecentlyResolved.java index 44df2d6d03af..fe089240f681 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusPropertiesRecentlyResolved.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatusPropertiesRecentlyResolved.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -16,9 +14,6 @@ */ @Fluent public final class AvailabilityStatusPropertiesRecentlyResolved { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(AvailabilityStatusPropertiesRecentlyResolved.class); - /* * Timestamp for when the availabilityState changed to Unavailable */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatuses.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatuses.java index 46e5d5a3507d..1088f560dd02 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatuses.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/AvailabilityStatuses.java @@ -15,7 +15,7 @@ public interface AvailabilityStatuses { * * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ PagedIterable listBySubscriptionId(); @@ -29,7 +29,7 @@ public interface AvailabilityStatuses { * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ PagedIterable listBySubscriptionId(String filter, String expand, Context context); @@ -40,7 +40,7 @@ public interface AvailabilityStatuses { * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -55,7 +55,7 @@ public interface AvailabilityStatuses { * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ PagedIterable listByResourceGroup( String resourceGroupName, String filter, String expand, Context context); @@ -90,7 +90,7 @@ PagedIterable listByResourceGroup( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return current availability status for a single resource. + * @return current availability status for a single resource along with {@link Response}. */ Response getByResourceWithResponse( String resourceUri, String filter, String expand, Context context); @@ -106,7 +106,7 @@ Response getByResourceWithResponse( * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceUri); @@ -125,7 +125,7 @@ Response getByResourceWithResponse( * @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. + * @return the List availabilityStatus operation response as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceUri, String filter, String expand, Context context); } diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssueImpact.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssueImpact.java deleted file mode 100644 index 3de6a7d4e857..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssueImpact.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Object of the emerging issue impact on services and regions. */ -@Fluent -public final class EmergingIssueImpact { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EmergingIssueImpact.class); - - /* - * The impacted service id. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The impacted service name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The list of impacted regions for corresponding emerging issues. - */ - @JsonProperty(value = "regions") - private List regions; - - /** - * Get the id property: The impacted service id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The impacted service id. - * - * @param id the id value to set. - * @return the EmergingIssueImpact object itself. - */ - public EmergingIssueImpact withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: The impacted service name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The impacted service name. - * - * @param name the name value to set. - * @return the EmergingIssueImpact object itself. - */ - public EmergingIssueImpact withName(String name) { - this.name = name; - return this; - } - - /** - * Get the regions property: The list of impacted regions for corresponding emerging issues. - * - * @return the regions value. - */ - public List regions() { - return this.regions; - } - - /** - * Set the regions property: The list of impacted regions for corresponding emerging issues. - * - * @param regions the regions value to set. - * @return the EmergingIssueImpact object itself. - */ - public EmergingIssueImpact withRegions(List regions) { - this.regions = regions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (regions() != null) { - regions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssueListResult.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssueListResult.java deleted file mode 100644 index 0049e5c849b5..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssueListResult.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The list of emerging issues. */ -@Fluent -public final class EmergingIssueListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EmergingIssueListResult.class); - - /* - * The list of emerging issues. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The link used to get the next page of emerging issues. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: The list of emerging issues. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of emerging issues. - * - * @param value the value value to set. - * @return the EmergingIssueListResult object itself. - */ - public EmergingIssueListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link used to get the next page of emerging issues. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of emerging issues. - * - * @param nextLink the nextLink value to set. - * @return the EmergingIssueListResult object itself. - */ - public EmergingIssueListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssues.java deleted file mode 100644 index 91dbfaa273e4..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssues.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of EmergingIssues. */ -public interface EmergingIssues { - /** - * Gets Azure services' emerging issues. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - EmergingIssuesGetResult get(); - - /** - * Gets Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure services' emerging issues. - */ - Response getWithResponse(Context context); - - /** - * Lists Azure services' emerging issues. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - PagedIterable list(); - - /** - * Lists Azure services' emerging issues. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of emerging issues. - */ - PagedIterable list(Context context); -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssuesGetResult.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssuesGetResult.java deleted file mode 100644 index d52415f61455..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EmergingIssuesGetResult.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of EmergingIssuesGetResult. */ -public interface EmergingIssuesGetResult { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the refreshTimestamp property: Timestamp for when last time refreshed for ongoing emerging issue. - * - * @return the refreshTimestamp value. - */ - OffsetDateTime refreshTimestamp(); - - /** - * Gets the statusBanners property: The list of emerging issues of banner type. - * - * @return the statusBanners value. - */ - List statusBanners(); - - /** - * Gets the statusActiveEvents property: The list of emerging issues of active event type. - * - * @return the statusActiveEvents value. - */ - List statusActiveEvents(); - - /** - * Gets the inner com.azure.resourcemanager.resourcehealth.fluent.models.EmergingIssuesGetResultInner object. - * - * @return the inner object. - */ - EmergingIssuesGetResultInner innerModel(); -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Event.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Event.java deleted file mode 100644 index f4b96c35199d..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Event.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** An immutable client-side representation of Event. */ -public interface Event { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the eventType property: Type of event. - * - * @return the eventType value. - */ - EventTypeValues eventType(); - - /** - * Gets the eventSource property: Source of event. - * - * @return the eventSource value. - */ - EventSourceValues eventSource(); - - /** - * Gets the status property: Current status of event. - * - * @return the status value. - */ - EventStatusValues status(); - - /** - * Gets the title property: Title text of event. - * - * @return the title value. - */ - String title(); - - /** - * Gets the summary property: Summary text of event. - * - * @return the summary value. - */ - String summary(); - - /** - * Gets the headerProperty property: Header text of event. - * - * @return the headerProperty value. - */ - String headerProperty(); - - /** - * Gets the level property: Level of insight. - * - * @return the level value. - */ - LevelValues level(); - - /** - * Gets the eventLevel property: Level of event. - * - * @return the eventLevel value. - */ - EventLevelValues eventLevel(); - - /** - * Gets the article property: Article of event. - * - * @return the article value. - */ - EventPropertiesArticle article(); - - /** - * Gets the links property: Useful links of event. - * - * @return the links value. - */ - List links(); - - /** - * Gets the impactStartTime property: It provides the Timestamp for when the health impacting event started. - * - * @return the impactStartTime value. - */ - OffsetDateTime impactStartTime(); - - /** - * Gets the impactMitigationTime property: It provides the Timestamp for when the health impacting event resolved. - * - * @return the impactMitigationTime value. - */ - OffsetDateTime impactMitigationTime(); - - /** - * Gets the impact property: List services impacted by the service health event. - * - * @return the impact value. - */ - List impact(); - - /** - * Gets the recommendedActions property: Recommended actions of event. - * - * @return the recommendedActions value. - */ - EventPropertiesRecommendedActions recommendedActions(); - - /** - * Gets the faqs property: Frequently asked questions for the service health event. - * - * @return the faqs value. - */ - List faqs(); - - /** - * Gets the isHir property: It provides information if the event is High incident rate event or not. - * - * @return the isHir value. - */ - Boolean isHir(); - - /** - * Gets the enableMicrosoftSupport property: Tells if we want to enable or disable Microsoft Support for this event. - * - * @return the enableMicrosoftSupport value. - */ - Boolean enableMicrosoftSupport(); - - /** - * Gets the enableChatWithUs property: Tells if we want to enable or disable Microsoft Support for this event. - * - * @return the enableChatWithUs value. - */ - Boolean enableChatWithUs(); - - /** - * Gets the priority property: Priority level of the event. - * - * @return the priority value. - */ - Integer priority(); - - /** - * Gets the lastUpdateTime property: It provides the Timestamp for when the health impacting event was last updated. - * - * @return the lastUpdateTime value. - */ - OffsetDateTime lastUpdateTime(); - - /** - * Gets the hirStage property: Stage for HIR Document. - * - * @return the hirStage value. - */ - String hirStage(); - - /** - * Gets the inner com.azure.resourcemanager.resourcehealth.fluent.models.EventInner object. - * - * @return the inner object. - */ - EventInner innerModel(); -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventLevelValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventLevelValues.java deleted file mode 100644 index 5804000305d7..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventLevelValues.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EventLevelValues. */ -public final class EventLevelValues extends ExpandableStringEnum { - /** Static value Critical for EventLevelValues. */ - public static final EventLevelValues CRITICAL = fromString("Critical"); - - /** Static value Warning for EventLevelValues. */ - public static final EventLevelValues WARNING = fromString("Warning"); - - /** Static value Informational for EventLevelValues. */ - public static final EventLevelValues INFORMATIONAL = fromString("Informational"); - - /** - * Creates or finds a EventLevelValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding EventLevelValues. - */ - @JsonCreator - public static EventLevelValues fromString(String name) { - return fromString(name, EventLevelValues.class); - } - - /** @return known EventLevelValues values. */ - public static Collection values() { - return values(EventLevelValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesArticle.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesArticle.java deleted file mode 100644 index 93ba0c58e0b7..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesArticle.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Article of event. */ -@Fluent -public final class EventPropertiesArticle { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventPropertiesArticle.class); - - /* - * Article content of event. - */ - @JsonProperty(value = "articleContent") - private String articleContent; - - /** - * Get the articleContent property: Article content of event. - * - * @return the articleContent value. - */ - public String articleContent() { - return this.articleContent; - } - - /** - * Set the articleContent property: Article content of event. - * - * @param articleContent the articleContent value to set. - * @return the EventPropertiesArticle object itself. - */ - public EventPropertiesArticle withArticleContent(String articleContent) { - this.articleContent = articleContent; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesRecommendedActions.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesRecommendedActions.java deleted file mode 100644 index 6a658d9ec16b..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesRecommendedActions.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Recommended actions of event. */ -@Fluent -public final class EventPropertiesRecommendedActions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventPropertiesRecommendedActions.class); - - /* - * Recommended action title for the service health event. - */ - @JsonProperty(value = "message") - private String message; - - /* - * Recommended actions for the service health event. - */ - @JsonProperty(value = "actions") - private List actions; - - /* - * Recommended action locale for the service health event. - */ - @JsonProperty(value = "localeCode") - private String localeCode; - - /** - * Get the message property: Recommended action title for the service health event. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Recommended action title for the service health event. - * - * @param message the message value to set. - * @return the EventPropertiesRecommendedActions object itself. - */ - public EventPropertiesRecommendedActions withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the actions property: Recommended actions for the service health event. - * - * @return the actions value. - */ - public List actions() { - return this.actions; - } - - /** - * Set the actions property: Recommended actions for the service health event. - * - * @param actions the actions value to set. - * @return the EventPropertiesRecommendedActions object itself. - */ - public EventPropertiesRecommendedActions withActions(List actions) { - this.actions = actions; - return this; - } - - /** - * Get the localeCode property: Recommended action locale for the service health event. - * - * @return the localeCode value. - */ - public String localeCode() { - return this.localeCode; - } - - /** - * Set the localeCode property: Recommended action locale for the service health event. - * - * @param localeCode the localeCode value to set. - * @return the EventPropertiesRecommendedActions object itself. - */ - public EventPropertiesRecommendedActions withLocaleCode(String localeCode) { - this.localeCode = localeCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (actions() != null) { - actions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesRecommendedActionsItem.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesRecommendedActionsItem.java deleted file mode 100644 index 31dead64d9ee..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventPropertiesRecommendedActionsItem.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Recommended action for the service health event. */ -@Fluent -public final class EventPropertiesRecommendedActionsItem { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventPropertiesRecommendedActionsItem.class); - - /* - * Recommended action group Id for the service health event. - */ - @JsonProperty(value = "groupId") - private Integer groupId; - - /* - * Recommended action text - */ - @JsonProperty(value = "actionText") - private String actionText; - - /** - * Get the groupId property: Recommended action group Id for the service health event. - * - * @return the groupId value. - */ - public Integer groupId() { - return this.groupId; - } - - /** - * Set the groupId property: Recommended action group Id for the service health event. - * - * @param groupId the groupId value to set. - * @return the EventPropertiesRecommendedActionsItem object itself. - */ - public EventPropertiesRecommendedActionsItem withGroupId(Integer groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get the actionText property: Recommended action text. - * - * @return the actionText value. - */ - public String actionText() { - return this.actionText; - } - - /** - * Set the actionText property: Recommended action text. - * - * @param actionText the actionText value to set. - * @return the EventPropertiesRecommendedActionsItem object itself. - */ - public EventPropertiesRecommendedActionsItem withActionText(String actionText) { - this.actionText = actionText; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventSourceValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventSourceValues.java deleted file mode 100644 index eb584c722371..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventSourceValues.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EventSourceValues. */ -public final class EventSourceValues extends ExpandableStringEnum { - /** Static value ResourceHealth for EventSourceValues. */ - public static final EventSourceValues RESOURCE_HEALTH = fromString("ResourceHealth"); - - /** Static value ServiceHealth for EventSourceValues. */ - public static final EventSourceValues SERVICE_HEALTH = fromString("ServiceHealth"); - - /** - * Creates or finds a EventSourceValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding EventSourceValues. - */ - @JsonCreator - public static EventSourceValues fromString(String name) { - return fromString(name, EventSourceValues.class); - } - - /** @return known EventSourceValues values. */ - public static Collection values() { - return values(EventSourceValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventStatusValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventStatusValues.java deleted file mode 100644 index a5811edf1fe5..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventStatusValues.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EventStatusValues. */ -public final class EventStatusValues extends ExpandableStringEnum { - /** Static value Active for EventStatusValues. */ - public static final EventStatusValues ACTIVE = fromString("Active"); - - /** Static value Resolved for EventStatusValues. */ - public static final EventStatusValues RESOLVED = fromString("Resolved"); - - /** - * Creates or finds a EventStatusValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding EventStatusValues. - */ - @JsonCreator - public static EventStatusValues fromString(String name) { - return fromString(name, EventStatusValues.class); - } - - /** @return known EventStatusValues values. */ - public static Collection values() { - return values(EventStatusValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventTypeValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventTypeValues.java deleted file mode 100644 index df3dc0f57aaa..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventTypeValues.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EventTypeValues. */ -public final class EventTypeValues extends ExpandableStringEnum { - /** Static value ServiceIssue for EventTypeValues. */ - public static final EventTypeValues SERVICE_ISSUE = fromString("ServiceIssue"); - - /** Static value PlannedMaintenance for EventTypeValues. */ - public static final EventTypeValues PLANNED_MAINTENANCE = fromString("PlannedMaintenance"); - - /** Static value HealthAdvisory for EventTypeValues. */ - public static final EventTypeValues HEALTH_ADVISORY = fromString("HealthAdvisory"); - - /** Static value RCA for EventTypeValues. */ - public static final EventTypeValues RCA = fromString("RCA"); - - /** - * Creates or finds a EventTypeValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding EventTypeValues. - */ - @JsonCreator - public static EventTypeValues fromString(String name) { - return fromString(name, EventTypeValues.class); - } - - /** @return known EventTypeValues values. */ - public static Collection values() { - return values(EventTypeValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Events.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Events.java deleted file mode 100644 index 49f4b4417b2d..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Events.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourcehealth.fluent.models.EventInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List events operation response. */ -@Fluent -public final class Events { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Events.class); - - /* - * The list of event. - */ - @JsonProperty(value = "value", required = true) - private List value; - - /* - * The URI to fetch the next page of events. Call ListNext() with this URI - * to fetch the next page of events. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: The list of event. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of event. - * - * @param value the value value to set. - * @return the Events object itself. - */ - public Events withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to fetch the next page of events. Call ListNext() with this URI to fetch the - * next page of events. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to fetch the next page of events. Call ListNext() with this URI to fetch the - * next page of events. - * - * @param nextLink the nextLink value to set. - * @return the Events object itself. - */ - public Events withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw logger - .logExceptionAsError(new IllegalArgumentException("Missing required property value in model Events")); - } else { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventsOperations.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventsOperations.java deleted file mode 100644 index 88c5f62ebeae..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/EventsOperations.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of EventsOperations. */ -public interface EventsOperations { - /** - * Lists current service health events in the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - PagedIterable list(); - - /** - * Lists current service health events in the subscription. - * - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - PagedIterable list(String filter, String view, Context context); - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - PagedIterable listBySingleResource(String resourceUri); - - /** - * Lists current service health events for given resource. - * - * @param resourceUri The fully qualified ID of the resource, including the resource name and resource type. - * Currently the API support not nested and one nesting level resource types : - * /subscriptions/{subscriptionId}/resourceGroups/{resource-group-name}/providers/{resource-provider-name}/{resource-type}/{resource-name} - * and - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resource-provider-name}/{parentResourceType}/{parentResourceName}/{resourceType}/{resourceName}. - * @param filter The filter to apply on the operation. For more information please see - * https://docs.microsoft.com/en-us/rest/api/apimanagement/apis?redirectedfrom=MSDN. - * @param view setting view=full expands the article parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List events operation response. - */ - PagedIterable listBySingleResource(String resourceUri, String filter, String view, Context context); -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Faq.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Faq.java deleted file mode 100644 index 4f3feb242b1b..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Faq.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Frequently asked question for the service health event. */ -@Fluent -public final class Faq { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Faq.class); - - /* - * FAQ question for the service health event. - */ - @JsonProperty(value = "question") - private String question; - - /* - * FAQ answer for the service health event. - */ - @JsonProperty(value = "answer") - private String answer; - - /* - * FAQ locale for the service health event. - */ - @JsonProperty(value = "localeCode") - private String localeCode; - - /** - * Get the question property: FAQ question for the service health event. - * - * @return the question value. - */ - public String question() { - return this.question; - } - - /** - * Set the question property: FAQ question for the service health event. - * - * @param question the question value to set. - * @return the Faq object itself. - */ - public Faq withQuestion(String question) { - this.question = question; - return this; - } - - /** - * Get the answer property: FAQ answer for the service health event. - * - * @return the answer value. - */ - public String answer() { - return this.answer; - } - - /** - * Set the answer property: FAQ answer for the service health event. - * - * @param answer the answer value to set. - * @return the Faq object itself. - */ - public Faq withAnswer(String answer) { - this.answer = answer; - return this; - } - - /** - * Get the localeCode property: FAQ locale for the service health event. - * - * @return the localeCode value. - */ - public String localeCode() { - return this.localeCode; - } - - /** - * Set the localeCode property: FAQ locale for the service health event. - * - * @param localeCode the localeCode value to set. - * @return the Faq object itself. - */ - public Faq withLocaleCode(String localeCode) { - this.localeCode = localeCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Impact.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Impact.java deleted file mode 100644 index 9a579d91c8f6..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Impact.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Azure service impacted by the service health event. */ -@Fluent -public final class Impact { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Impact.class); - - /* - * Impacted service name. - */ - @JsonProperty(value = "impactedService") - private String impactedService; - - /* - * List regions impacted by the service health event. - */ - @JsonProperty(value = "impactedRegions") - private List impactedRegions; - - /** - * Get the impactedService property: Impacted service name. - * - * @return the impactedService value. - */ - public String impactedService() { - return this.impactedService; - } - - /** - * Set the impactedService property: Impacted service name. - * - * @param impactedService the impactedService value to set. - * @return the Impact object itself. - */ - public Impact withImpactedService(String impactedService) { - this.impactedService = impactedService; - return this; - } - - /** - * Get the impactedRegions property: List regions impacted by the service health event. - * - * @return the impactedRegions value. - */ - public List impactedRegions() { - return this.impactedRegions; - } - - /** - * Set the impactedRegions property: List regions impacted by the service health event. - * - * @param impactedRegions the impactedRegions value to set. - * @return the Impact object itself. - */ - public Impact withImpactedRegions(List impactedRegions) { - this.impactedRegions = impactedRegions; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (impactedRegions() != null) { - impactedRegions().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ImpactedRegion.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ImpactedRegion.java deleted file mode 100644 index 501e8c687e06..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ImpactedRegion.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Object of impacted region. */ -@Fluent -public final class ImpactedRegion { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImpactedRegion.class); - - /* - * The impacted region id. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The impacted region name. - */ - @JsonProperty(value = "name") - private String name; - - /** - * Get the id property: The impacted region id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The impacted region id. - * - * @param id the id value to set. - * @return the ImpactedRegion object itself. - */ - public ImpactedRegion withId(String id) { - this.id = id; - return this; - } - - /** - * Get the name property: The impacted region name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The impacted region name. - * - * @param name the name value to set. - * @return the ImpactedRegion object itself. - */ - public ImpactedRegion withName(String name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ImpactedServiceRegion.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ImpactedServiceRegion.java deleted file mode 100644 index f599df0d469f..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ImpactedServiceRegion.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Azure region impacted by the service health event. */ -@Fluent -public final class ImpactedServiceRegion { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ImpactedServiceRegion.class); - - /* - * Impacted region name. - */ - @JsonProperty(value = "impactedRegion") - private String impactedRegion; - - /* - * Current status of event in the region. - */ - @JsonProperty(value = "status") - private EventStatusValues status; - - /* - * List subscription impacted by the service health event. - */ - @JsonProperty(value = "impactedSubscriptions") - private List impactedSubscriptions; - - /* - * It provides the Timestamp for when the last update for the service - * health event. - */ - @JsonProperty(value = "lastUpdateTime") - private OffsetDateTime lastUpdateTime; - - /* - * List of updates for given service health event. - */ - @JsonProperty(value = "updates") - private List updates; - - /** - * Get the impactedRegion property: Impacted region name. - * - * @return the impactedRegion value. - */ - public String impactedRegion() { - return this.impactedRegion; - } - - /** - * Set the impactedRegion property: Impacted region name. - * - * @param impactedRegion the impactedRegion value to set. - * @return the ImpactedServiceRegion object itself. - */ - public ImpactedServiceRegion withImpactedRegion(String impactedRegion) { - this.impactedRegion = impactedRegion; - return this; - } - - /** - * Get the status property: Current status of event in the region. - * - * @return the status value. - */ - public EventStatusValues status() { - return this.status; - } - - /** - * Set the status property: Current status of event in the region. - * - * @param status the status value to set. - * @return the ImpactedServiceRegion object itself. - */ - public ImpactedServiceRegion withStatus(EventStatusValues status) { - this.status = status; - return this; - } - - /** - * Get the impactedSubscriptions property: List subscription impacted by the service health event. - * - * @return the impactedSubscriptions value. - */ - public List impactedSubscriptions() { - return this.impactedSubscriptions; - } - - /** - * Set the impactedSubscriptions property: List subscription impacted by the service health event. - * - * @param impactedSubscriptions the impactedSubscriptions value to set. - * @return the ImpactedServiceRegion object itself. - */ - public ImpactedServiceRegion withImpactedSubscriptions(List impactedSubscriptions) { - this.impactedSubscriptions = impactedSubscriptions; - return this; - } - - /** - * Get the lastUpdateTime property: It provides the Timestamp for when the last update for the service health event. - * - * @return the lastUpdateTime value. - */ - public OffsetDateTime lastUpdateTime() { - return this.lastUpdateTime; - } - - /** - * Set the lastUpdateTime property: It provides the Timestamp for when the last update for the service health event. - * - * @param lastUpdateTime the lastUpdateTime value to set. - * @return the ImpactedServiceRegion object itself. - */ - public ImpactedServiceRegion withLastUpdateTime(OffsetDateTime lastUpdateTime) { - this.lastUpdateTime = lastUpdateTime; - return this; - } - - /** - * Get the updates property: List of updates for given service health event. - * - * @return the updates value. - */ - public List updates() { - return this.updates; - } - - /** - * Set the updates property: List of updates for given service health event. - * - * @param updates the updates value to set. - * @return the ImpactedServiceRegion object itself. - */ - public ImpactedServiceRegion withUpdates(List updates) { - this.updates = updates; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (updates() != null) { - updates().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LevelValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LevelValues.java deleted file mode 100644 index 0c05f1be5210..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LevelValues.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LevelValues. */ -public final class LevelValues extends ExpandableStringEnum { - /** Static value Critical for LevelValues. */ - public static final LevelValues CRITICAL = fromString("Critical"); - - /** Static value Warning for LevelValues. */ - public static final LevelValues WARNING = fromString("Warning"); - - /** - * Creates or finds a LevelValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding LevelValues. - */ - @JsonCreator - public static LevelValues fromString(String name) { - return fromString(name, LevelValues.class); - } - - /** @return known LevelValues values. */ - public static Collection values() { - return values(LevelValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Link.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Link.java deleted file mode 100644 index a5b0005a10b1..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Link.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Useful links for service health event. */ -@Fluent -public final class Link { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Link.class); - - /* - * Type of link. - */ - @JsonProperty(value = "type") - private LinkTypeValues type; - - /* - * Display text of link. - */ - @JsonProperty(value = "displayText") - private LinkDisplayText displayText; - - /* - * It provides the name of portal extension to produce link for given - * service health event. - */ - @JsonProperty(value = "extensionName") - private String extensionName; - - /* - * It provides the name of portal extension blade to produce link for given - * service health event. - */ - @JsonProperty(value = "bladeName") - private String bladeName; - - /* - * It provides a map of parameter name and value for portal extension blade - * to produce lik for given service health event. - */ - @JsonProperty(value = "parameters") - private Object parameters; - - /** - * Get the type property: Type of link. - * - * @return the type value. - */ - public LinkTypeValues type() { - return this.type; - } - - /** - * Set the type property: Type of link. - * - * @param type the type value to set. - * @return the Link object itself. - */ - public Link withType(LinkTypeValues type) { - this.type = type; - return this; - } - - /** - * Get the displayText property: Display text of link. - * - * @return the displayText value. - */ - public LinkDisplayText displayText() { - return this.displayText; - } - - /** - * Set the displayText property: Display text of link. - * - * @param displayText the displayText value to set. - * @return the Link object itself. - */ - public Link withDisplayText(LinkDisplayText displayText) { - this.displayText = displayText; - return this; - } - - /** - * Get the extensionName property: It provides the name of portal extension to produce link for given service health - * event. - * - * @return the extensionName value. - */ - public String extensionName() { - return this.extensionName; - } - - /** - * Set the extensionName property: It provides the name of portal extension to produce link for given service health - * event. - * - * @param extensionName the extensionName value to set. - * @return the Link object itself. - */ - public Link withExtensionName(String extensionName) { - this.extensionName = extensionName; - return this; - } - - /** - * Get the bladeName property: It provides the name of portal extension blade to produce link for given service - * health event. - * - * @return the bladeName value. - */ - public String bladeName() { - return this.bladeName; - } - - /** - * Set the bladeName property: It provides the name of portal extension blade to produce link for given service - * health event. - * - * @param bladeName the bladeName value to set. - * @return the Link object itself. - */ - public Link withBladeName(String bladeName) { - this.bladeName = bladeName; - return this; - } - - /** - * Get the parameters property: It provides a map of parameter name and value for portal extension blade to produce - * lik for given service health event. - * - * @return the parameters value. - */ - public Object parameters() { - return this.parameters; - } - - /** - * Set the parameters property: It provides a map of parameter name and value for portal extension blade to produce - * lik for given service health event. - * - * @param parameters the parameters value to set. - * @return the Link object itself. - */ - public Link withParameters(Object parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayText() != null) { - displayText().validate(); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LinkDisplayText.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LinkDisplayText.java deleted file mode 100644 index ac26c9eec3c1..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LinkDisplayText.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Display text of link. */ -@Fluent -public final class LinkDisplayText { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkDisplayText.class); - - /* - * Display text of link. - */ - @JsonProperty(value = "value") - private String value; - - /* - * Localized display text of link. - */ - @JsonProperty(value = "localizedValue") - private String localizedValue; - - /** - * Get the value property: Display text of link. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Display text of link. - * - * @param value the value value to set. - * @return the LinkDisplayText object itself. - */ - public LinkDisplayText withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the localizedValue property: Localized display text of link. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Set the localizedValue property: Localized display text of link. - * - * @param localizedValue the localizedValue value to set. - * @return the LinkDisplayText object itself. - */ - public LinkDisplayText withLocalizedValue(String localizedValue) { - this.localizedValue = localizedValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LinkTypeValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LinkTypeValues.java deleted file mode 100644 index 7abfce67e11b..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/LinkTypeValues.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LinkTypeValues. */ -public final class LinkTypeValues extends ExpandableStringEnum { - /** Static value Button for LinkTypeValues. */ - public static final LinkTypeValues BUTTON = fromString("Button"); - - /** Static value Hyperlink for LinkTypeValues. */ - public static final LinkTypeValues HYPERLINK = fromString("Hyperlink"); - - /** - * Creates or finds a LinkTypeValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding LinkTypeValues. - */ - @JsonCreator - public static LinkTypeValues fromString(String name) { - return fromString(name, LinkTypeValues.class); - } - - /** @return known LinkTypeValues values. */ - public static Collection values() { - return values(LinkTypeValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/MetadataEntity.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/MetadataEntity.java deleted file mode 100644 index 3f53757da0fb..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/MetadataEntity.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The metadata entity contract. */ -@JsonFlatten -@Fluent -public class MetadataEntity extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataEntity.class); - - /* - * The display name. - */ - @JsonProperty(value = "properties.displayName") - private String displayName; - - /* - * The list of keys on which this entity depends on. - */ - @JsonProperty(value = "properties.dependsOn") - private List dependsOn; - - /* - * The list of scenarios applicable to this metadata entity. - */ - @JsonProperty(value = "properties.applicableScenarios") - private List applicableScenarios; - - /* - * The list of supported values. - */ - @JsonProperty(value = "properties.supportedValues") - private List supportedValues; - - /** - * Get the displayName property: The display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name. - * - * @param displayName the displayName value to set. - * @return the MetadataEntity object itself. - */ - public MetadataEntity withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the dependsOn property: The list of keys on which this entity depends on. - * - * @return the dependsOn value. - */ - public List dependsOn() { - return this.dependsOn; - } - - /** - * Set the dependsOn property: The list of keys on which this entity depends on. - * - * @param dependsOn the dependsOn value to set. - * @return the MetadataEntity object itself. - */ - public MetadataEntity withDependsOn(List dependsOn) { - this.dependsOn = dependsOn; - return this; - } - - /** - * Get the applicableScenarios property: The list of scenarios applicable to this metadata entity. - * - * @return the applicableScenarios value. - */ - public List applicableScenarios() { - return this.applicableScenarios; - } - - /** - * Set the applicableScenarios property: The list of scenarios applicable to this metadata entity. - * - * @param applicableScenarios the applicableScenarios value to set. - * @return the MetadataEntity object itself. - */ - public MetadataEntity withApplicableScenarios(List applicableScenarios) { - this.applicableScenarios = applicableScenarios; - return this; - } - - /** - * Get the supportedValues property: The list of supported values. - * - * @return the supportedValues value. - */ - public List supportedValues() { - return this.supportedValues; - } - - /** - * Set the supportedValues property: The list of supported values. - * - * @param supportedValues the supportedValues value to set. - * @return the MetadataEntity object itself. - */ - public MetadataEntity withSupportedValues(List supportedValues) { - this.supportedValues = supportedValues; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedValues() != null) { - supportedValues().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/MetadataSupportedValueDetail.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/MetadataSupportedValueDetail.java deleted file mode 100644 index 8a7b641c530a..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/MetadataSupportedValueDetail.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The metadata supported value detail. */ -@Fluent -public final class MetadataSupportedValueDetail { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataSupportedValueDetail.class); - - /* - * The id. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The display name. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /** - * Get the id property: The id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The id. - * - * @param id the id value to set. - * @return the MetadataSupportedValueDetail object itself. - */ - public MetadataSupportedValueDetail withId(String id) { - this.id = id; - return this; - } - - /** - * Get the displayName property: The display name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The display name. - * - * @param displayName the displayName value to set. - * @return the MetadataSupportedValueDetail object itself. - */ - public MetadataSupportedValueDetail withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operation.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operation.java index 2aed930ca43a..9c8d3433857f 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operation.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operation.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operation available in the resourcehealth resource provider. */ @Fluent public final class Operation { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Operation.class); - /* * Name of the operation. */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/OperationDisplay.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/OperationDisplay.java index ef53ad6befb0..8b706512782f 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/OperationDisplay.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of the operation. */ @Fluent public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * Provider name. */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operations.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operations.java index 1475ea587065..f519977cc1a3 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operations.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Operations.java @@ -25,7 +25,7 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists the operations response. + * @return lists the operations response along with {@link Response}. */ Response listWithResponse(Context context); } diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/RecommendedAction.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/RecommendedAction.java index 24e9f3fa1797..b2b7307aeb6f 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/RecommendedAction.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/RecommendedAction.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Lists actions the user can take based on the current availabilityState of the resource. */ @Fluent public final class RecommendedAction { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendedAction.class); - /* * Recommended action. */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Scenario.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Scenario.java deleted file mode 100644 index 4f49b6a0b2de..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Scenario.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Scenario. */ -public final class Scenario extends ExpandableStringEnum { - /** Static value Alerts for Scenario. */ - public static final Scenario ALERTS = fromString("Alerts"); - - /** - * Creates or finds a Scenario from its string representation. - * - * @param name a name to look for. - * @return the corresponding Scenario. - */ - @JsonCreator - public static Scenario fromString(String name) { - return fromString(name, Scenario.class); - } - - /** @return known Scenario values. */ - public static Collection values() { - return values(Scenario.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEvent.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEvent.java index 288d419d4170..314eb06f09d2 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEvent.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEvent.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Lists the service impacting events that may be affecting the health of the resource. */ @Fluent public final class ServiceImpactingEvent { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceImpactingEvent.class); - /* * Timestamp for when the event started. */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventIncidentProperties.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventIncidentProperties.java index 9f53acf133be..2c1a0260dd36 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventIncidentProperties.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventIncidentProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of the service impacting event. */ @Fluent public final class ServiceImpactingEventIncidentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceImpactingEventIncidentProperties.class); - /* * Title of the incident. */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventStatus.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventStatus.java index 1132465dc00b..28965361551c 100644 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventStatus.java +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/ServiceImpactingEventStatus.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.resourcehealth.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Status of the service impacting event. */ @Fluent public final class ServiceImpactingEventStatus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceImpactingEventStatus.class); - /* * Current status of the event */ diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/SeverityValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/SeverityValues.java deleted file mode 100644 index 591d9fd04e69..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/SeverityValues.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SeverityValues. */ -public final class SeverityValues extends ExpandableStringEnum { - /** Static value Information for SeverityValues. */ - public static final SeverityValues INFORMATION = fromString("Information"); - - /** Static value Warning for SeverityValues. */ - public static final SeverityValues WARNING = fromString("Warning"); - - /** Static value Error for SeverityValues. */ - public static final SeverityValues ERROR = fromString("Error"); - - /** - * Creates or finds a SeverityValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding SeverityValues. - */ - @JsonCreator - public static SeverityValues fromString(String name) { - return fromString(name, SeverityValues.class); - } - - /** @return known SeverityValues values. */ - public static Collection values() { - return values(SeverityValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StageValues.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StageValues.java deleted file mode 100644 index 815e46bca205..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StageValues.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for StageValues. */ -public final class StageValues extends ExpandableStringEnum { - /** Static value Active for StageValues. */ - public static final StageValues ACTIVE = fromString("Active"); - - /** Static value Resolve for StageValues. */ - public static final StageValues RESOLVE = fromString("Resolve"); - - /** Static value Archived for StageValues. */ - public static final StageValues ARCHIVED = fromString("Archived"); - - /** - * Creates or finds a StageValues from its string representation. - * - * @param name a name to look for. - * @return the corresponding StageValues. - */ - @JsonCreator - public static StageValues fromString(String name) { - return fromString(name, StageValues.class); - } - - /** @return known StageValues values. */ - public static Collection values() { - return values(StageValues.class); - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StatusActiveEvent.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StatusActiveEvent.java deleted file mode 100644 index 951fa7eb1ca5..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StatusActiveEvent.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Active event type of emerging issue. */ -@Fluent -public final class StatusActiveEvent { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StatusActiveEvent.class); - - /* - * The active event title. - */ - @JsonProperty(value = "title") - private String title; - - /* - * The details of active event. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The tracking id of this active event. - */ - @JsonProperty(value = "trackingId") - private String trackingId; - - /* - * The impact start time on this active event. - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /* - * The cloud type of this active event. - */ - @JsonProperty(value = "cloud") - private String cloud; - - /* - * The severity level of this active event. - */ - @JsonProperty(value = "severity") - private SeverityValues severity; - - /* - * The stage of this active event. - */ - @JsonProperty(value = "stage") - private StageValues stage; - - /* - * The boolean value of this active event if published or not. - */ - @JsonProperty(value = "published") - private Boolean published; - - /* - * The last time modified on this banner. - */ - @JsonProperty(value = "lastModifiedTime") - private OffsetDateTime lastModifiedTime; - - /* - * The list of emerging issues impacts. - */ - @JsonProperty(value = "impacts") - private List impacts; - - /** - * Get the title property: The active event title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The active event title. - * - * @param title the title value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: The details of active event. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The details of active event. - * - * @param description the description value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the trackingId property: The tracking id of this active event. - * - * @return the trackingId value. - */ - public String trackingId() { - return this.trackingId; - } - - /** - * Set the trackingId property: The tracking id of this active event. - * - * @param trackingId the trackingId value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withTrackingId(String trackingId) { - this.trackingId = trackingId; - return this; - } - - /** - * Get the startTime property: The impact start time on this active event. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The impact start time on this active event. - * - * @param startTime the startTime value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the cloud property: The cloud type of this active event. - * - * @return the cloud value. - */ - public String cloud() { - return this.cloud; - } - - /** - * Set the cloud property: The cloud type of this active event. - * - * @param cloud the cloud value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withCloud(String cloud) { - this.cloud = cloud; - return this; - } - - /** - * Get the severity property: The severity level of this active event. - * - * @return the severity value. - */ - public SeverityValues severity() { - return this.severity; - } - - /** - * Set the severity property: The severity level of this active event. - * - * @param severity the severity value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withSeverity(SeverityValues severity) { - this.severity = severity; - return this; - } - - /** - * Get the stage property: The stage of this active event. - * - * @return the stage value. - */ - public StageValues stage() { - return this.stage; - } - - /** - * Set the stage property: The stage of this active event. - * - * @param stage the stage value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withStage(StageValues stage) { - this.stage = stage; - return this; - } - - /** - * Get the published property: The boolean value of this active event if published or not. - * - * @return the published value. - */ - public Boolean published() { - return this.published; - } - - /** - * Set the published property: The boolean value of this active event if published or not. - * - * @param published the published value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withPublished(Boolean published) { - this.published = published; - return this; - } - - /** - * Get the lastModifiedTime property: The last time modified on this banner. - * - * @return the lastModifiedTime value. - */ - public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; - } - - /** - * Set the lastModifiedTime property: The last time modified on this banner. - * - * @param lastModifiedTime the lastModifiedTime value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withLastModifiedTime(OffsetDateTime lastModifiedTime) { - this.lastModifiedTime = lastModifiedTime; - return this; - } - - /** - * Get the impacts property: The list of emerging issues impacts. - * - * @return the impacts value. - */ - public List impacts() { - return this.impacts; - } - - /** - * Set the impacts property: The list of emerging issues impacts. - * - * @param impacts the impacts value to set. - * @return the StatusActiveEvent object itself. - */ - public StatusActiveEvent withImpacts(List impacts) { - this.impacts = impacts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (impacts() != null) { - impacts().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StatusBanner.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StatusBanner.java deleted file mode 100644 index 91187372ca8c..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/StatusBanner.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Banner type of emerging issue. */ -@Fluent -public final class StatusBanner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(StatusBanner.class); - - /* - * The banner title. - */ - @JsonProperty(value = "title") - private String title; - - /* - * The details of banner. - */ - @JsonProperty(value = "message") - private String message; - - /* - * The cloud type of this banner. - */ - @JsonProperty(value = "cloud") - private String cloud; - - /* - * The last time modified on this banner. - */ - @JsonProperty(value = "lastModifiedTime") - private OffsetDateTime lastModifiedTime; - - /** - * Get the title property: The banner title. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: The banner title. - * - * @param title the title value to set. - * @return the StatusBanner object itself. - */ - public StatusBanner withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the message property: The details of banner. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The details of banner. - * - * @param message the message value to set. - * @return the StatusBanner object itself. - */ - public StatusBanner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the cloud property: The cloud type of this banner. - * - * @return the cloud value. - */ - public String cloud() { - return this.cloud; - } - - /** - * Set the cloud property: The cloud type of this banner. - * - * @param cloud the cloud value to set. - * @return the StatusBanner object itself. - */ - public StatusBanner withCloud(String cloud) { - this.cloud = cloud; - return this; - } - - /** - * Get the lastModifiedTime property: The last time modified on this banner. - * - * @return the lastModifiedTime value. - */ - public OffsetDateTime lastModifiedTime() { - return this.lastModifiedTime; - } - - /** - * Set the lastModifiedTime property: The last time modified on this banner. - * - * @param lastModifiedTime the lastModifiedTime value to set. - * @return the StatusBanner object itself. - */ - public StatusBanner withLastModifiedTime(OffsetDateTime lastModifiedTime) { - this.lastModifiedTime = lastModifiedTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Update.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Update.java deleted file mode 100644 index 799de4d3857a..000000000000 --- a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/main/java/com/azure/resourcemanager/resourcehealth/models/Update.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.resourcehealth.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Update for service health event. */ -@Fluent -public final class Update { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Update.class); - - /* - * Summary text for the given update for the service health event. - */ - @JsonProperty(value = "summary") - private String summary; - - /* - * It provides the Timestamp for the given update for the service health - * event. - */ - @JsonProperty(value = "updateDateTime") - private OffsetDateTime updateDateTime; - - /** - * Get the summary property: Summary text for the given update for the service health event. - * - * @return the summary value. - */ - public String summary() { - return this.summary; - } - - /** - * Set the summary property: Summary text for the given update for the service health event. - * - * @param summary the summary value to set. - * @return the Update object itself. - */ - public Update withSummary(String summary) { - this.summary = summary; - return this; - } - - /** - * Get the updateDateTime property: It provides the Timestamp for the given update for the service health event. - * - * @return the updateDateTime value. - */ - public OffsetDateTime updateDateTime() { - return this.updateDateTime; - } - - /** - * Set the updateDateTime property: It provides the Timestamp for the given update for the service health event. - * - * @param updateDateTime the updateDateTime value to set. - * @return the Update object itself. - */ - public Update withUpdateDateTime(OffsetDateTime updateDateTime) { - this.updateDateTime = updateDateTime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceSamples.java new file mode 100644 index 000000000000..e707e8bccfb3 --- /dev/null +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesGetByResourceSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcehealth.generated; + +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses GetByResource. */ +public final class AvailabilityStatusesGetByResourceSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatus_GetByResource.json + */ + /** + * Sample code: GetCurrentHealthByResource. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void getCurrentHealthByResource( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager + .availabilityStatuses() + .getByResourceWithResponse("resourceUri", null, "recommendedactions", Context.NONE); + } +} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupSamples.java new file mode 100644 index 000000000000..ed3c63e5212f --- /dev/null +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListByResourceGroupSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcehealth.generated; + +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses ListByResourceGroup. */ +public final class AvailabilityStatusesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListByResourceGroup.json + */ + /** + * Sample code: ListByResourceGroup. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void listByResourceGroup(com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager + .availabilityStatuses() + .listByResourceGroup("resourceGroupName", null, "recommendedactions", Context.NONE); + } +} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdSamples.java new file mode 100644 index 000000000000..f7d5dc182ba0 --- /dev/null +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListBySubscriptionIdSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcehealth.generated; + +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses ListBySubscriptionId. */ +public final class AvailabilityStatusesListBySubscriptionIdSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_ListBySubscriptionId.json + */ + /** + * Sample code: ListHealthBySubscriptionId. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void listHealthBySubscriptionId( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager.availabilityStatuses().listBySubscriptionId(null, "recommendedactions", Context.NONE); + } +} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListSamples.java new file mode 100644 index 000000000000..7e9cbd1475dd --- /dev/null +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/AvailabilityStatusesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcehealth.generated; + +import com.azure.core.util.Context; + +/** Samples for AvailabilityStatuses List. */ +public final class AvailabilityStatusesListSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/AvailabilityStatuses_List.json + */ + /** + * Sample code: GetHealthHistoryByResource. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void getHealthHistoryByResource( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager.availabilityStatuses().list("resourceUri", null, null, Context.NONE); + } +} diff --git a/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListSamples.java b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListSamples.java new file mode 100644 index 000000000000..e3e59d5e252c --- /dev/null +++ b/sdk/resourcehealth/azure-resourcemanager-resourcehealth/src/samples/java/com/azure/resourcemanager/resourcehealth/generated/OperationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.resourcehealth.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/resourcehealth/resource-manager/Microsoft.ResourceHealth/stable/2020-05-01/examples/Operations_List.json + */ + /** + * Sample code: GetHealthHistoryByResource. + * + * @param manager Entry point to ResourceHealthManager. + */ + public static void getHealthHistoryByResource( + com.azure.resourcemanager.resourcehealth.ResourceHealthManager manager) { + manager.operations().listWithResponse(Context.NONE); + } +}