scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ 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.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of CloudHealth service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the CloudHealth service API instance.
+ */
+ public CloudHealthManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.cloudhealth")
+ .append("/")
+ .append(clientVersion);
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies.addAll(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 BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ 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 = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new CloudHealthManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of HealthModels. It manages HealthModel.
+ *
+ * @return Resource collection API of HealthModels.
+ */
+ public HealthModels healthModels() {
+ if (this.healthModels == null) {
+ this.healthModels = new HealthModelsImpl(clientObject.getHealthModels(), this);
+ }
+ return healthModels;
+ }
+
+ /**
+ * Gets the resource collection API of SignalDefinitions. It manages SignalDefinition.
+ *
+ * @return Resource collection API of SignalDefinitions.
+ */
+ public SignalDefinitions signalDefinitions() {
+ if (this.signalDefinitions == null) {
+ this.signalDefinitions = new SignalDefinitionsImpl(clientObject.getSignalDefinitions(), this);
+ }
+ return signalDefinitions;
+ }
+
+ /**
+ * Gets the resource collection API of AuthenticationSettings. It manages AuthenticationSetting.
+ *
+ * @return Resource collection API of AuthenticationSettings.
+ */
+ public AuthenticationSettings authenticationSettings() {
+ if (this.authenticationSettings == null) {
+ this.authenticationSettings
+ = new AuthenticationSettingsImpl(clientObject.getAuthenticationSettings(), this);
+ }
+ return authenticationSettings;
+ }
+
+ /**
+ * Gets the resource collection API of Entities. It manages Entity.
+ *
+ * @return Resource collection API of Entities.
+ */
+ public Entities entities() {
+ if (this.entities == null) {
+ this.entities = new EntitiesImpl(clientObject.getEntities(), this);
+ }
+ return entities;
+ }
+
+ /**
+ * Gets the resource collection API of Relationships. It manages Relationship.
+ *
+ * @return Resource collection API of Relationships.
+ */
+ public Relationships relationships() {
+ if (this.relationships == null) {
+ this.relationships = new RelationshipsImpl(clientObject.getRelationships(), this);
+ }
+ return relationships;
+ }
+
+ /**
+ * Gets the resource collection API of DiscoveryRules. It manages DiscoveryRule.
+ *
+ * @return Resource collection API of DiscoveryRules.
+ */
+ public DiscoveryRules discoveryRules() {
+ if (this.discoveryRules == null) {
+ this.discoveryRules = new DiscoveryRulesImpl(clientObject.getDiscoveryRules(), this);
+ }
+ return discoveryRules;
+ }
+
+ /**
+ * Gets wrapped service client CloudHealthClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client CloudHealthClient.
+ */
+ public CloudHealthClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/AuthenticationSettingsClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/AuthenticationSettingsClient.java
new file mode 100644
index 000000000000..ed65d5fe3b09
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/AuthenticationSettingsClient.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.models.AuthenticationSettingInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in AuthenticationSettingsClient.
+ */
+public interface AuthenticationSettingsClient {
+ /**
+ * Get a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 a AuthenticationSetting along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, Context context);
+
+ /**
+ * Get a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 a AuthenticationSetting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AuthenticationSettingInner get(String resourceGroupName, String healthModelName, String authenticationSettingName);
+
+ /**
+ * Create a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @param resource Resource create 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 an authentication setting in a health model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, AuthenticationSettingInner resource, Context context);
+
+ /**
+ * Create a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @param resource Resource create parameters.
+ * @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 an authentication setting in a health model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AuthenticationSettingInner createOrUpdate(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, AuthenticationSettingInner resource);
+
+ /**
+ * Delete a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, Context context);
+
+ /**
+ * Delete a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String healthModelName, String authenticationSettingName);
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName);
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ Context context);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/CloudHealthClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/CloudHealthClient.java
new file mode 100644
index 000000000000..112c9a8dbfcd
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/CloudHealthClient.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for CloudHealthClient class.
+ */
+public interface CloudHealthClient {
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the HealthModelsClient object to access its operations.
+ *
+ * @return the HealthModelsClient object.
+ */
+ HealthModelsClient getHealthModels();
+
+ /**
+ * Gets the SignalDefinitionsClient object to access its operations.
+ *
+ * @return the SignalDefinitionsClient object.
+ */
+ SignalDefinitionsClient getSignalDefinitions();
+
+ /**
+ * Gets the AuthenticationSettingsClient object to access its operations.
+ *
+ * @return the AuthenticationSettingsClient object.
+ */
+ AuthenticationSettingsClient getAuthenticationSettings();
+
+ /**
+ * Gets the EntitiesClient object to access its operations.
+ *
+ * @return the EntitiesClient object.
+ */
+ EntitiesClient getEntities();
+
+ /**
+ * Gets the RelationshipsClient object to access its operations.
+ *
+ * @return the RelationshipsClient object.
+ */
+ RelationshipsClient getRelationships();
+
+ /**
+ * Gets the DiscoveryRulesClient object to access its operations.
+ *
+ * @return the DiscoveryRulesClient object.
+ */
+ DiscoveryRulesClient getDiscoveryRules();
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/DiscoveryRulesClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/DiscoveryRulesClient.java
new file mode 100644
index 000000000000..f2b1811881d7
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/DiscoveryRulesClient.java
@@ -0,0 +1,142 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.models.DiscoveryRuleInner;
+import java.time.OffsetDateTime;
+
+/**
+ * An instance of this class provides access to all the operations defined in DiscoveryRulesClient.
+ */
+public interface DiscoveryRulesClient {
+ /**
+ * Get a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 a DiscoveryRule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, Context context);
+
+ /**
+ * Get a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 a DiscoveryRule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveryRuleInner get(String resourceGroupName, String healthModelName, String discoveryRuleName);
+
+ /**
+ * Create a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @param resource Resource create 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 a discovery rule which automatically finds entities and relationships in a health model based on an Azure
+ * Resource Graph query along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, DiscoveryRuleInner resource, Context context);
+
+ /**
+ * Create a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @param resource Resource create parameters.
+ * @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 a discovery rule which automatically finds entities and relationships in a health model based on an Azure
+ * Resource Graph query.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiscoveryRuleInner createOrUpdate(String resourceGroupName, String healthModelName, String discoveryRuleName,
+ DiscoveryRuleInner resource);
+
+ /**
+ * Delete a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String healthModelName, String discoveryRuleName,
+ Context context);
+
+ /**
+ * Delete a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String healthModelName, String discoveryRuleName);
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveryRule list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName);
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a DiscoveryRule list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/EntitiesClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/EntitiesClient.java
new file mode 100644
index 000000000000..b82c6d00903b
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/EntitiesClient.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.models.EntityInner;
+import java.time.OffsetDateTime;
+
+/**
+ * An instance of this class provides access to all the operations defined in EntitiesClient.
+ */
+public interface EntitiesClient {
+ /**
+ * Get a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 a Entity along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String healthModelName, String entityName,
+ Context context);
+
+ /**
+ * Get a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 a Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EntityInner get(String resourceGroupName, String healthModelName, String entityName);
+
+ /**
+ * Create a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @param resource Resource create 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 an entity (aka node) of a health model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String healthModelName,
+ String entityName, EntityInner resource, Context context);
+
+ /**
+ * Create a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @param resource Resource create parameters.
+ * @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 an entity (aka node) of a health model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EntityInner createOrUpdate(String resourceGroupName, String healthModelName, String entityName,
+ EntityInner resource);
+
+ /**
+ * Delete a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String healthModelName, String entityName,
+ Context context);
+
+ /**
+ * Delete a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String healthModelName, String entityName);
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Entity list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName);
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a Entity list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/HealthModelsClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/HealthModelsClient.java
new file mode 100644
index 000000000000..0faddae2b6b5
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/HealthModelsClient.java
@@ -0,0 +1,269 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.cloudhealth.fluent.models.HealthModelInner;
+import com.azure.resourcemanager.cloudhealth.models.HealthModelUpdate;
+
+/**
+ * An instance of this class provides access to all the operations defined in HealthModelsClient.
+ */
+public interface HealthModelsClient {
+ /**
+ * Get a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a HealthModel along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String healthModelName,
+ Context context);
+
+ /**
+ * Get a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a HealthModel.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthModelInner getByResourceGroup(String resourceGroupName, String healthModelName);
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create parameters.
+ * @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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, HealthModelInner> beginCreate(String resourceGroupName,
+ String healthModelName, HealthModelInner resource);
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, HealthModelInner> beginCreate(String resourceGroupName,
+ String healthModelName, HealthModelInner resource, Context context);
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create parameters.
+ * @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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthModelInner create(String resourceGroupName, String healthModelName, HealthModelInner resource);
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthModelInner create(String resourceGroupName, String healthModelName, HealthModelInner resource,
+ Context context);
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, HealthModelInner> beginUpdate(String resourceGroupName,
+ String healthModelName, HealthModelUpdate properties);
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, HealthModelInner> beginUpdate(String resourceGroupName,
+ String healthModelName, HealthModelUpdate properties, Context context);
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthModelInner update(String resourceGroupName, String healthModelName, HealthModelUpdate properties);
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthModelInner update(String resourceGroupName, String healthModelName, HealthModelUpdate properties,
+ Context context);
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String healthModelName);
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String healthModelName, Context context);
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String healthModelName);
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String healthModelName, Context context);
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/OperationsClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/OperationsClient.java
new file mode 100644
index 000000000000..cbf8ac999275
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @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 a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/RelationshipsClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/RelationshipsClient.java
new file mode 100644
index 000000000000..8ec96fd3f09f
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/RelationshipsClient.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.models.RelationshipInner;
+import java.time.OffsetDateTime;
+
+/**
+ * An instance of this class provides access to all the operations defined in RelationshipsClient.
+ */
+public interface RelationshipsClient {
+ /**
+ * Get a Relationship.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param relationshipName Name of the relationship. Must be unique within a health model. For example, a
+ * concatenation of parentEntityName and childEntityName can be used as the name.
+ * @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 a Relationship along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String healthModelName,
+ String relationshipName, Context context);
+
+ /**
+ * Get a Relationship.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param relationshipName Name of the relationship. Must be unique within a health model. For example, a
+ * concatenation of parentEntityName and childEntityName can be used as the name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a Relationship.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RelationshipInner get(String resourceGroupName, String healthModelName, String relationshipName);
+
+ /**
+ * Create a Relationship.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param relationshipName Name of the relationship. Must be unique within a health model. For example, a
+ * concatenation of parentEntityName and childEntityName can be used as the name.
+ * @param resource Resource create 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 a relationship (aka edge) between two entities in a health model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String healthModelName,
+ String relationshipName, RelationshipInner resource, Context context);
+
+ /**
+ * Create a Relationship.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param relationshipName Name of the relationship. Must be unique within a health model. For example, a
+ * concatenation of parentEntityName and childEntityName can be used as the name.
+ * @param resource Resource create parameters.
+ * @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 a relationship (aka edge) between two entities in a health model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ RelationshipInner createOrUpdate(String resourceGroupName, String healthModelName, String relationshipName,
+ RelationshipInner resource);
+
+ /**
+ * Delete a Relationship.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param relationshipName Name of the relationship. Must be unique within a health model. For example, a
+ * concatenation of parentEntityName and childEntityName can be used as the name.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String healthModelName, String relationshipName,
+ Context context);
+
+ /**
+ * Delete a Relationship.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param relationshipName Name of the relationship. Must be unique within a health model. For example, a
+ * concatenation of parentEntityName and childEntityName can be used as the name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String healthModelName, String relationshipName);
+
+ /**
+ * List Relationship resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Relationship list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName);
+
+ /**
+ * List Relationship resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a Relationship list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/SignalDefinitionsClient.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/SignalDefinitionsClient.java
new file mode 100644
index 000000000000..e29ce828c033
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/SignalDefinitionsClient.java
@@ -0,0 +1,140 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.models.SignalDefinitionInner;
+import java.time.OffsetDateTime;
+
+/**
+ * An instance of this class provides access to all the operations defined in SignalDefinitionsClient.
+ */
+public interface SignalDefinitionsClient {
+ /**
+ * Get a SignalDefinition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param signalDefinitionName Name of the signal definition. Must be unique within a health model.
+ * @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 a SignalDefinition along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String healthModelName,
+ String signalDefinitionName, Context context);
+
+ /**
+ * Get a SignalDefinition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param signalDefinitionName Name of the signal definition. Must be unique within a health model.
+ * @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 a SignalDefinition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SignalDefinitionInner get(String resourceGroupName, String healthModelName, String signalDefinitionName);
+
+ /**
+ * Create a SignalDefinition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param signalDefinitionName Name of the signal definition. Must be unique within a health model.
+ * @param resource Resource create 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 a signal definition in a health model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createOrUpdateWithResponse(String resourceGroupName, String healthModelName,
+ String signalDefinitionName, SignalDefinitionInner resource, Context context);
+
+ /**
+ * Create a SignalDefinition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param signalDefinitionName Name of the signal definition. Must be unique within a health model.
+ * @param resource Resource create parameters.
+ * @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 a signal definition in a health model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SignalDefinitionInner createOrUpdate(String resourceGroupName, String healthModelName, String signalDefinitionName,
+ SignalDefinitionInner resource);
+
+ /**
+ * Delete a SignalDefinition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param signalDefinitionName Name of the signal definition. Must be unique within a health model.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(String resourceGroupName, String healthModelName, String signalDefinitionName,
+ Context context);
+
+ /**
+ * Delete a SignalDefinition.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param signalDefinitionName Name of the signal definition. Must be unique within a health model.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String healthModelName, String signalDefinitionName);
+
+ /**
+ * List SignalDefinition resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a SignalDefinition list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName);
+
+ /**
+ * List SignalDefinition resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a SignalDefinition list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/AuthenticationSettingInner.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/AuthenticationSettingInner.java
new file mode 100644
index 000000000000..6d62db0299fc
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/AuthenticationSettingInner.java
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cloudhealth.models.AuthenticationSettingProperties;
+import java.io.IOException;
+
+/**
+ * An authentication setting in a health model.
+ */
+@Fluent
+public final class AuthenticationSettingInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private AuthenticationSettingProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of AuthenticationSettingInner class.
+ */
+ public AuthenticationSettingInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public AuthenticationSettingProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the AuthenticationSettingInner object itself.
+ */
+ public AuthenticationSettingInner withProperties(AuthenticationSettingProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AuthenticationSettingInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AuthenticationSettingInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the AuthenticationSettingInner.
+ */
+ public static AuthenticationSettingInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AuthenticationSettingInner deserializedAuthenticationSettingInner = new AuthenticationSettingInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedAuthenticationSettingInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedAuthenticationSettingInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedAuthenticationSettingInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedAuthenticationSettingInner.properties
+ = AuthenticationSettingProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedAuthenticationSettingInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAuthenticationSettingInner;
+ });
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/DiscoveryRuleInner.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/DiscoveryRuleInner.java
new file mode 100644
index 000000000000..9a4802b5f735
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/DiscoveryRuleInner.java
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleProperties;
+import java.io.IOException;
+
+/**
+ * A discovery rule which automatically finds entities and relationships in a health model based on an Azure Resource
+ * Graph query.
+ */
+@Fluent
+public final class DiscoveryRuleInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private DiscoveryRuleProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of DiscoveryRuleInner class.
+ */
+ public DiscoveryRuleInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public DiscoveryRuleProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the DiscoveryRuleInner object itself.
+ */
+ public DiscoveryRuleInner withProperties(DiscoveryRuleProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DiscoveryRuleInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DiscoveryRuleInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DiscoveryRuleInner.
+ */
+ public static DiscoveryRuleInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DiscoveryRuleInner deserializedDiscoveryRuleInner = new DiscoveryRuleInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedDiscoveryRuleInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedDiscoveryRuleInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedDiscoveryRuleInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedDiscoveryRuleInner.properties = DiscoveryRuleProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedDiscoveryRuleInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDiscoveryRuleInner;
+ });
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/EntityInner.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/EntityInner.java
new file mode 100644
index 000000000000..96a86192ab15
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/EntityInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cloudhealth.models.EntityProperties;
+import java.io.IOException;
+
+/**
+ * An entity (aka node) of a health model.
+ */
+@Fluent
+public final class EntityInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private EntityProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of EntityInner class.
+ */
+ public EntityInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public EntityProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the EntityInner object itself.
+ */
+ public EntityInner withProperties(EntityProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of EntityInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of EntityInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the EntityInner.
+ */
+ public static EntityInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ EntityInner deserializedEntityInner = new EntityInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedEntityInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedEntityInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedEntityInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedEntityInner.properties = EntityProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedEntityInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedEntityInner;
+ });
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/HealthModelInner.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/HealthModelInner.java
new file mode 100644
index 000000000000..44bb2bad3067
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/HealthModelInner.java
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cloudhealth.models.HealthModelProperties;
+import com.azure.resourcemanager.cloudhealth.models.ManagedServiceIdentity;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * A HealthModel resource.
+ */
+@Fluent
+public final class HealthModelInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private HealthModelProperties properties;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private ManagedServiceIdentity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of HealthModelInner class.
+ */
+ public HealthModelInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public HealthModelProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the HealthModelInner object itself.
+ */
+ public HealthModelInner withProperties(HealthModelProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the HealthModelInner object itself.
+ */
+ public HealthModelInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public HealthModelInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public HealthModelInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (identity() != null) {
+ identity().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of HealthModelInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of HealthModelInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the HealthModelInner.
+ */
+ public static HealthModelInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ HealthModelInner deserializedHealthModelInner = new HealthModelInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedHealthModelInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedHealthModelInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedHealthModelInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedHealthModelInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedHealthModelInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedHealthModelInner.properties = HealthModelProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedHealthModelInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedHealthModelInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedHealthModelInner;
+ });
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/OperationInner.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..b9f3fa018977
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/OperationInner.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cloudhealth.models.ActionType;
+import com.azure.resourcemanager.cloudhealth.models.OperationDisplay;
+import com.azure.resourcemanager.cloudhealth.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Immutable
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ private OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for Azure Resource Manager/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/RelationshipInner.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/RelationshipInner.java
new file mode 100644
index 000000000000..cb72bc372f7a
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/RelationshipInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cloudhealth.models.RelationshipProperties;
+import java.io.IOException;
+
+/**
+ * A relationship (aka edge) between two entities in a health model.
+ */
+@Fluent
+public final class RelationshipInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private RelationshipProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of RelationshipInner class.
+ */
+ public RelationshipInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public RelationshipProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the RelationshipInner object itself.
+ */
+ public RelationshipInner withProperties(RelationshipProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of RelationshipInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of RelationshipInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the RelationshipInner.
+ */
+ public static RelationshipInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ RelationshipInner deserializedRelationshipInner = new RelationshipInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedRelationshipInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedRelationshipInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedRelationshipInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedRelationshipInner.properties = RelationshipProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedRelationshipInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRelationshipInner;
+ });
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/SignalDefinitionInner.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/SignalDefinitionInner.java
new file mode 100644
index 000000000000..98c0137aa912
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/SignalDefinitionInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cloudhealth.models.SignalDefinitionProperties;
+import java.io.IOException;
+
+/**
+ * A signal definition in a health model.
+ */
+@Fluent
+public final class SignalDefinitionInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private SignalDefinitionProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of SignalDefinitionInner class.
+ */
+ public SignalDefinitionInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public SignalDefinitionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the SignalDefinitionInner object itself.
+ */
+ public SignalDefinitionInner withProperties(SignalDefinitionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SignalDefinitionInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SignalDefinitionInner if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the SignalDefinitionInner.
+ */
+ public static SignalDefinitionInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SignalDefinitionInner deserializedSignalDefinitionInner = new SignalDefinitionInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSignalDefinitionInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSignalDefinitionInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSignalDefinitionInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedSignalDefinitionInner.properties = SignalDefinitionProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSignalDefinitionInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSignalDefinitionInner;
+ });
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/package-info.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/package-info.java
new file mode 100644
index 000000000000..c5748a4ea987
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/models/package-info.java
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for CloudHealth.
+ */
+package com.azure.resourcemanager.cloudhealth.fluent.models;
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/package-info.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/package-info.java
new file mode 100644
index 000000000000..c05f236fc66a
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/fluent/package-info.java
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for CloudHealth.
+ */
+package com.azure.resourcemanager.cloudhealth.fluent;
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingImpl.java
new file mode 100644
index 000000000000..fc93ed40dc1d
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingImpl.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cloudhealth.fluent.models.AuthenticationSettingInner;
+import com.azure.resourcemanager.cloudhealth.models.AuthenticationSetting;
+import com.azure.resourcemanager.cloudhealth.models.AuthenticationSettingProperties;
+
+public final class AuthenticationSettingImpl
+ implements AuthenticationSetting, AuthenticationSetting.Definition, AuthenticationSetting.Update {
+ private AuthenticationSettingInner innerObject;
+
+ private final com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public AuthenticationSettingProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public AuthenticationSettingInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cloudhealth.CloudHealthManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String healthModelName;
+
+ private String authenticationSettingName;
+
+ public AuthenticationSettingImpl withExistingHealthmodel(String resourceGroupName, String healthModelName) {
+ this.resourceGroupName = resourceGroupName;
+ this.healthModelName = healthModelName;
+ return this;
+ }
+
+ public AuthenticationSetting create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAuthenticationSettings()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, authenticationSettingName,
+ this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AuthenticationSetting create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAuthenticationSettings()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, authenticationSettingName,
+ this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ AuthenticationSettingImpl(String name, com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = new AuthenticationSettingInner();
+ this.serviceManager = serviceManager;
+ this.authenticationSettingName = name;
+ }
+
+ public AuthenticationSettingImpl update() {
+ return this;
+ }
+
+ public AuthenticationSetting apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAuthenticationSettings()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, authenticationSettingName,
+ this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AuthenticationSetting apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAuthenticationSettings()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, authenticationSettingName,
+ this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ AuthenticationSettingImpl(AuthenticationSettingInner innerObject,
+ com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.healthModelName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "healthmodels");
+ this.authenticationSettingName
+ = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "authenticationsettings");
+ }
+
+ public AuthenticationSetting refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getAuthenticationSettings()
+ .getWithResponse(resourceGroupName, healthModelName, authenticationSettingName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public AuthenticationSetting refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getAuthenticationSettings()
+ .getWithResponse(resourceGroupName, healthModelName, authenticationSettingName, context)
+ .getValue();
+ return this;
+ }
+
+ public AuthenticationSettingImpl withProperties(AuthenticationSettingProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsClientImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsClientImpl.java
new file mode 100644
index 000000000000..4843a068157d
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsClientImpl.java
@@ -0,0 +1,750 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+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.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient;
+import com.azure.resourcemanager.cloudhealth.fluent.models.AuthenticationSettingInner;
+import com.azure.resourcemanager.cloudhealth.implementation.models.AuthenticationSettingListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in AuthenticationSettingsClient.
+ */
+public final class AuthenticationSettingsClientImpl implements AuthenticationSettingsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final AuthenticationSettingsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CloudHealthClientImpl client;
+
+ /**
+ * Initializes an instance of AuthenticationSettingsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AuthenticationSettingsClientImpl(CloudHealthClientImpl client) {
+ this.service = RestProxy.create(AuthenticationSettingsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CloudHealthClientAuthenticationSettings to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CloudHealthClientAut")
+ public interface AuthenticationSettingsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/authenticationsettings/{authenticationSettingName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName,
+ @PathParam("authenticationSettingName") String authenticationSettingName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/authenticationsettings/{authenticationSettingName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName,
+ @PathParam("authenticationSettingName") String authenticationSettingName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AuthenticationSettingInner resource, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/authenticationsettings/{authenticationSettingName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName,
+ @PathParam("authenticationSettingName") String authenticationSettingName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/authenticationsettings")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHealthModel(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHealthModelNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 a AuthenticationSetting along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String healthModelName, String authenticationSettingName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (authenticationSettingName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter authenticationSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, authenticationSettingName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 a AuthenticationSetting along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String healthModelName, String authenticationSettingName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (authenticationSettingName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter authenticationSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, authenticationSettingName, accept, context);
+ }
+
+ /**
+ * Get a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 a AuthenticationSetting on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String healthModelName,
+ String authenticationSettingName) {
+ return getWithResponseAsync(resourceGroupName, healthModelName, authenticationSettingName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 a AuthenticationSetting along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, Context context) {
+ return getWithResponseAsync(resourceGroupName, healthModelName, authenticationSettingName, context).block();
+ }
+
+ /**
+ * Get a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 a AuthenticationSetting.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AuthenticationSettingInner get(String resourceGroupName, String healthModelName,
+ String authenticationSettingName) {
+ return getWithResponse(resourceGroupName, healthModelName, authenticationSettingName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @param resource Resource create 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 an authentication setting in a health model along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String healthModelName, String authenticationSettingName, AuthenticationSettingInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (authenticationSettingName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter authenticationSettingName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, authenticationSettingName,
+ contentType, accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @param resource Resource create 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 an authentication setting in a health model along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String healthModelName, String authenticationSettingName, AuthenticationSettingInner resource,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (authenticationSettingName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter authenticationSettingName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, authenticationSettingName, contentType,
+ accept, resource, context);
+ }
+
+ /**
+ * Create a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @param resource Resource create 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 an authentication setting in a health model on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, AuthenticationSettingInner resource) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, healthModelName, authenticationSettingName, resource)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Create a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @param resource Resource create 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 an authentication setting in a health model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(String resourceGroupName,
+ String healthModelName, String authenticationSettingName, AuthenticationSettingInner resource,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, healthModelName, authenticationSettingName, resource,
+ context).block();
+ }
+
+ /**
+ * Create a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @param resource Resource create 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 an authentication setting in a health model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AuthenticationSettingInner createOrUpdate(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, AuthenticationSettingInner resource) {
+ return createOrUpdateWithResponse(resourceGroupName, healthModelName, authenticationSettingName, resource,
+ Context.NONE).getValue();
+ }
+
+ /**
+ * Delete a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String healthModelName,
+ String authenticationSettingName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (authenticationSettingName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter authenticationSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, authenticationSettingName, accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (authenticationSettingName == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter authenticationSettingName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, authenticationSettingName, accept, context);
+ }
+
+ /**
+ * Delete a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String healthModelName, String authenticationSettingName) {
+ return deleteWithResponseAsync(resourceGroupName, healthModelName, authenticationSettingName)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, healthModelName, authenticationSettingName, context).block();
+ }
+
+ /**
+ * Delete a AuthenticationSetting.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param authenticationSettingName Name of the authentication setting. Must be unique within a health model.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String healthModelName, String authenticationSettingName) {
+ deleteWithResponse(resourceGroupName, healthModelName, authenticationSettingName, Context.NONE);
+ }
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelSinglePageAsync(String resourceGroupName,
+ String healthModelName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByHealthModel(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, 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()));
+ }
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelSinglePageAsync(String resourceGroupName,
+ String healthModelName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByHealthModel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName,
+ String healthModelName) {
+ return new PagedFlux<>(() -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName,
+ String healthModelName, Context context) {
+ return new PagedFlux<>(() -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName, context),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHealthModel(String resourceGroupName,
+ String healthModelName) {
+ return new PagedIterable<>(listByHealthModelAsync(resourceGroupName, healthModelName));
+ }
+
+ /**
+ * List AuthenticationSetting resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ Context context) {
+ return new PagedIterable<>(listByHealthModelAsync(resourceGroupName, healthModelName, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a AuthenticationSetting list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelNextSinglePageAsync(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.listByHealthModelNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 response of a AuthenticationSetting list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelNextSinglePageAsync(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.listByHealthModelNext(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/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsImpl.java
new file mode 100644
index 000000000000..e4d8086c3c72
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/AuthenticationSettingsImpl.java
@@ -0,0 +1,164 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.AuthenticationSettingsClient;
+import com.azure.resourcemanager.cloudhealth.fluent.models.AuthenticationSettingInner;
+import com.azure.resourcemanager.cloudhealth.models.AuthenticationSetting;
+import com.azure.resourcemanager.cloudhealth.models.AuthenticationSettings;
+
+public final class AuthenticationSettingsImpl implements AuthenticationSettings {
+ private static final ClientLogger LOGGER = new ClientLogger(AuthenticationSettingsImpl.class);
+
+ private final AuthenticationSettingsClient innerClient;
+
+ private final com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager;
+
+ public AuthenticationSettingsImpl(AuthenticationSettingsClient innerClient,
+ com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, Context context) {
+ Response inner = this.serviceClient()
+ .getWithResponse(resourceGroupName, healthModelName, authenticationSettingName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new AuthenticationSettingImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AuthenticationSetting get(String resourceGroupName, String healthModelName,
+ String authenticationSettingName) {
+ AuthenticationSettingInner inner
+ = this.serviceClient().get(resourceGroupName, healthModelName, authenticationSettingName);
+ if (inner != null) {
+ return new AuthenticationSettingImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String healthModelName,
+ String authenticationSettingName, Context context) {
+ return this.serviceClient()
+ .deleteWithResponse(resourceGroupName, healthModelName, authenticationSettingName, context);
+ }
+
+ public void delete(String resourceGroupName, String healthModelName, String authenticationSettingName) {
+ this.serviceClient().delete(resourceGroupName, healthModelName, authenticationSettingName);
+ }
+
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName) {
+ PagedIterable inner
+ = this.serviceClient().listByHealthModel(resourceGroupName, healthModelName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthenticationSettingImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByHealthModel(resourceGroupName, healthModelName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthenticationSettingImpl(inner1, this.manager()));
+ }
+
+ public AuthenticationSetting getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String authenticationSettingName = ResourceManagerUtils.getValueFromIdByName(id, "authenticationsettings");
+ if (authenticationSettingName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'authenticationsettings'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, healthModelName, authenticationSettingName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String authenticationSettingName = ResourceManagerUtils.getValueFromIdByName(id, "authenticationsettings");
+ if (authenticationSettingName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'authenticationsettings'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, healthModelName, authenticationSettingName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String authenticationSettingName = ResourceManagerUtils.getValueFromIdByName(id, "authenticationsettings");
+ if (authenticationSettingName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'authenticationsettings'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, healthModelName, authenticationSettingName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String authenticationSettingName = ResourceManagerUtils.getValueFromIdByName(id, "authenticationsettings");
+ if (authenticationSettingName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(String
+ .format("The resource ID '%s' is not valid. Missing path segment 'authenticationsettings'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, healthModelName, authenticationSettingName, context);
+ }
+
+ private AuthenticationSettingsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.cloudhealth.CloudHealthManager manager() {
+ return this.serviceManager;
+ }
+
+ public AuthenticationSettingImpl define(String name) {
+ return new AuthenticationSettingImpl(name, this.manager());
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthClientBuilder.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthClientBuilder.java
new file mode 100644
index 000000000000..ccbd90f90ad9
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/**
+ * A builder for creating a new instance of the CloudHealthClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { CloudHealthClientImpl.class })
+public final class CloudHealthClientBuilder {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the CloudHealthClientBuilder.
+ */
+ public CloudHealthClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the CloudHealthClientBuilder.
+ */
+ public CloudHealthClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the CloudHealthClientBuilder.
+ */
+ public CloudHealthClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the CloudHealthClientBuilder.
+ */
+ public CloudHealthClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the CloudHealthClientBuilder.
+ */
+ public CloudHealthClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the CloudHealthClientBuilder.
+ */
+ public CloudHealthClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of CloudHealthClientImpl with the provided parameters.
+ *
+ * @return an instance of CloudHealthClientImpl.
+ */
+ public CloudHealthClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ CloudHealthClientImpl client = new CloudHealthClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthClientImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthClientImpl.java
new file mode 100644
index 000000000000..68380baa2fca
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/CloudHealthClientImpl.java
@@ -0,0 +1,384 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.cloudhealth.fluent.AuthenticationSettingsClient;
+import com.azure.resourcemanager.cloudhealth.fluent.CloudHealthClient;
+import com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient;
+import com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient;
+import com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient;
+import com.azure.resourcemanager.cloudhealth.fluent.OperationsClient;
+import com.azure.resourcemanager.cloudhealth.fluent.RelationshipsClient;
+import com.azure.resourcemanager.cloudhealth.fluent.SignalDefinitionsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the CloudHealthClientImpl type.
+ */
+@ServiceClient(builder = CloudHealthClientBuilder.class)
+public final class CloudHealthClientImpl implements CloudHealthClient {
+ /**
+ * Service host.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Version parameter.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The OperationsClient object to access its operations.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The HealthModelsClient object to access its operations.
+ */
+ private final HealthModelsClient healthModels;
+
+ /**
+ * Gets the HealthModelsClient object to access its operations.
+ *
+ * @return the HealthModelsClient object.
+ */
+ public HealthModelsClient getHealthModels() {
+ return this.healthModels;
+ }
+
+ /**
+ * The SignalDefinitionsClient object to access its operations.
+ */
+ private final SignalDefinitionsClient signalDefinitions;
+
+ /**
+ * Gets the SignalDefinitionsClient object to access its operations.
+ *
+ * @return the SignalDefinitionsClient object.
+ */
+ public SignalDefinitionsClient getSignalDefinitions() {
+ return this.signalDefinitions;
+ }
+
+ /**
+ * The AuthenticationSettingsClient object to access its operations.
+ */
+ private final AuthenticationSettingsClient authenticationSettings;
+
+ /**
+ * Gets the AuthenticationSettingsClient object to access its operations.
+ *
+ * @return the AuthenticationSettingsClient object.
+ */
+ public AuthenticationSettingsClient getAuthenticationSettings() {
+ return this.authenticationSettings;
+ }
+
+ /**
+ * The EntitiesClient object to access its operations.
+ */
+ private final EntitiesClient entities;
+
+ /**
+ * Gets the EntitiesClient object to access its operations.
+ *
+ * @return the EntitiesClient object.
+ */
+ public EntitiesClient getEntities() {
+ return this.entities;
+ }
+
+ /**
+ * The RelationshipsClient object to access its operations.
+ */
+ private final RelationshipsClient relationships;
+
+ /**
+ * Gets the RelationshipsClient object to access its operations.
+ *
+ * @return the RelationshipsClient object.
+ */
+ public RelationshipsClient getRelationships() {
+ return this.relationships;
+ }
+
+ /**
+ * The DiscoveryRulesClient object to access its operations.
+ */
+ private final DiscoveryRulesClient discoveryRules;
+
+ /**
+ * Gets the DiscoveryRulesClient object to access its operations.
+ *
+ * @return the DiscoveryRulesClient object.
+ */
+ public DiscoveryRulesClient getDiscoveryRules() {
+ return this.discoveryRules;
+ }
+
+ /**
+ * Initializes an instance of CloudHealthClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ */
+ CloudHealthClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
+ AzureEnvironment environment, String endpoint, String subscriptionId) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2023-10-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.healthModels = new HealthModelsClientImpl(this);
+ this.signalDefinitions = new SignalDefinitionsClientImpl(this);
+ this.authenticationSettings = new AuthenticationSettingsClientImpl(this);
+ this.entities = new EntitiesClientImpl(this);
+ this.relationships = new RelationshipsClientImpl(this);
+ this.discoveryRules = new DiscoveryRulesClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CloudHealthClientImpl.class);
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRuleImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRuleImpl.java
new file mode 100644
index 000000000000..7402eebb0285
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRuleImpl.java
@@ -0,0 +1,137 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cloudhealth.fluent.models.DiscoveryRuleInner;
+import com.azure.resourcemanager.cloudhealth.models.DiscoveryRule;
+import com.azure.resourcemanager.cloudhealth.models.DiscoveryRuleProperties;
+
+public final class DiscoveryRuleImpl implements DiscoveryRule, DiscoveryRule.Definition, DiscoveryRule.Update {
+ private DiscoveryRuleInner innerObject;
+
+ private final com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public DiscoveryRuleProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public DiscoveryRuleInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cloudhealth.CloudHealthManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String healthModelName;
+
+ private String discoveryRuleName;
+
+ public DiscoveryRuleImpl withExistingHealthmodel(String resourceGroupName, String healthModelName) {
+ this.resourceGroupName = resourceGroupName;
+ this.healthModelName = healthModelName;
+ return this;
+ }
+
+ public DiscoveryRule create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveryRules()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, discoveryRuleName, this.innerModel(),
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveryRule create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveryRules()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, discoveryRuleName, this.innerModel(),
+ context)
+ .getValue();
+ return this;
+ }
+
+ DiscoveryRuleImpl(String name, com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = new DiscoveryRuleInner();
+ this.serviceManager = serviceManager;
+ this.discoveryRuleName = name;
+ }
+
+ public DiscoveryRuleImpl update() {
+ return this;
+ }
+
+ public DiscoveryRule apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveryRules()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, discoveryRuleName, this.innerModel(),
+ Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveryRule apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveryRules()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, discoveryRuleName, this.innerModel(),
+ context)
+ .getValue();
+ return this;
+ }
+
+ DiscoveryRuleImpl(DiscoveryRuleInner innerObject,
+ com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.healthModelName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "healthmodels");
+ this.discoveryRuleName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "discoveryrules");
+ }
+
+ public DiscoveryRule refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveryRules()
+ .getWithResponse(resourceGroupName, healthModelName, discoveryRuleName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveryRule refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getDiscoveryRules()
+ .getWithResponse(resourceGroupName, healthModelName, discoveryRuleName, context)
+ .getValue();
+ return this;
+ }
+
+ public DiscoveryRuleImpl withProperties(DiscoveryRuleProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesClientImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesClientImpl.java
new file mode 100644
index 000000000000..017a23117a13
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesClientImpl.java
@@ -0,0 +1,775 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+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.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.cloudhealth.fluent.DiscoveryRulesClient;
+import com.azure.resourcemanager.cloudhealth.fluent.models.DiscoveryRuleInner;
+import com.azure.resourcemanager.cloudhealth.implementation.models.DiscoveryRuleListResult;
+import java.time.OffsetDateTime;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in DiscoveryRulesClient.
+ */
+public final class DiscoveryRulesClientImpl implements DiscoveryRulesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final DiscoveryRulesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CloudHealthClientImpl client;
+
+ /**
+ * Initializes an instance of DiscoveryRulesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DiscoveryRulesClientImpl(CloudHealthClientImpl client) {
+ this.service
+ = RestProxy.create(DiscoveryRulesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CloudHealthClientDiscoveryRules to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CloudHealthClientDis")
+ public interface DiscoveryRulesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName,
+ @PathParam("discoveryRuleName") String discoveryRuleName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName,
+ @PathParam("discoveryRuleName") String discoveryRuleName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") DiscoveryRuleInner resource,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules/{discoveryRuleName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName,
+ @PathParam("discoveryRuleName") String discoveryRuleName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/discoveryrules")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHealthModel(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("timestamp") OffsetDateTime timestamp,
+ @PathParam("healthModelName") String healthModelName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHealthModelNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 a DiscoveryRule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String healthModelName,
+ String discoveryRuleName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (discoveryRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveryRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, discoveryRuleName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 a DiscoveryRule along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (discoveryRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveryRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, discoveryRuleName, accept, context);
+ }
+
+ /**
+ * Get a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 a DiscoveryRule on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String healthModelName,
+ String discoveryRuleName) {
+ return getWithResponseAsync(resourceGroupName, healthModelName, discoveryRuleName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 a DiscoveryRule along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, Context context) {
+ return getWithResponseAsync(resourceGroupName, healthModelName, discoveryRuleName, context).block();
+ }
+
+ /**
+ * Get a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 a DiscoveryRule.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveryRuleInner get(String resourceGroupName, String healthModelName, String discoveryRuleName) {
+ return getWithResponse(resourceGroupName, healthModelName, discoveryRuleName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @param resource Resource create 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 a discovery rule which automatically finds entities and relationships in a health model based on an Azure
+ * Resource Graph query along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String healthModelName, String discoveryRuleName, DiscoveryRuleInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (discoveryRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveryRuleName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, discoveryRuleName, contentType,
+ accept, resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @param resource Resource create 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 a discovery rule which automatically finds entities and relationships in a health model based on an Azure
+ * Resource Graph query along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String healthModelName, String discoveryRuleName, DiscoveryRuleInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (discoveryRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveryRuleName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, discoveryRuleName, contentType, accept,
+ resource, context);
+ }
+
+ /**
+ * Create a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @param resource Resource create 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 a discovery rule which automatically finds entities and relationships in a health model based on an Azure
+ * Resource Graph query on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, DiscoveryRuleInner resource) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, healthModelName, discoveryRuleName, resource)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Create a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @param resource Resource create 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 a discovery rule which automatically finds entities and relationships in a health model based on an Azure
+ * Resource Graph query along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, DiscoveryRuleInner resource, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, healthModelName, discoveryRuleName, resource, context)
+ .block();
+ }
+
+ /**
+ * Create a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @param resource Resource create 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 a discovery rule which automatically finds entities and relationships in a health model based on an Azure
+ * Resource Graph query.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiscoveryRuleInner createOrUpdate(String resourceGroupName, String healthModelName, String discoveryRuleName,
+ DiscoveryRuleInner resource) {
+ return createOrUpdateWithResponse(resourceGroupName, healthModelName, discoveryRuleName, resource, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Delete a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String healthModelName,
+ String discoveryRuleName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (discoveryRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveryRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, discoveryRuleName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (discoveryRuleName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter discoveryRuleName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, discoveryRuleName, accept, context);
+ }
+
+ /**
+ * Delete a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String healthModelName, String discoveryRuleName) {
+ return deleteWithResponseAsync(resourceGroupName, healthModelName, discoveryRuleName)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String healthModelName, String discoveryRuleName,
+ Context context) {
+ return deleteWithResponseAsync(resourceGroupName, healthModelName, discoveryRuleName, context).block();
+ }
+
+ /**
+ * Delete a DiscoveryRule.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param discoveryRuleName Name of the discovery rule. Must be unique within a health model.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String healthModelName, String discoveryRuleName) {
+ deleteWithResponse(resourceGroupName, healthModelName, discoveryRuleName, Context.NONE);
+ }
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a DiscoveryRule list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelSinglePageAsync(String resourceGroupName,
+ String healthModelName, OffsetDateTime timestamp) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByHealthModel(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, timestamp, healthModelName, 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()));
+ }
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a DiscoveryRule list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelSinglePageAsync(String resourceGroupName,
+ String healthModelName, OffsetDateTime timestamp, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByHealthModel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, timestamp, healthModelName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a DiscoveryRule list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp) {
+ return new PagedFlux<>(() -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName, timestamp),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveryRule list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName, String healthModelName) {
+ final OffsetDateTime timestamp = null;
+ return new PagedFlux<>(() -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName, timestamp),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a DiscoveryRule list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context) {
+ return new PagedFlux<>(
+ () -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName, timestamp, context),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveryRule list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName) {
+ final OffsetDateTime timestamp = null;
+ return new PagedIterable<>(listByHealthModelAsync(resourceGroupName, healthModelName, timestamp));
+ }
+
+ /**
+ * List DiscoveryRule resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a DiscoveryRule list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context) {
+ return new PagedIterable<>(listByHealthModelAsync(resourceGroupName, healthModelName, timestamp, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a DiscoveryRule list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelNextSinglePageAsync(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.listByHealthModelNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 response of a DiscoveryRule list operation along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelNextSinglePageAsync(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.listByHealthModelNext(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/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesImpl.java
new file mode 100644
index 000000000000..dd9e42a11620
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/DiscoveryRulesImpl.java
@@ -0,0 +1,161 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.DiscoveryRulesClient;
+import com.azure.resourcemanager.cloudhealth.fluent.models.DiscoveryRuleInner;
+import com.azure.resourcemanager.cloudhealth.models.DiscoveryRule;
+import com.azure.resourcemanager.cloudhealth.models.DiscoveryRules;
+import java.time.OffsetDateTime;
+
+public final class DiscoveryRulesImpl implements DiscoveryRules {
+ private static final ClientLogger LOGGER = new ClientLogger(DiscoveryRulesImpl.class);
+
+ private final DiscoveryRulesClient innerClient;
+
+ private final com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager;
+
+ public DiscoveryRulesImpl(DiscoveryRulesClient innerClient,
+ com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String healthModelName,
+ String discoveryRuleName, Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, healthModelName, discoveryRuleName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DiscoveryRuleImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DiscoveryRule get(String resourceGroupName, String healthModelName, String discoveryRuleName) {
+ DiscoveryRuleInner inner = this.serviceClient().get(resourceGroupName, healthModelName, discoveryRuleName);
+ if (inner != null) {
+ return new DiscoveryRuleImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String healthModelName, String discoveryRuleName,
+ Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, healthModelName, discoveryRuleName, context);
+ }
+
+ public void delete(String resourceGroupName, String healthModelName, String discoveryRuleName) {
+ this.serviceClient().delete(resourceGroupName, healthModelName, discoveryRuleName);
+ }
+
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName) {
+ PagedIterable inner
+ = this.serviceClient().listByHealthModel(resourceGroupName, healthModelName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveryRuleImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByHealthModel(resourceGroupName, healthModelName, timestamp, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new DiscoveryRuleImpl(inner1, this.manager()));
+ }
+
+ public DiscoveryRule getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String discoveryRuleName = ResourceManagerUtils.getValueFromIdByName(id, "discoveryrules");
+ if (discoveryRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'discoveryrules'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, healthModelName, discoveryRuleName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String discoveryRuleName = ResourceManagerUtils.getValueFromIdByName(id, "discoveryrules");
+ if (discoveryRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'discoveryrules'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, healthModelName, discoveryRuleName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String discoveryRuleName = ResourceManagerUtils.getValueFromIdByName(id, "discoveryrules");
+ if (discoveryRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'discoveryrules'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, healthModelName, discoveryRuleName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String discoveryRuleName = ResourceManagerUtils.getValueFromIdByName(id, "discoveryrules");
+ if (discoveryRuleName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'discoveryrules'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, healthModelName, discoveryRuleName, context);
+ }
+
+ private DiscoveryRulesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.cloudhealth.CloudHealthManager manager() {
+ return this.serviceManager;
+ }
+
+ public DiscoveryRuleImpl define(String name) {
+ return new DiscoveryRuleImpl(name, this.manager());
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesClientImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesClientImpl.java
new file mode 100644
index 000000000000..6f84962ab2f0
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesClientImpl.java
@@ -0,0 +1,761 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+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.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.cloudhealth.fluent.EntitiesClient;
+import com.azure.resourcemanager.cloudhealth.fluent.models.EntityInner;
+import com.azure.resourcemanager.cloudhealth.implementation.models.EntityListResult;
+import java.time.OffsetDateTime;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in EntitiesClient.
+ */
+public final class EntitiesClientImpl implements EntitiesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final EntitiesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CloudHealthClientImpl client;
+
+ /**
+ * Initializes an instance of EntitiesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EntitiesClientImpl(CloudHealthClientImpl client) {
+ this.service = RestProxy.create(EntitiesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CloudHealthClientEntities to be used by the proxy service to perform
+ * REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CloudHealthClientEnt")
+ public interface EntitiesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @PathParam("entityName") String entityName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @PathParam("entityName") String entityName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") EntityInner resource, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities/{entityName}")
+ @ExpectedResponses({ 200, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @PathParam("entityName") String entityName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}/entities")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHealthModel(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("timestamp") OffsetDateTime timestamp,
+ @PathParam("healthModelName") String healthModelName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByHealthModelNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 a Entity along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String healthModelName,
+ String entityName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (entityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, entityName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 a Entity along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String healthModelName,
+ String entityName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (entityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, entityName, accept, context);
+ }
+
+ /**
+ * Get a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 a Entity on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String healthModelName, String entityName) {
+ return getWithResponseAsync(resourceGroupName, healthModelName, entityName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 a Entity along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String healthModelName, String entityName,
+ Context context) {
+ return getWithResponseAsync(resourceGroupName, healthModelName, entityName, context).block();
+ }
+
+ /**
+ * Get a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 a Entity.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EntityInner get(String resourceGroupName, String healthModelName, String entityName) {
+ return getWithResponse(resourceGroupName, healthModelName, entityName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @param resource Resource create 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 an entity (aka node) of a health model along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String healthModelName, String entityName, EntityInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (entityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, entityName, contentType, accept,
+ resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @param resource Resource create 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 an entity (aka node) of a health model along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String healthModelName, String entityName, EntityInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (entityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, entityName, contentType, accept,
+ resource, context);
+ }
+
+ /**
+ * Create a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @param resource Resource create 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 an entity (aka node) of a health model on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String healthModelName, String entityName,
+ EntityInner resource) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, healthModelName, entityName, resource)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Create a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @param resource Resource create 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 an entity (aka node) of a health model along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(String resourceGroupName, String healthModelName,
+ String entityName, EntityInner resource, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, healthModelName, entityName, resource, context)
+ .block();
+ }
+
+ /**
+ * Create a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @param resource Resource create 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 an entity (aka node) of a health model.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EntityInner createOrUpdate(String resourceGroupName, String healthModelName, String entityName,
+ EntityInner resource) {
+ return createOrUpdateWithResponse(resourceGroupName, healthModelName, entityName, resource, Context.NONE)
+ .getValue();
+ }
+
+ /**
+ * Delete a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String healthModelName,
+ String entityName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (entityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, entityName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(String resourceGroupName, String healthModelName,
+ String entityName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (entityName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, entityName, accept, context);
+ }
+
+ /**
+ * Delete a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String healthModelName, String entityName) {
+ return deleteWithResponseAsync(resourceGroupName, healthModelName, entityName).flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Delete a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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 {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(String resourceGroupName, String healthModelName, String entityName,
+ Context context) {
+ return deleteWithResponseAsync(resourceGroupName, healthModelName, entityName, context).block();
+ }
+
+ /**
+ * Delete a Entity.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param entityName Name of the entity. Must be unique within a health model.
+ * @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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String healthModelName, String entityName) {
+ deleteWithResponse(resourceGroupName, healthModelName, entityName, Context.NONE);
+ }
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a Entity list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelSinglePageAsync(String resourceGroupName,
+ String healthModelName, OffsetDateTime timestamp) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByHealthModel(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, timestamp, healthModelName, 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()));
+ }
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a Entity list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelSinglePageAsync(String resourceGroupName,
+ String healthModelName, OffsetDateTime timestamp, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByHealthModel(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, timestamp, healthModelName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a Entity list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp) {
+ return new PagedFlux<>(() -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName, timestamp),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Entity list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName, String healthModelName) {
+ final OffsetDateTime timestamp = null;
+ return new PagedFlux<>(() -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName, timestamp),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a Entity list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByHealthModelAsync(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context) {
+ return new PagedFlux<>(
+ () -> listByHealthModelSinglePageAsync(resourceGroupName, healthModelName, timestamp, context),
+ nextLink -> listByHealthModelNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Entity list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName) {
+ final OffsetDateTime timestamp = null;
+ return new PagedIterable<>(listByHealthModelAsync(resourceGroupName, healthModelName, timestamp));
+ }
+
+ /**
+ * List Entity resources by HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param timestamp Timestamp to use for the operation. When specified, the version of the resource at this point in
+ * time is retrieved. If not specified, the latest version is used.
+ * @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 response of a Entity list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context) {
+ return new PagedIterable<>(listByHealthModelAsync(resourceGroupName, healthModelName, timestamp, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Entity list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelNextSinglePageAsync(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.listByHealthModelNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 response of a Entity list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByHealthModelNextSinglePageAsync(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.listByHealthModelNext(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/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesImpl.java
new file mode 100644
index 000000000000..929ec5d96155
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntitiesImpl.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.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.cloudhealth.fluent.EntitiesClient;
+import com.azure.resourcemanager.cloudhealth.fluent.models.EntityInner;
+import com.azure.resourcemanager.cloudhealth.models.Entities;
+import com.azure.resourcemanager.cloudhealth.models.Entity;
+import java.time.OffsetDateTime;
+
+public final class EntitiesImpl implements Entities {
+ private static final ClientLogger LOGGER = new ClientLogger(EntitiesImpl.class);
+
+ private final EntitiesClient innerClient;
+
+ private final com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager;
+
+ public EntitiesImpl(EntitiesClient innerClient,
+ com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String healthModelName, String entityName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, healthModelName, entityName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new EntityImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Entity get(String resourceGroupName, String healthModelName, String entityName) {
+ EntityInner inner = this.serviceClient().get(resourceGroupName, healthModelName, entityName);
+ if (inner != null) {
+ return new EntityImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response deleteWithResponse(String resourceGroupName, String healthModelName, String entityName,
+ Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, healthModelName, entityName, context);
+ }
+
+ public void delete(String resourceGroupName, String healthModelName, String entityName) {
+ this.serviceClient().delete(resourceGroupName, healthModelName, entityName);
+ }
+
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName) {
+ PagedIterable inner = this.serviceClient().listByHealthModel(resourceGroupName, healthModelName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new EntityImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByHealthModel(String resourceGroupName, String healthModelName,
+ OffsetDateTime timestamp, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByHealthModel(resourceGroupName, healthModelName, timestamp, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new EntityImpl(inner1, this.manager()));
+ }
+
+ public Entity getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String entityName = ResourceManagerUtils.getValueFromIdByName(id, "entities");
+ if (entityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'entities'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, healthModelName, entityName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String entityName = ResourceManagerUtils.getValueFromIdByName(id, "entities");
+ if (entityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'entities'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, healthModelName, entityName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String entityName = ResourceManagerUtils.getValueFromIdByName(id, "entities");
+ if (entityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'entities'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, healthModelName, entityName, Context.NONE);
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String healthModelName = ResourceManagerUtils.getValueFromIdByName(id, "healthmodels");
+ if (healthModelName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'healthmodels'.", id)));
+ }
+ String entityName = ResourceManagerUtils.getValueFromIdByName(id, "entities");
+ if (entityName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'entities'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, healthModelName, entityName, context);
+ }
+
+ private EntitiesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.cloudhealth.CloudHealthManager manager() {
+ return this.serviceManager;
+ }
+
+ public EntityImpl define(String name) {
+ return new EntityImpl(name, this.manager());
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntityImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntityImpl.java
new file mode 100644
index 000000000000..6aed37231a11
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/EntityImpl.java
@@ -0,0 +1,132 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cloudhealth.fluent.models.EntityInner;
+import com.azure.resourcemanager.cloudhealth.models.Entity;
+import com.azure.resourcemanager.cloudhealth.models.EntityProperties;
+
+public final class EntityImpl implements Entity, Entity.Definition, Entity.Update {
+ private EntityInner innerObject;
+
+ private final com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public EntityProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public EntityInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cloudhealth.CloudHealthManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String healthModelName;
+
+ private String entityName;
+
+ public EntityImpl withExistingHealthmodel(String resourceGroupName, String healthModelName) {
+ this.resourceGroupName = resourceGroupName;
+ this.healthModelName = healthModelName;
+ return this;
+ }
+
+ public Entity create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getEntities()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, entityName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Entity create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getEntities()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, entityName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ EntityImpl(String name, com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = new EntityInner();
+ this.serviceManager = serviceManager;
+ this.entityName = name;
+ }
+
+ public EntityImpl update() {
+ return this;
+ }
+
+ public Entity apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getEntities()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, entityName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Entity apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getEntities()
+ .createOrUpdateWithResponse(resourceGroupName, healthModelName, entityName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ EntityImpl(EntityInner innerObject, com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.healthModelName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "healthmodels");
+ this.entityName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "entities");
+ }
+
+ public Entity refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getEntities()
+ .getWithResponse(resourceGroupName, healthModelName, entityName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Entity refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getEntities()
+ .getWithResponse(resourceGroupName, healthModelName, entityName, context)
+ .getValue();
+ return this;
+ }
+
+ public EntityImpl withProperties(EntityProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelImpl.java
new file mode 100644
index 000000000000..23c74b35bf03
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelImpl.java
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cloudhealth.fluent.models.HealthModelInner;
+import com.azure.resourcemanager.cloudhealth.models.HealthModel;
+import com.azure.resourcemanager.cloudhealth.models.HealthModelProperties;
+import com.azure.resourcemanager.cloudhealth.models.HealthModelUpdate;
+import com.azure.resourcemanager.cloudhealth.models.HealthModelUpdateProperties;
+import com.azure.resourcemanager.cloudhealth.models.ManagedServiceIdentity;
+import java.util.Collections;
+import java.util.Map;
+
+public final class HealthModelImpl implements HealthModel, HealthModel.Definition, HealthModel.Update {
+ private HealthModelInner innerObject;
+
+ private final com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public HealthModelProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public HealthModelInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cloudhealth.CloudHealthManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String healthModelName;
+
+ private HealthModelUpdate updateProperties;
+
+ public HealthModelImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public HealthModel create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getHealthModels()
+ .create(resourceGroupName, healthModelName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public HealthModel create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getHealthModels()
+ .create(resourceGroupName, healthModelName, this.innerModel(), context);
+ return this;
+ }
+
+ HealthModelImpl(String name, com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = new HealthModelInner();
+ this.serviceManager = serviceManager;
+ this.healthModelName = name;
+ }
+
+ public HealthModelImpl update() {
+ this.updateProperties = new HealthModelUpdate();
+ return this;
+ }
+
+ public HealthModel apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getHealthModels()
+ .update(resourceGroupName, healthModelName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public HealthModel apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getHealthModels()
+ .update(resourceGroupName, healthModelName, updateProperties, context);
+ return this;
+ }
+
+ HealthModelImpl(HealthModelInner innerObject,
+ com.azure.resourcemanager.cloudhealth.CloudHealthManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.healthModelName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "healthmodels");
+ }
+
+ public HealthModel refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getHealthModels()
+ .getByResourceGroupWithResponse(resourceGroupName, healthModelName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public HealthModel refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getHealthModels()
+ .getByResourceGroupWithResponse(resourceGroupName, healthModelName, context)
+ .getValue();
+ return this;
+ }
+
+ public HealthModelImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public HealthModelImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public HealthModelImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public HealthModelImpl withProperties(HealthModelProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public HealthModelImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+ }
+
+ public HealthModelImpl withProperties(HealthModelUpdateProperties properties) {
+ this.updateProperties.withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelsClientImpl.java b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelsClientImpl.java
new file mode 100644
index 000000000000..a99bd0597fcb
--- /dev/null
+++ b/sdk/cloudhealth/azure-resourcemanager-cloudhealth/src/main/java/com/azure/resourcemanager/cloudhealth/implementation/HealthModelsClientImpl.java
@@ -0,0 +1,1288 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cloudhealth.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+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.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+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.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.cloudhealth.fluent.HealthModelsClient;
+import com.azure.resourcemanager.cloudhealth.fluent.models.HealthModelInner;
+import com.azure.resourcemanager.cloudhealth.implementation.models.HealthModelListResult;
+import com.azure.resourcemanager.cloudhealth.models.HealthModelUpdate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in HealthModelsClient.
+ */
+public final class HealthModelsClientImpl implements HealthModelsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final HealthModelsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CloudHealthClientImpl client;
+
+ /**
+ * Initializes an instance of HealthModelsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ HealthModelsClientImpl(CloudHealthClientImpl client) {
+ this.service
+ = RestProxy.create(HealthModelsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CloudHealthClientHealthModels to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CloudHealthClientHea")
+ public interface HealthModelsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") HealthModelInner resource,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") HealthModelUpdate properties,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels/{healthModelName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("healthModelName") String healthModelName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CloudHealth/healthmodels")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.CloudHealth/healthmodels")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a HealthModel along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String healthModelName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a HealthModel along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String healthModelName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, accept, context);
+ }
+
+ /**
+ * Get a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a HealthModel on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String healthModelName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, healthModelName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a HealthModel along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String healthModelName,
+ Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, healthModelName, context).block();
+ }
+
+ /**
+ * Get a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a HealthModel.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthModelInner getByResourceGroup(String resourceGroupName, String healthModelName) {
+ return getByResourceGroupWithResponse(resourceGroupName, healthModelName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 a HealthModel resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String healthModelName,
+ HealthModelInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, contentType, accept, resource,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 a HealthModel resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String healthModelName,
+ HealthModelInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, contentType, accept, resource, context);
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 {@link PollerFlux} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, HealthModelInner> beginCreateAsync(String resourceGroupName,
+ String healthModelName, HealthModelInner resource) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, healthModelName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ HealthModelInner.class, HealthModelInner.class, this.client.getContext());
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 {@link PollerFlux} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, HealthModelInner> beginCreateAsync(String resourceGroupName,
+ String healthModelName, HealthModelInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, healthModelName, resource, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ HealthModelInner.class, HealthModelInner.class, context);
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, HealthModelInner> beginCreate(String resourceGroupName,
+ String healthModelName, HealthModelInner resource) {
+ return this.beginCreateAsync(resourceGroupName, healthModelName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, HealthModelInner> beginCreate(String resourceGroupName,
+ String healthModelName, HealthModelInner resource, Context context) {
+ return this.beginCreateAsync(resourceGroupName, healthModelName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 a HealthModel resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String healthModelName,
+ HealthModelInner resource) {
+ return beginCreateAsync(resourceGroupName, healthModelName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 a HealthModel resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String healthModelName,
+ HealthModelInner resource, Context context) {
+ return beginCreateAsync(resourceGroupName, healthModelName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthModelInner create(String resourceGroupName, String healthModelName, HealthModelInner resource) {
+ return createAsync(resourceGroupName, healthModelName, resource).block();
+ }
+
+ /**
+ * Create a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param resource Resource create 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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthModelInner create(String resourceGroupName, String healthModelName, HealthModelInner resource,
+ Context context) {
+ return createAsync(resourceGroupName, healthModelName, resource, context).block();
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String healthModelName,
+ HealthModelUpdate properties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, contentType, accept, properties,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String healthModelName,
+ HealthModelUpdate properties, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, contentType, accept, properties, context);
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link PollerFlux} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, HealthModelInner> beginUpdateAsync(String resourceGroupName,
+ String healthModelName, HealthModelUpdate properties) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, healthModelName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ HealthModelInner.class, HealthModelInner.class, this.client.getContext());
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link PollerFlux} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, HealthModelInner> beginUpdateAsync(String resourceGroupName,
+ String healthModelName, HealthModelUpdate properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, healthModelName, properties, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ HealthModelInner.class, HealthModelInner.class, context);
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, HealthModelInner> beginUpdate(String resourceGroupName,
+ String healthModelName, HealthModelUpdate properties) {
+ return this.beginUpdateAsync(resourceGroupName, healthModelName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 {@link SyncPoller} for polling of a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, HealthModelInner> beginUpdate(String resourceGroupName,
+ String healthModelName, HealthModelUpdate properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, healthModelName, properties, context).getSyncPoller();
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String healthModelName,
+ HealthModelUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, healthModelName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String healthModelName,
+ HealthModelUpdate properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, healthModelName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthModelInner update(String resourceGroupName, String healthModelName, HealthModelUpdate properties) {
+ return updateAsync(resourceGroupName, healthModelName, properties).block();
+ }
+
+ /**
+ * Update a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param properties The resource properties to be updated.
+ * @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 a HealthModel resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthModelInner update(String resourceGroupName, String healthModelName, HealthModelUpdate properties,
+ Context context) {
+ return updateAsync(resourceGroupName, healthModelName, properties, context).block();
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String healthModelName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, healthModelName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String healthModelName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (healthModelName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter healthModelName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, healthModelName, accept, context);
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String healthModelName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, healthModelName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String healthModelName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, healthModelName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String healthModelName) {
+ return this.beginDeleteAsync(resourceGroupName, healthModelName).getSyncPoller();
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String healthModelName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, healthModelName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String healthModelName) {
+ return beginDeleteAsync(resourceGroupName, healthModelName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String healthModelName, Context context) {
+ return beginDeleteAsync(resourceGroupName, healthModelName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String healthModelName) {
+ deleteAsync(resourceGroupName, healthModelName).block();
+ }
+
+ /**
+ * Delete a HealthModel.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param healthModelName Name of health model resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String healthModelName, Context context) {
+ deleteAsync(resourceGroupName, healthModelName, context).block();
+ }
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a HealthModel list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, 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()));
+ }
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a HealthModel list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a HealthModel list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * List HealthModel resources by resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ 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(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ 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(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List HealthModel resources by subscription ID.
+ *
+ * @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 response of a HealthModel list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a HealthModel list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 response of a HealthModel list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono