diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/HealthcareApisManager.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/HealthcareApisManager.java deleted file mode 100644 index 86d1c785db2d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/HealthcareApisManager.java +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.HealthcareApisManagementClient; -import com.azure.resourcemanager.healthcareapis.implementation.HealthcareApisManagementClientBuilder; -import com.azure.resourcemanager.healthcareapis.implementation.OperationResultsImpl; -import com.azure.resourcemanager.healthcareapis.implementation.OperationsImpl; -import com.azure.resourcemanager.healthcareapis.implementation.PrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.healthcareapis.implementation.PrivateLinkResourcesImpl; -import com.azure.resourcemanager.healthcareapis.implementation.ServicesImpl; -import com.azure.resourcemanager.healthcareapis.models.OperationResults; -import com.azure.resourcemanager.healthcareapis.models.Operations; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnections; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResources; -import com.azure.resourcemanager.healthcareapis.models.Services; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Entry point to HealthcareApisManager. Azure Healthcare APIs Client. */ -public final class HealthcareApisManager { - private Services services; - - private Operations operations; - - private OperationResults operationResults; - - private PrivateEndpointConnections privateEndpointConnections; - - private PrivateLinkResources privateLinkResources; - - private final HealthcareApisManagementClient clientObject; - - private HealthcareApisManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new HealthcareApisManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of HealthcareApis service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the HealthcareApis service API instance. - */ - public static HealthcareApisManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Gets a Configurable instance that can be used to create HealthcareApisManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new HealthcareApisManager.Configurable(); - } - - /** The Configurable allowing configurations to be set. */ - public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private RetryPolicy retryPolicy; - 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; - } - - /** - * 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 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, "'retryPolicy' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of HealthcareApis service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the HealthcareApis service API instance. - */ - public HealthcareApisManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.healthcareapis") - .append("/") - .append("1.0.0-beta.1"); - 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 (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new RequestIdPolicy()); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies - .add( - new BearerTokenAuthenticationPolicy( - credential, profile.getEnvironment().getManagementEndpoint() + "/.default")); - policies.addAll(this.policies); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new HealthcareApisManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** @return Resource collection API of Services. */ - public Services services() { - if (this.services == null) { - this.services = new ServicesImpl(clientObject.getServices(), this); - } - return services; - } - - /** @return Resource collection API of Operations. */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** @return Resource collection API of OperationResults. */ - public OperationResults operationResults() { - if (this.operationResults == null) { - this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this); - } - return operationResults; - } - - /** @return Resource collection API of PrivateEndpointConnections. */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections = - new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); - } - return privateEndpointConnections; - } - - /** @return Resource collection API of PrivateLinkResources. */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); - } - return privateLinkResources; - } - - /** - * @return Wrapped service client HealthcareApisManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - */ - public HealthcareApisManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/HealthcareApisManagementClient.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/HealthcareApisManagementClient.java deleted file mode 100644 index 5a3aa9a9322d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/HealthcareApisManagementClient.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for HealthcareApisManagementClient class. */ -public interface HealthcareApisManagementClient { - /** - * Gets The subscription identifier. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * 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 ServicesClient object to access its operations. - * - * @return the ServicesClient object. - */ - ServicesClient getServices(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the OperationResultsClient object to access its operations. - * - * @return the OperationResultsClient object. - */ - OperationResultsClient getOperationResults(); - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - PrivateEndpointConnectionsClient getPrivateEndpointConnections(); - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - PrivateLinkResourcesClient getPrivateLinkResources(); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/OperationResultsClient.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/OperationResultsClient.java deleted file mode 100644 index 574af9ac4257..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/OperationResultsClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner; - -/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ -public interface OperationResultsClient { - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @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 operation result for a long running operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OperationResultsDescriptionInner get(String locationName, String operationResultId); - - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @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 operation result for a long running operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String locationName, String operationResultId, Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/OperationsClient.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/OperationsClient.java deleted file mode 100644 index 60ab5d2d0cc4..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/OperationsClient.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.healthcareapis.fluent.models.OperationInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all of the available Healthcare service REST API operations. - * - * @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 service operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @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 service operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/PrivateEndpointConnectionsClient.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/PrivateEndpointConnectionsClient.java deleted file mode 100644 index 77e764445147..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/PrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,228 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnection; - -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public interface PrivateEndpointConnectionsClient { - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByService( - String resourceGroupName, String resourceName); - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByService( - String resourceGroupName, String resourceName, Context context); - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionDescriptionInner get( - String resourceGroupName, String resourceName, String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, PrivateEndpointConnectionDescriptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties); - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, PrivateEndpointConnectionDescriptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties, - Context context); - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionDescriptionInner createOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties); - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionDescriptionInner createOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties, - Context context); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 resourceName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 resourceName, String privateEndpointConnectionName, Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/PrivateLinkResourcesClient.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/PrivateLinkResourcesClient.java deleted file mode 100644 index 385a469fa0c3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/PrivateLinkResourcesClient.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner; - -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public interface PrivateLinkResourcesClient { - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 private link resources that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultDescriptionInner listByService(String resourceGroupName, String resourceName); - - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 private link resources that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listByServiceWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @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 private link resource that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceDescriptionInner get(String resourceGroupName, String resourceName, String groupName); - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @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 private link resource that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String resourceName, String groupName, Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/ServicesClient.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/ServicesClient.java deleted file mode 100644 index 05834993a96b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/ServicesClient.java +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.healthcareapis.fluent.models.ServicesDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner; -import com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; - -/** An instance of this class provides access to all the operations defined in ServicesClient. */ -public interface ServicesClient { - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 metadata of a service instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesDescriptionInner getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 metadata of a service instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServicesDescriptionInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription); - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServicesDescriptionInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context); - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesDescriptionInner createOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription); - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesDescriptionInner createOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context); - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServicesDescriptionInner> beginUpdate( - String resourceGroupName, String resourceName, ServicesPatchDescription servicePatchDescription); - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ServicesDescriptionInner> beginUpdate( - String resourceGroupName, - String resourceName, - ServicesPatchDescription servicePatchDescription, - Context context); - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesDescriptionInner update( - String resourceGroupName, String resourceName, ServicesPatchDescription servicePatchDescription); - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesDescriptionInner update( - String resourceGroupName, - String resourceName, - ServicesPatchDescription servicePatchDescription, - Context context); - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName); - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context); - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 resourceName); - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 resourceName, Context context); - - /** - * Get all the service instances in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get all the service instances in a subscription. - * - * @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 all the service instances in a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @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 all the service instances in a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @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 all the service instances in a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @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 properties indicating whether a given service name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServicesNameAvailabilityInfoInner checkNameAvailability( - CheckNameAvailabilityParameters checkNameAvailabilityInputs); - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @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 properties indicating whether a given service name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityParameters checkNameAvailabilityInputs, Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationInner.java deleted file mode 100644 index 664e4171f0b3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationInner.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Service REST API operation. */ -@Fluent -public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - - /* - * Operation name: {provider}/{resource}/{read | write | action | delete} - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Default value is 'user,system'. - */ - @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) - private String origin; - - /* - * The information displayed about the operation. - */ - @JsonProperty(value = "display") - private OperationDisplay display; - - /** - * Get the name property: Operation name: {provider}/{resource}/{read | write | action | delete}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the origin property: Default value is 'user,system'. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Get the display property: The information displayed about the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: The information displayed about the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationResultsDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationResultsDescriptionInner.java deleted file mode 100644 index 2f3d1bcc1f28..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/OperationResultsDescriptionInner.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.models.OperationResultStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties indicating the operation result of an operation on a service. */ -@Fluent -public final class OperationResultsDescriptionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsDescriptionInner.class); - - /* - * The ID of the operation returned. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The name of the operation result. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The status of the operation being performed. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private OperationResultStatus status; - - /* - * The time that the operation was started. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private String startTime; - - /* - * Additional properties of the operation result. - */ - @JsonProperty(value = "properties") - private Object properties; - - /** - * Get the id property: The ID of the operation returned. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the operation result. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the status property: The status of the operation being performed. - * - * @return the status value. - */ - public OperationResultStatus status() { - return this.status; - } - - /** - * Get the startTime property: The time that the operation was started. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Get the properties property: Additional properties of the operation result. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: Additional properties of the operation result. - * - * @param properties the properties value to set. - * @return the OperationResultsDescriptionInner object itself. - */ - public OperationResultsDescriptionInner withProperties(Object properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionDescriptionInner.java deleted file mode 100644 index c329e32cbd83..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateEndpointConnectionDescriptionInner.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnection; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Private Endpoint Connection resource. */ -@Immutable -public final class PrivateEndpointConnectionDescriptionInner extends PrivateEndpointConnection { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionDescriptionInner.class); - - /* - * System metadata for this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the systemData property: System metadata for this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionDescriptionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - super.withPrivateEndpoint(privateEndpoint); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateEndpointConnectionDescriptionInner withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - super.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceDescriptionInner.java deleted file mode 100644 index 062a4cc4ece2..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceDescriptionInner.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResource; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The Private Endpoint Connection resource. */ -@Immutable -public final class PrivateLinkResourceDescriptionInner extends PrivateLinkResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceDescriptionInner.class); - - /* - * System metadata for this resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the systemData property: System metadata for this resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public PrivateLinkResourceDescriptionInner withRequiredZoneNames(List requiredZoneNames) { - super.withRequiredZoneNames(requiredZoneNames); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceListResultDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceListResultDescriptionInner.java deleted file mode 100644 index 4d73778ce293..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/PrivateLinkResourceListResultDescriptionInner.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of private link resources. */ -@Fluent -public final class PrivateLinkResourceListResultDescriptionInner { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateLinkResourceListResultDescriptionInner.class); - - /* - * Array of private link resources - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResultDescriptionInner object itself. - */ - public PrivateLinkResourceListResultDescriptionInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesDescriptionInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesDescriptionInner.java deleted file mode 100644 index 74014631fafb..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesDescriptionInner.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.models.Kind; -import com.azure.resourcemanager.healthcareapis.models.ServicesProperties; -import com.azure.resourcemanager.healthcareapis.models.ServicesResource; -import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The description of the service. */ -@Fluent -public final class ServicesDescriptionInner extends ServicesResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesDescriptionInner.class); - - /* - * The common properties of a service. - */ - @JsonProperty(value = "properties") - private ServicesProperties properties; - - /* - * Metadata pertaining to creation and last modification of the resource. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: The common properties of a service. - * - * @return the properties value. - */ - public ServicesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The common properties of a service. - * - * @param properties the properties value to set. - * @return the ServicesDescriptionInner object itself. - */ - public ServicesDescriptionInner withProperties(ServicesProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public ServicesDescriptionInner withKind(Kind kind) { - super.withKind(kind); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServicesDescriptionInner withEtag(String etag) { - super.withEtag(etag); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServicesDescriptionInner withIdentity(ServicesResourceIdentity identity) { - super.withIdentity(identity); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServicesDescriptionInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServicesDescriptionInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesNameAvailabilityInfoInner.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesNameAvailabilityInfoInner.java deleted file mode 100644 index 9614c25b85ad..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/ServicesNameAvailabilityInfoInner.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.models.ServiceNameUnavailabilityReason; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties indicating whether a given service name is available. */ -@Fluent -public final class ServicesNameAvailabilityInfoInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesNameAvailabilityInfoInner.class); - - /* - * The value which indicates whether the provided name is available. - */ - @JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean nameAvailable; - - /* - * The reason for unavailability. - */ - @JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY) - private ServiceNameUnavailabilityReason reason; - - /* - * The detailed reason message. - */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the nameAvailable property: The value which indicates whether the provided name is available. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Get the reason property: The reason for unavailability. - * - * @return the reason value. - */ - public ServiceNameUnavailabilityReason reason() { - return this.reason; - } - - /** - * Get the message property: The detailed reason message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: The detailed reason message. - * - * @param message the message value to set. - * @return the ServicesNameAvailabilityInfoInner object itself. - */ - public ServicesNameAvailabilityInfoInner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/package-info.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/package-info.java deleted file mode 100644 index d4cec6d325e3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the inner data models for HealthcareApisManagementClient. Azure Healthcare APIs Client. */ -package com.azure.resourcemanager.healthcareapis.fluent.models; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/package-info.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/package-info.java deleted file mode 100644 index 8ded6c898ac3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/fluent/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the service clients for HealthcareApisManagementClient. Azure Healthcare APIs Client. */ -package com.azure.resourcemanager.healthcareapis.fluent; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientBuilder.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientBuilder.java deleted file mode 100644 index 311aced0288b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientBuilder.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.CookiePolicy; -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 HealthcareApisManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {HealthcareApisManagementClientImpl.class}) -public final class HealthcareApisManagementClientBuilder { - /* - * The subscription identifier. - */ - private String subscriptionId; - - /** - * Sets The subscription identifier. - * - * @param subscriptionId the subscriptionId value. - * @return the HealthcareApisManagementClientBuilder. - */ - public HealthcareApisManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the HealthcareApisManagementClientBuilder. - */ - public HealthcareApisManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the HealthcareApisManagementClientBuilder. - */ - public HealthcareApisManagementClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - 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 HealthcareApisManagementClientBuilder. - */ - public HealthcareApisManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - 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 HealthcareApisManagementClientBuilder. - */ - public HealthcareApisManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - 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 HealthcareApisManagementClientBuilder. - */ - public HealthcareApisManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of HealthcareApisManagementClientImpl with the provided parameters. - * - * @return an instance of HealthcareApisManagementClientImpl. - */ - public HealthcareApisManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - HealthcareApisManagementClientImpl client = - new HealthcareApisManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); - return client; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientImpl.java deleted file mode 100644 index fb4a7412bc0c..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/HealthcareApisManagementClientImpl.java +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.annotation.ServiceClient; -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.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.healthcareapis.fluent.HealthcareApisManagementClient; -import com.azure.resourcemanager.healthcareapis.fluent.OperationResultsClient; -import com.azure.resourcemanager.healthcareapis.fluent.OperationsClient; -import com.azure.resourcemanager.healthcareapis.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.healthcareapis.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.healthcareapis.fluent.ServicesClient; -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 java.util.Map; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** Initializes a new instance of the HealthcareApisManagementClientImpl type. */ -@ServiceClient(builder = HealthcareApisManagementClientBuilder.class) -public final class HealthcareApisManagementClientImpl implements HealthcareApisManagementClient { - private final ClientLogger logger = new ClientLogger(HealthcareApisManagementClientImpl.class); - - /** The subscription identifier. */ - private final String subscriptionId; - - /** - * Gets The subscription identifier. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** server parameter. */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** Api Version. */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** 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 ServicesClient object to access its operations. */ - private final ServicesClient services; - - /** - * Gets the ServicesClient object to access its operations. - * - * @return the ServicesClient object. - */ - public ServicesClient getServices() { - return this.services; - } - - /** 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 OperationResultsClient object to access its operations. */ - private final OperationResultsClient operationResults; - - /** - * Gets the OperationResultsClient object to access its operations. - * - * @return the OperationResultsClient object. - */ - public OperationResultsClient getOperationResults() { - return this.operationResults; - } - - /** The PrivateEndpointConnectionsClient object to access its operations. */ - private final PrivateEndpointConnectionsClient privateEndpointConnections; - - /** - * Gets the PrivateEndpointConnectionsClient object to access its operations. - * - * @return the PrivateEndpointConnectionsClient object. - */ - public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** The PrivateLinkResourcesClient object to access its operations. */ - private final PrivateLinkResourcesClient privateLinkResources; - - /** - * Gets the PrivateLinkResourcesClient object to access its operations. - * - * @return the PrivateLinkResourcesClient object. - */ - public PrivateLinkResourcesClient getPrivateLinkResources() { - return this.privateLinkResources; - } - - /** - * Initializes an instance of HealthcareApisManagementClient 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 subscriptionId The subscription identifier. - * @param endpoint server parameter. - */ - HealthcareApisManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2021-01-11"; - this.services = new ServicesClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.operationResults = new OperationResultsClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(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) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return 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(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)); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationImpl.java deleted file mode 100644 index ecb3ae9369f7..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationInner; -import com.azure.resourcemanager.healthcareapis.models.Operation; -import com.azure.resourcemanager.healthcareapis.models.OperationDisplay; - -public final class OperationImpl implements Operation { - private OperationInner innerObject; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - OperationImpl( - OperationInner innerObject, com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public OperationInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsClientImpl.java deleted file mode 100644 index 928c034e4158..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsClientImpl.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.OperationResultsClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationResultsClient. */ -public final class OperationResultsClientImpl implements OperationResultsClient { - private final ClientLogger logger = new ClientLogger(OperationResultsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationResultsService service; - - /** The service client containing this operation class. */ - private final HealthcareApisManagementClientImpl client; - - /** - * Initializes an instance of OperationResultsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationResultsClientImpl(HealthcareApisManagementClientImpl client) { - this.service = - RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HealthcareApisManagementClientOperationResults to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HealthcareApisManage") - private interface OperationResultsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/locations/{locationName}" - + "/operationresults/{operationResultId}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("locationName") String locationName, - @PathParam("operationResultId") String operationResultId, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result for a long running operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String operationResultId) { - 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationResultId == null) { - return Mono - .error(new IllegalArgumentException("Parameter operationResultId 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(), - locationName, - operationResultId, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @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 operation result for a long running operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String locationName, String operationResultId, 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 (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (operationResultId == null) { - return Mono - .error(new IllegalArgumentException("Parameter operationResultId 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(), - locationName, - operationResultId, - accept, - context); - } - - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result for a long running operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String locationName, String operationResultId) { - return getWithResponseAsync(locationName, operationResultId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the operation result for a long running operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OperationResultsDescriptionInner get(String locationName, String operationResultId) { - return getAsync(locationName, operationResultId).block(); - } - - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @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 operation result for a long running operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String locationName, String operationResultId, Context context) { - return getWithResponseAsync(locationName, operationResultId, context).block(); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsDescriptionImpl.java deleted file mode 100644 index 79cfee1c250c..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsDescriptionImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.OperationResultStatus; -import com.azure.resourcemanager.healthcareapis.models.OperationResultsDescription; - -public final class OperationResultsDescriptionImpl implements OperationResultsDescription { - private OperationResultsDescriptionInner innerObject; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - OperationResultsDescriptionImpl( - OperationResultsDescriptionInner innerObject, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public OperationResultStatus status() { - return this.innerModel().status(); - } - - public String startTime() { - return this.innerModel().startTime(); - } - - public Object properties() { - return this.innerModel().properties(); - } - - public OperationResultsDescriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsImpl.java deleted file mode 100644 index 42938b40ab19..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationResultsImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.OperationResultsClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.OperationResults; -import com.azure.resourcemanager.healthcareapis.models.OperationResultsDescription; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationResultsImpl implements OperationResults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsImpl.class); - - private final OperationResultsClient innerClient; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - public OperationResultsImpl( - OperationResultsClient innerClient, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public OperationResultsDescription get(String locationName, String operationResultId) { - OperationResultsDescriptionInner inner = this.serviceClient().get(locationName, operationResultId); - if (inner != null) { - return new OperationResultsDescriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String locationName, String operationResultId, Context context) { - Response inner = - this.serviceClient().getWithResponse(locationName, operationResultId, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OperationResultsDescriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private OperationResultsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsClientImpl.java deleted file mode 100644 index e8a4fb33de19..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.OperationsClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationInner; -import com.azure.resourcemanager.healthcareapis.models.OperationListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final OperationsService service; - - /** The service client containing this operation class. */ - private final HealthcareApisManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(HealthcareApisManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HealthcareApisManagementClientOperations to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HealthcareApisManage") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.HealthcareApis/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @throws 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 service operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @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 list of service operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @throws 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 service operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @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 list of service operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @throws 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 service operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @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 list of service operations. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of service operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of service operations. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsImpl.java deleted file mode 100644 index 7ba00ce85913..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/OperationsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.OperationsClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationInner; -import com.azure.resourcemanager.healthcareapis.models.Operation; -import com.azure.resourcemanager.healthcareapis.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionDescriptionImpl.java deleted file mode 100644 index 8099c37372a0..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionDescriptionImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpoint; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnection; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkServiceConnectionState; - -public final class PrivateEndpointConnectionDescriptionImpl - implements PrivateEndpointConnectionDescription, - PrivateEndpointConnectionDescription.Definition, - PrivateEndpointConnectionDescription.Update { - private PrivateEndpointConnectionDescriptionInner innerObject; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public PrivateEndpoint privateEndpoint() { - return this.innerModel().privateEndpoint(); - } - - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerModel().privateLinkServiceConnectionState(); - } - - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PrivateEndpointConnectionDescriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String resourceName; - - private String privateEndpointConnectionName; - - private PrivateEndpointConnection createProperties; - - private PrivateEndpointConnection updateProperties; - - public PrivateEndpointConnectionDescriptionImpl withExistingService(String resourceGroupName, String resourceName) { - this.resourceGroupName = resourceGroupName; - this.resourceName = resourceName; - return this; - } - - public PrivateEndpointConnectionDescription create() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, resourceName, privateEndpointConnectionName, createProperties, Context.NONE); - return this; - } - - public PrivateEndpointConnectionDescription create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, resourceName, privateEndpointConnectionName, createProperties, context); - return this; - } - - PrivateEndpointConnectionDescriptionImpl( - String name, com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = new PrivateEndpointConnectionDescriptionInner(); - this.serviceManager = serviceManager; - this.privateEndpointConnectionName = name; - this.createProperties = new PrivateEndpointConnection(); - } - - public PrivateEndpointConnectionDescriptionImpl update() { - this.updateProperties = new PrivateEndpointConnection(); - return this; - } - - public PrivateEndpointConnectionDescription apply() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, resourceName, privateEndpointConnectionName, updateProperties, Context.NONE); - return this; - } - - public PrivateEndpointConnectionDescription apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .createOrUpdate( - resourceGroupName, resourceName, privateEndpointConnectionName, updateProperties, context); - return this; - } - - PrivateEndpointConnectionDescriptionImpl( - PrivateEndpointConnectionDescriptionInner innerObject, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); - } - - public PrivateEndpointConnectionDescription refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - return this; - } - - public PrivateEndpointConnectionDescription refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getPrivateEndpointConnections() - .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context) - .getValue(); - return this; - } - - public PrivateEndpointConnectionDescriptionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (isInCreateMode()) { - this.createProperties.withPrivateEndpoint(privateEndpoint); - return this; - } else { - this.updateProperties.withPrivateEndpoint(privateEndpoint); - return this; - } - } - - public PrivateEndpointConnectionDescriptionImpl withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (isInCreateMode()) { - this.createProperties.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } else { - this.updateProperties.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsClientImpl.java deleted file mode 100644 index 119982024827..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,1101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.healthcareapis.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnection; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionListResultDescription; -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 PrivateEndpointConnectionsClient. */ -public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final PrivateEndpointConnectionsService service; - - /** The service client containing this operation class. */ - private final HealthcareApisManagementClientImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionsClientImpl(HealthcareApisManagementClientImpl client) { - this.service = - RestProxy - .create( - PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HealthcareApisManagementClientPrivateEndpointConnections to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HealthcareApisManage") - private interface PrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}/privateEndpointConnections") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @BodyParam("application/json") PrivateEndpointConnection properties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServiceSinglePageAsync( - String resourceGroupName, String resourceName) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServiceSinglePageAsync( - String resourceGroupName, String resourceName, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServiceAsync( - String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByServiceSinglePageAsync(resourceGroupName, resourceName)); - } - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByServiceAsync( - String resourceGroupName, String resourceName, Context context) { - return new PagedFlux<>(() -> listByServiceSinglePageAsync(resourceGroupName, resourceName, context)); - } - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByService( - String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByServiceAsync(resourceGroupName, resourceName)); - } - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 list of private endpoint connection associated with the specified storage account. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByService( - String resourceGroupName, String resourceName, Context context) { - return new PagedIterable<>(listByServiceAsync(resourceGroupName, resourceName, context)); - } - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - privateEndpointConnectionName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - privateEndpointConnectionName, - accept, - context); - } - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionDescriptionInner get( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - return getAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block(); - } - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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 accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - privateEndpointConnectionName, - properties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName 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 accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - privateEndpointConnectionName, - properties, - accept, - context); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, PrivateEndpointConnectionDescriptionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionDescriptionInner.class, - PrivateEndpointConnectionDescriptionInner.class, - Context.NONE); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, PrivateEndpointConnectionDescriptionInner> - beginCreateOrUpdateAsync( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, resourceName, privateEndpointConnectionName, properties, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - PrivateEndpointConnectionDescriptionInner.class, - PrivateEndpointConnectionDescriptionInner.class, - context); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, PrivateEndpointConnectionDescriptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties) - .getSyncPoller(); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, PrivateEndpointConnectionDescriptionInner> - beginCreateOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, resourceName, privateEndpointConnectionName, properties, context) - .getSyncPoller(); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, resourceName, privateEndpointConnectionName, properties, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionDescriptionInner createOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties) { - return createOrUpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties).block(); - } - - /** - * Update the state of the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * resource. - * @param properties The private endpoint connection properties. - * @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 Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionDescriptionInner createOrUpdate( - String resourceGroupName, - String resourceName, - String privateEndpointConnectionName, - PrivateEndpointConnection properties, - Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties, context) - .block(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - privateEndpointConnectionName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - privateEndpointConnectionName, - accept, - context); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).getSyncPoller(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) - .getSyncPoller(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 resourceName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block(); - } - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 resourceName, String privateEndpointConnectionName, Context context) { - deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block(); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsImpl.java deleted file mode 100644 index 97eb68ada13e..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.healthcareapis.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnectionDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); - - private final PrivateEndpointConnectionsClient innerClient; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - public PrivateEndpointConnectionsImpl( - PrivateEndpointConnectionsClient innerClient, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByService( - String resourceGroupName, String resourceName) { - PagedIterable inner = - this.serviceClient().listByService(resourceGroupName, resourceName); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); - } - - public PagedIterable listByService( - String resourceGroupName, String resourceName, Context context) { - PagedIterable inner = - this.serviceClient().listByService(resourceGroupName, resourceName, context); - return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionDescriptionImpl(inner1, this.manager())); - } - - public PrivateEndpointConnectionDescription get( - String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - PrivateEndpointConnectionDescriptionInner inner = - this.serviceClient().get(resourceGroupName, resourceName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionDescriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PrivateEndpointConnectionDescriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName); - } - - public void delete( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) { - this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName, context); - } - - public PrivateEndpointConnectionDescription getById(String id) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); - } - return this - .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); - } - return this.getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); - } - this.delete(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); - if (privateEndpointConnectionName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", - id))); - } - this.delete(resourceGroupName, resourceName, privateEndpointConnectionName, context); - } - - private PrivateEndpointConnectionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } - - public PrivateEndpointConnectionDescriptionImpl define(String name) { - return new PrivateEndpointConnectionDescriptionImpl(name, this.manager()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourceDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourceDescriptionImpl.java deleted file mode 100644 index 3f0794cafe6d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourceDescriptionImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceDescription; -import java.util.Collections; -import java.util.List; - -public final class PrivateLinkResourceDescriptionImpl implements PrivateLinkResourceDescription { - private PrivateLinkResourceDescriptionInner innerObject; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - PrivateLinkResourceDescriptionImpl( - PrivateLinkResourceDescriptionInner innerObject, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String groupId() { - return this.innerModel().groupId(); - } - - public List requiredMembers() { - List inner = this.innerModel().requiredMembers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List requiredZoneNames() { - List inner = this.innerModel().requiredZoneNames(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public PrivateLinkResourceDescriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourceListResultDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourceListResultDescriptionImpl.java deleted file mode 100644 index 0f136850930a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourceListResultDescriptionImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceListResultDescription; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class PrivateLinkResourceListResultDescriptionImpl implements PrivateLinkResourceListResultDescription { - private PrivateLinkResourceListResultDescriptionInner innerObject; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - PrivateLinkResourceListResultDescriptionImpl( - PrivateLinkResourceListResultDescriptionInner innerObject, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new PrivateLinkResourceDescriptionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public PrivateLinkResourceListResultDescriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourcesClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourcesClientImpl.java deleted file mode 100644 index 608968bb1de5..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourcesClientImpl.java +++ /dev/null @@ -1,403 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ -public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final PrivateLinkResourcesService service; - - /** The service client containing this operation class. */ - private final HealthcareApisManagementClientImpl client; - - /** - * Initializes an instance of PrivateLinkResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateLinkResourcesClientImpl(HealthcareApisManagementClientImpl client) { - this.service = - RestProxy - .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HealthcareApisManagementClientPrivateLinkResources to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HealthcareApisManage") - private interface PrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}/privateLinkResources") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByService( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}/privateLinkResources/{groupName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, - @PathParam("groupName") String groupName, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServiceWithResponseAsync( - String resourceGroupName, String resourceName) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 private link resources that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByServiceWithResponseAsync( - String resourceGroupName, String resourceName, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByService( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listByServiceAsync( - String resourceGroupName, String resourceName) { - return listByServiceWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultDescriptionInner listByService(String resourceGroupName, String resourceName) { - return listByServiceAsync(resourceGroupName, resourceName).block(); - } - - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 private link resources that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listByServiceWithResponse( - String resourceGroupName, String resourceName, Context context) { - return listByServiceWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 private link resource that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String groupName) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - groupName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @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 private link resource that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String resourceName, String groupName, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (groupName == null) { - return Mono.error(new IllegalArgumentException("Parameter groupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - this.client.getApiVersion(), - groupName, - accept, - context); - } - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 private link resource that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String resourceName, String groupName) { - return getWithResponseAsync(resourceGroupName, resourceName, groupName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 private link resource that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceDescriptionInner get(String resourceGroupName, String resourceName, String groupName) { - return getAsync(resourceGroupName, resourceName, groupName).block(); - } - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @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 private link resource that need to be created for a service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String resourceName, String groupName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, groupName, context).block(); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourcesImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourcesImpl.java deleted file mode 100644 index d3281ea664c3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/PrivateLinkResourcesImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.PrivateLinkResourcesClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResourceListResultDescription; -import com.azure.resourcemanager.healthcareapis.models.PrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); - - private final PrivateLinkResourcesClient innerClient; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - public PrivateLinkResourcesImpl( - PrivateLinkResourcesClient innerClient, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PrivateLinkResourceListResultDescription listByService(String resourceGroupName, String resourceName) { - PrivateLinkResourceListResultDescriptionInner inner = - this.serviceClient().listByService(resourceGroupName, resourceName); - if (inner != null) { - return new PrivateLinkResourceListResultDescriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listByServiceWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().listByServiceWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PrivateLinkResourceListResultDescriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateLinkResourceDescription get(String resourceGroupName, String resourceName, String groupName) { - PrivateLinkResourceDescriptionInner inner = - this.serviceClient().get(resourceGroupName, resourceName, groupName); - if (inner != null) { - return new PrivateLinkResourceDescriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse( - String resourceGroupName, String resourceName, String groupName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, resourceName, groupName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PrivateLinkResourceDescriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private PrivateLinkResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesClientImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesClientImpl.java deleted file mode 100644 index 570a825d4d38..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesClientImpl.java +++ /dev/null @@ -1,1729 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.Post; -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.logging.ClientLogger; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.healthcareapis.fluent.ServicesClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner; -import com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.healthcareapis.models.ServicesDescriptionListResult; -import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; -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 ServicesClient. */ -public final class ServicesClientImpl implements ServicesClient { - private final ClientLogger logger = new ClientLogger(ServicesClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ServicesService service; - - /** The service client containing this operation class. */ - private final HealthcareApisManagementClientImpl client; - - /** - * Initializes an instance of ServicesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ServicesClientImpl(HealthcareApisManagementClientImpl client) { - this.service = RestProxy.create(ServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for HealthcareApisManagementClientServices to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "HealthcareApisManage") - private interface ServicesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ServicesDescriptionInner serviceDescription, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ServicesPatchDescription servicePatchDescription, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services/{resourceName}") - @ExpectedResponses({202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/services") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthcareApis" - + "/services") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") 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"}) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HealthcareApis/checkNameAvailability") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityParameters checkNameAvailabilityInputs, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the metadata of a service instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName 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, - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 metadata of a service instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String resourceName, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName 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, - resourceName, - accept, - context); - } - - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the metadata of a service instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the metadata of a service instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesDescriptionInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupAsync(resourceGroupName, resourceName).block(); - } - - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 metadata of a service instance. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (serviceDescription == null) { - return Mono - .error(new IllegalArgumentException("Parameter serviceDescription is required and cannot be null.")); - } else { - serviceDescription.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - serviceDescription, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (serviceDescription == null) { - return Mono - .error(new IllegalArgumentException("Parameter serviceDescription is required and cannot be null.")); - } else { - serviceDescription.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - serviceDescription, - accept, - context); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServicesDescriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, serviceDescription); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServicesDescriptionInner.class, - ServicesDescriptionInner.class, - Context.NONE); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServicesDescriptionInner> beginCreateOrUpdateAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, resourceName, serviceDescription, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServicesDescriptionInner.class, - ServicesDescriptionInner.class, - context); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServicesDescriptionInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription).getSyncPoller(); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServicesDescriptionInner> beginCreateOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription, context).getSyncPoller(); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, serviceDescription, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesDescriptionInner createOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription) { - return createOrUpdateAsync(resourceGroupName, resourceName, serviceDescription).block(); - } - - /** - * Create or update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param serviceDescription The service instance metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesDescriptionInner createOrUpdate( - String resourceGroupName, String resourceName, ServicesDescriptionInner serviceDescription, Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, serviceDescription, context).block(); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String resourceName, ServicesPatchDescription servicePatchDescription) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (servicePatchDescription == null) { - return Mono - .error( - new IllegalArgumentException("Parameter servicePatchDescription is required and cannot be null.")); - } else { - servicePatchDescription.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - servicePatchDescription, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String resourceName, - ServicesPatchDescription servicePatchDescription, - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (servicePatchDescription == null) { - return Mono - .error( - new IllegalArgumentException("Parameter servicePatchDescription is required and cannot be null.")); - } else { - servicePatchDescription.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - resourceName, - servicePatchDescription, - accept, - context); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServicesDescriptionInner> beginUpdateAsync( - String resourceGroupName, String resourceName, ServicesPatchDescription servicePatchDescription) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, resourceName, servicePatchDescription); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServicesDescriptionInner.class, - ServicesDescriptionInner.class, - Context.NONE); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ServicesDescriptionInner> beginUpdateAsync( - String resourceGroupName, - String resourceName, - ServicesPatchDescription servicePatchDescription, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, resourceName, servicePatchDescription, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ServicesDescriptionInner.class, - ServicesDescriptionInner.class, - context); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServicesDescriptionInner> beginUpdate( - String resourceGroupName, String resourceName, ServicesPatchDescription servicePatchDescription) { - return beginUpdateAsync(resourceGroupName, resourceName, servicePatchDescription).getSyncPoller(); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ServicesDescriptionInner> beginUpdate( - String resourceGroupName, - String resourceName, - ServicesPatchDescription servicePatchDescription, - Context context) { - return beginUpdateAsync(resourceGroupName, resourceName, servicePatchDescription, context).getSyncPoller(); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String resourceName, ServicesPatchDescription servicePatchDescription) { - return beginUpdateAsync(resourceGroupName, resourceName, servicePatchDescription) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String resourceName, - ServicesPatchDescription servicePatchDescription, - Context context) { - return beginUpdateAsync(resourceGroupName, resourceName, servicePatchDescription, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesDescriptionInner update( - String resourceGroupName, String resourceName, ServicesPatchDescription servicePatchDescription) { - return updateAsync(resourceGroupName, resourceName, servicePatchDescription).block(); - } - - /** - * Update the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param servicePatchDescription The service instance metadata and security metadata. - * @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 description of the service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesDescriptionInner update( - String resourceGroupName, - String resourceName, - ServicesPatchDescription servicePatchDescription, - Context context) { - return updateAsync(resourceGroupName, resourceName, servicePatchDescription, context).block(); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName 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, - resourceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String resourceName, 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 (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName 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, - resourceName, - accept, - context); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String resourceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { - return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName) { - return beginDeleteAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); - } - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 resourceName, Context context) { - deleteAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Get all the service instances in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a subscription. - */ - @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())); - } - - /** - * Get all the service instances in a subscription. - * - * @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 all the service instances in a subscription. - */ - @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)); - } - - /** - * Get all the service instances in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get all the service instances in a subscription. - * - * @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 all the service instances in a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all the service instances in a subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get all the service instances in a subscription. - * - * @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 all the service instances in a subscription. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a resource group. - */ - @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())); - } - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @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 all the service instances in a resource group. - */ - @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)); - } - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @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 all the service instances in a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @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 all the service instances in a resource group. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties indicating whether a given service name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - CheckNameAvailabilityParameters checkNameAvailabilityInputs) { - 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 (checkNameAvailabilityInputs == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityInputs is required and cannot be null.")); - } else { - checkNameAvailabilityInputs.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - checkNameAvailabilityInputs, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @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 properties indicating whether a given service name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - CheckNameAvailabilityParameters checkNameAvailabilityInputs, 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 (checkNameAvailabilityInputs == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityInputs is required and cannot be null.")); - } else { - checkNameAvailabilityInputs.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - checkNameAvailabilityInputs, - accept, - context); - } - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties indicating whether a given service name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - CheckNameAvailabilityParameters checkNameAvailabilityInputs) { - return checkNameAvailabilityWithResponseAsync(checkNameAvailabilityInputs) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties indicating whether a given service name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServicesNameAvailabilityInfoInner checkNameAvailability( - CheckNameAvailabilityParameters checkNameAvailabilityInputs) { - return checkNameAvailabilityAsync(checkNameAvailabilityInputs).block(); - } - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @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 properties indicating whether a given service name is available. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityParameters checkNameAvailabilityInputs, Context context) { - return checkNameAvailabilityWithResponseAsync(checkNameAvailabilityInputs, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of service description objects with a next link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of service description objects with a next link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of service description objects with a next link. - */ - @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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of service description objects with a next link. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesDescriptionImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesDescriptionImpl.java deleted file mode 100644 index aa1e231881a4..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesDescriptionImpl.java +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; -import com.azure.resourcemanager.healthcareapis.models.Kind; -import com.azure.resourcemanager.healthcareapis.models.PublicNetworkAccess; -import com.azure.resourcemanager.healthcareapis.models.ServicesDescription; -import com.azure.resourcemanager.healthcareapis.models.ServicesPatchDescription; -import com.azure.resourcemanager.healthcareapis.models.ServicesProperties; -import com.azure.resourcemanager.healthcareapis.models.ServicesResourceIdentity; -import java.util.Collections; -import java.util.Map; - -public final class ServicesDescriptionImpl - implements ServicesDescription, ServicesDescription.Definition, ServicesDescription.Update { - private ServicesDescriptionInner innerObject; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager 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 Kind kind() { - return this.innerModel().kind(); - } - - public String etag() { - return this.innerModel().etag(); - } - - public ServicesResourceIdentity identity() { - return this.innerModel().identity(); - } - - public ServicesProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ServicesDescriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String resourceName; - - private ServicesPatchDescription updateServicePatchDescription; - - public ServicesDescriptionImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ServicesDescription create() { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), Context.NONE); - return this; - } - - public ServicesDescription create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .createOrUpdate(resourceGroupName, resourceName, this.innerModel(), context); - return this; - } - - ServicesDescriptionImpl( - String name, com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = new ServicesDescriptionInner(); - this.serviceManager = serviceManager; - this.resourceName = name; - } - - public ServicesDescriptionImpl update() { - this.updateServicePatchDescription = new ServicesPatchDescription(); - return this; - } - - public ServicesDescription apply() { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .update(resourceGroupName, resourceName, updateServicePatchDescription, Context.NONE); - return this; - } - - public ServicesDescription apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .update(resourceGroupName, resourceName, updateServicePatchDescription, context); - return this; - } - - ServicesDescriptionImpl( - ServicesDescriptionInner innerObject, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "services"); - } - - public ServicesDescription refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE) - .getValue(); - return this; - } - - public ServicesDescription refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getServices() - .getByResourceGroupWithResponse(resourceGroupName, resourceName, context) - .getValue(); - return this; - } - - public ServicesDescriptionImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ServicesDescriptionImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ServicesDescriptionImpl withKind(Kind kind) { - this.innerModel().withKind(kind); - return this; - } - - public ServicesDescriptionImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateServicePatchDescription.withTags(tags); - return this; - } - } - - public ServicesDescriptionImpl withEtag(String etag) { - this.innerModel().withEtag(etag); - return this; - } - - public ServicesDescriptionImpl withIdentity(ServicesResourceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ServicesDescriptionImpl withProperties(ServicesProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ServicesDescriptionImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.updateServicePatchDescription.withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesImpl.java deleted file mode 100644 index 11d2808b9f91..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesImpl.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.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.healthcareapis.fluent.ServicesClient; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner; -import com.azure.resourcemanager.healthcareapis.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.healthcareapis.models.Services; -import com.azure.resourcemanager.healthcareapis.models.ServicesDescription; -import com.azure.resourcemanager.healthcareapis.models.ServicesNameAvailabilityInfo; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ServicesImpl implements Services { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesImpl.class); - - private final ServicesClient innerClient; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - public ServicesImpl( - ServicesClient innerClient, com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ServicesDescription getByResourceGroup(String resourceGroupName, String resourceName) { - ServicesDescriptionInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName); - if (inner != null) { - return new ServicesDescriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ServicesDescriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); - } - - public void delete(String resourceGroupName, String resourceName, Context context) { - this.serviceClient().delete(resourceGroupName, resourceName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ServicesDescriptionImpl(inner1, this.manager())); - } - - public ServicesNameAvailabilityInfo checkNameAvailability( - CheckNameAvailabilityParameters checkNameAvailabilityInputs) { - ServicesNameAvailabilityInfoInner inner = - this.serviceClient().checkNameAvailability(checkNameAvailabilityInputs); - if (inner != null) { - return new ServicesNameAvailabilityInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityParameters checkNameAvailabilityInputs, Context context) { - Response inner = - this.serviceClient().checkNameAvailabilityWithResponse(checkNameAvailabilityInputs, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ServicesNameAvailabilityInfoImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ServicesDescription getById(String id) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - this.delete(resourceGroupName, resourceName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.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 resourceName = Utils.getValueFromIdByName(id, "services"); - if (resourceName == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id))); - } - this.delete(resourceGroupName, resourceName, context); - } - - private ServicesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } - - public ServicesDescriptionImpl define(String name) { - return new ServicesDescriptionImpl(name, this.manager()); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesNameAvailabilityInfoImpl.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesNameAvailabilityInfoImpl.java deleted file mode 100644 index 57589d98c1da..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/ServicesNameAvailabilityInfoImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner; -import com.azure.resourcemanager.healthcareapis.models.ServiceNameUnavailabilityReason; -import com.azure.resourcemanager.healthcareapis.models.ServicesNameAvailabilityInfo; - -public final class ServicesNameAvailabilityInfoImpl implements ServicesNameAvailabilityInfo { - private ServicesNameAvailabilityInfoInner innerObject; - - private final com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager; - - ServicesNameAvailabilityInfoImpl( - ServicesNameAvailabilityInfoInner innerObject, - com.azure.resourcemanager.healthcareapis.HealthcareApisManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean nameAvailable() { - return this.innerModel().nameAvailable(); - } - - public ServiceNameUnavailabilityReason reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public ServicesNameAvailabilityInfoInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.healthcareapis.HealthcareApisManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/Utils.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/Utils.java deleted file mode 100644 index b2fcb06a8d1a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/Utils.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.implementation; - -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.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class Utils { - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/package-info.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/package-info.java deleted file mode 100644 index 808967b2a603..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/implementation/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the implementations for HealthcareApisManagementClient. Azure Healthcare APIs Client. */ -package com.azure.resourcemanager.healthcareapis.implementation; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CheckNameAvailabilityParameters.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CheckNameAvailabilityParameters.java deleted file mode 100644 index 8168c6ca91b1..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/CheckNameAvailabilityParameters.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Input values. */ -@Fluent -public final class CheckNameAvailabilityParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityParameters.class); - - /* - * The name of the service instance to check. - */ - @JsonProperty(value = "name", required = true) - private String name; - - /* - * The fully qualified resource type which includes provider namespace. - */ - @JsonProperty(value = "type", required = true) - private String type; - - /** - * Get the name property: The name of the service instance to check. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the service instance to check. - * - * @param name the name value to set. - * @return the CheckNameAvailabilityParameters object itself. - */ - public CheckNameAvailabilityParameters withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The fully qualified resource type which includes provider namespace. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The fully qualified resource type which includes provider namespace. - * - * @param type the type value to set. - * @return the CheckNameAvailabilityParameters object itself. - */ - public CheckNameAvailabilityParameters withType(String type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property name in model CheckNameAvailabilityParameters")); - } - if (type() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property type in model CheckNameAvailabilityParameters")); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Kind.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Kind.java deleted file mode 100644 index b133633c06c8..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Kind.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for Kind. */ -public enum Kind { - /** Enum value fhir. */ - FHIR("fhir"), - - /** Enum value fhir-Stu3. */ - FHIR_STU3("fhir-Stu3"), - - /** Enum value fhir-R4. */ - FHIR_R4("fhir-R4"); - - /** The actual serialized value for a Kind instance. */ - private final String value; - - Kind(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a Kind instance. - * - * @param value the serialized value to parse. - * @return the parsed Kind object, or null if unable to parse. - */ - @JsonCreator - public static Kind fromString(String value) { - Kind[] items = Kind.values(); - for (Kind item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ManagedServiceIdentityType.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ManagedServiceIdentityType.java deleted file mode 100644 index 483826c6654c..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ManagedServiceIdentityType. */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value SystemAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** Static value None for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - @JsonCreator - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** @return known ManagedServiceIdentityType values. */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Operation.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Operation.java deleted file mode 100644 index 01e3c6772951..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Operation.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationInner; - -/** An immutable client-side representation of Operation. */ -public interface Operation { - /** - * Gets the name property: Operation name: {provider}/{resource}/{read | write | action | delete}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the origin property: Default value is 'user,system'. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the display property: The information displayed about the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the inner com.azure.resourcemanager.healthcareapis.fluent.models.OperationInner object. - * - * @return the inner object. - */ - OperationInner innerModel(); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationDisplay.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationDisplay.java deleted file mode 100644 index 3eb8f608ed37..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationDisplay.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The object that represents the operation. */ -@Immutable -public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - - /* - * Service provider: Microsoft.HealthcareApis - */ - @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) - private String provider; - - /* - * Resource Type: Services - */ - @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) - private String resource; - - /* - * Name of the operation - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /* - * Friendly description for the operation, - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /** - * Get the provider property: Service provider: Microsoft.HealthcareApis. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Get the resource property: Resource Type: Services. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Get the operation property: Name of the operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the description property: Friendly description for the operation,. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationListResult.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationListResult.java deleted file mode 100644 index a9d42126eb6e..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationListResult.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of service operations. It contains a list of operations and a URL link to get the next set of results. */ -@Fluent -public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - - /* - * The link used to get the next page of service description objects. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * A list of service operations supported by the Microsoft.HealthcareApis - * resource provider. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private List value; - - /** - * Get the nextLink property: The link used to get the next page of service description objects. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of service description objects. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: A list of service operations supported by the Microsoft.HealthcareApis resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultStatus.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultStatus.java deleted file mode 100644 index bb516d41fe22..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultStatus.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OperationResultStatus. */ -public final class OperationResultStatus extends ExpandableStringEnum { - /** Static value Canceled for OperationResultStatus. */ - public static final OperationResultStatus CANCELED = fromString("Canceled"); - - /** Static value Succeeded for OperationResultStatus. */ - public static final OperationResultStatus SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for OperationResultStatus. */ - public static final OperationResultStatus FAILED = fromString("Failed"); - - /** Static value Requested for OperationResultStatus. */ - public static final OperationResultStatus REQUESTED = fromString("Requested"); - - /** Static value Running for OperationResultStatus. */ - public static final OperationResultStatus RUNNING = fromString("Running"); - - /** - * Creates or finds a OperationResultStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationResultStatus. - */ - @JsonCreator - public static OperationResultStatus fromString(String name) { - return fromString(name, OperationResultStatus.class); - } - - /** @return known OperationResultStatus values. */ - public static Collection values() { - return values(OperationResultStatus.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResults.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResults.java deleted file mode 100644 index 6830494fc896..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResults.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of OperationResults. */ -public interface OperationResults { - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @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 operation result for a long running operation. - */ - OperationResultsDescription get(String locationName, String operationResultId); - - /** - * Get the operation result for a long running operation. - * - * @param locationName The location of the operation. - * @param operationResultId The ID of the operation result to get. - * @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 operation result for a long running operation. - */ - Response getWithResponse( - String locationName, String operationResultId, Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultsDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultsDescription.java deleted file mode 100644 index 169d75927d5a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/OperationResultsDescription.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner; - -/** An immutable client-side representation of OperationResultsDescription. */ -public interface OperationResultsDescription { - /** - * Gets the id property: The ID of the operation returned. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the operation result. - * - * @return the name value. - */ - String name(); - - /** - * Gets the status property: The status of the operation being performed. - * - * @return the status value. - */ - OperationResultStatus status(); - - /** - * Gets the startTime property: The time that the operation was started. - * - * @return the startTime value. - */ - String startTime(); - - /** - * Gets the properties property: Additional properties of the operation result. - * - * @return the properties value. - */ - Object properties(); - - /** - * Gets the inner com.azure.resourcemanager.healthcareapis.fluent.models.OperationResultsDescriptionInner object. - * - * @return the inner object. - */ - OperationResultsDescriptionInner innerModel(); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Operations.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Operations.java deleted file mode 100644 index 189739bf548a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Operations.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all of the available Healthcare service REST API operations. - * - * @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 service operations. - */ - PagedIterable list(); - - /** - * Lists all of the available Healthcare service REST API operations. - * - * @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 service operations. - */ - PagedIterable list(Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpoint.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpoint.java deleted file mode 100644 index 68ae083357fd..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpoint.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Private Endpoint resource. */ -@Immutable -public final class PrivateEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); - - /* - * The ARM identifier for Private Endpoint - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnection.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnection.java deleted file mode 100644 index ee92c7cfb92e..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Private Endpoint Connection resource. */ -@JsonFlatten -@Fluent -public class PrivateEndpointConnection extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnection.class); - - /* - * The resource of private end point. - */ - @JsonProperty(value = "properties.privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between - * service consumer and provider. - */ - @JsonProperty(value = "properties.privateLinkServiceConnectionState") - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PrivateEndpointConnectionProvisioningState provisioningState; - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnection object itself. - */ - public PrivateEndpointConnection withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnection object itself. - */ - public PrivateEndpointConnection withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() != null) { - privateLinkServiceConnectionState().validate(); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionDescription.java deleted file mode 100644 index 3fc2b9e27847..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionDescription.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; - -/** An immutable client-side representation of PrivateEndpointConnectionDescription. */ -public interface PrivateEndpointConnectionDescription { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - PrivateEndpoint privateEndpoint(); - - /** - * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the - * connection between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); - - /** - * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - PrivateEndpointConnectionProvisioningState provisioningState(); - - /** - * Gets the systemData property: System metadata for this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner - * object. - * - * @return the inner object. - */ - PrivateEndpointConnectionDescriptionInner innerModel(); - - /** The entirety of the PrivateEndpointConnectionDescription definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The PrivateEndpointConnectionDescription definition stages. */ - interface DefinitionStages { - /** The first stage of the PrivateEndpointConnectionDescription definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the PrivateEndpointConnectionDescription definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, resourceName. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @return the next definition stage. - */ - WithCreate withExistingService(String resourceGroupName, String resourceName); - } - /** - * The stage of the PrivateEndpointConnectionDescription definition which contains all the minimum required - * properties for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the create request. - * - * @return the created resource. - */ - PrivateEndpointConnectionDescription create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - PrivateEndpointConnectionDescription create(Context context); - } - /** The stage of the PrivateEndpointConnectionDescription definition allowing to specify privateEndpoint. */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - /** - * The stage of the PrivateEndpointConnectionDescription definition allowing to specify - * privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - WithCreate withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - /** - * Begins update for the PrivateEndpointConnectionDescription resource. - * - * @return the stage of resource update. - */ - PrivateEndpointConnectionDescription.Update update(); - - /** The template for PrivateEndpointConnectionDescription update. */ - interface Update extends UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { - /** - * Executes the update request. - * - * @return the updated resource. - */ - PrivateEndpointConnectionDescription apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - PrivateEndpointConnectionDescription apply(Context context); - } - /** The PrivateEndpointConnectionDescription update stages. */ - interface UpdateStages { - /** The stage of the PrivateEndpointConnectionDescription update allowing to specify privateEndpoint. */ - interface WithPrivateEndpoint { - /** - * Specifies the privateEndpoint property: The resource of private end point.. - * - * @param privateEndpoint The resource of private end point. - * @return the next definition stage. - */ - Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); - } - /** - * The stage of the PrivateEndpointConnectionDescription update allowing to specify - * privateLinkServiceConnectionState. - */ - interface WithPrivateLinkServiceConnectionState { - /** - * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of - * the connection between service consumer and provider.. - * - * @param privateLinkServiceConnectionState A collection of information about the state of the connection - * between service consumer and provider. - * @return the next definition stage. - */ - Update withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - PrivateEndpointConnectionDescription refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - PrivateEndpointConnectionDescription refresh(Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionListResultDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionListResultDescription.java deleted file mode 100644 index 560af2acf9a3..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionListResultDescription.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateEndpointConnectionDescriptionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of private endpoint connection associated with the specified storage account. */ -@Fluent -public final class PrivateEndpointConnectionListResultDescription { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResultDescription.class); - - /* - * Array of private endpoint connections - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: Array of private endpoint connections. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private endpoint connections. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResultDescription object itself. - */ - public PrivateEndpointConnectionListResultDescription withValue( - List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionProvisioningState.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionProvisioningState.java deleted file mode 100644 index a5faca973743..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnectionProvisioningState.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointConnectionProvisioningState. */ -public final class PrivateEndpointConnectionProvisioningState - extends ExpandableStringEnum { - /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - - /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); - - /** - * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - @JsonCreator - public static PrivateEndpointConnectionProvisioningState fromString(String name) { - return fromString(name, PrivateEndpointConnectionProvisioningState.class); - } - - /** @return known PrivateEndpointConnectionProvisioningState values. */ - public static Collection values() { - return values(PrivateEndpointConnectionProvisioningState.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnections.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnections.java deleted file mode 100644 index c2522f428026..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointConnections.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PrivateEndpointConnections. */ -public interface PrivateEndpointConnections { - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 list of private endpoint connection associated with the specified storage account. - */ - PagedIterable listByService(String resourceGroupName, String resourceName); - - /** - * Lists all private endpoint connections for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 list of private endpoint connection associated with the specified storage account. - */ - PagedIterable listByService( - String resourceGroupName, String resourceName, Context context); - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - PrivateEndpointConnectionDescription get( - String resourceGroupName, String resourceName, String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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 specified private endpoint connection associated with the service. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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. - */ - void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName); - - /** - * Deletes a private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure - * 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. - */ - void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context); - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param id the resource ID. - * @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 specified private endpoint connection associated with the service. - */ - PrivateEndpointConnectionDescription getById(String id); - - /** - * Gets the specified private endpoint connection associated with the service. - * - * @param id the resource 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 specified private endpoint connection associated with the service. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a private endpoint connection. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Deletes a private endpoint connection. - * - * @param id the resource 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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PrivateEndpointConnectionDescription resource. - * - * @param name resource name. - * @return the first stage of the new PrivateEndpointConnectionDescription definition. - */ - PrivateEndpointConnectionDescription.DefinitionStages.Blank define(String name); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointServiceConnectionStatus.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index 9aeb39957d00..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateEndpointServiceConnectionStatus.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointServiceConnectionStatus. */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - @JsonCreator - public static PrivateEndpointServiceConnectionStatus fromString(String name) { - return fromString(name, PrivateEndpointServiceConnectionStatus.class); - } - - /** @return known PrivateEndpointServiceConnectionStatus values. */ - public static Collection values() { - return values(PrivateEndpointServiceConnectionStatus.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResource.java deleted file mode 100644 index 351906f7140e..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResource.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A private link resource. */ -@JsonFlatten -@Fluent -public class PrivateLinkResource extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResource.class); - - /* - * The private link resource group id. - */ - @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; - - /* - * The private link resource required member names. - */ - @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; - - /* - * The private link resource Private link DNS zone name. - */ - @JsonProperty(value = "properties.requiredZoneNames") - private List requiredZoneNames; - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResourceDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResourceDescription.java deleted file mode 100644 index f0d4e1f0d132..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResourceDescription.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner; -import java.util.List; - -/** An immutable client-side representation of PrivateLinkResourceDescription. */ -public interface PrivateLinkResourceDescription { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - String groupId(); - - /** - * Gets the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - List requiredMembers(); - - /** - * Gets the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - List requiredZoneNames(); - - /** - * Gets the systemData property: System metadata for this resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceDescriptionInner object. - * - * @return the inner object. - */ - PrivateLinkResourceDescriptionInner innerModel(); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResourceListResultDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResourceListResultDescription.java deleted file mode 100644 index 3d082e0f422a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResourceListResultDescription.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner; -import java.util.List; - -/** An immutable client-side representation of PrivateLinkResourceListResultDescription. */ -public interface PrivateLinkResourceListResultDescription { - /** - * Gets the value property: Array of private link resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner - * com.azure.resourcemanager.healthcareapis.fluent.models.PrivateLinkResourceListResultDescriptionInner object. - * - * @return the inner object. - */ - PrivateLinkResourceListResultDescriptionInner innerModel(); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResources.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResources.java deleted file mode 100644 index 8d7c8c02ecbe..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkResources.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of PrivateLinkResources. */ -public interface PrivateLinkResources { - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 private link resources that need to be created for a service. - */ - PrivateLinkResourceListResultDescription listByService(String resourceGroupName, String resourceName); - - /** - * Gets the private link resources that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 private link resources that need to be created for a service. - */ - Response listByServiceWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @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 private link resource that need to be created for a service. - */ - PrivateLinkResourceDescription get(String resourceGroupName, String resourceName, String groupName); - - /** - * Gets a private link resource that need to be created for a service. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @param groupName The name of the private link resource group. - * @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 private link resource that need to be created for a service. - */ - Response getWithResponse( - String resourceGroupName, String resourceName, String groupName, Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkServiceConnectionState.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index 2f4243977432..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A collection of information about the state of the connection between service consumer and provider. */ -@Fluent -public final class PrivateLinkServiceConnectionState { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); - - /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. - */ - @JsonProperty(value = "status") - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - @JsonProperty(value = "description") - private String description; - - /* - * A message indicating if changes on the service provider require any - * updates on the consumer. - */ - @JsonProperty(value = "actionsRequired") - private String actionsRequired; - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The reason for approval/rejection of the connection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The reason for approval/rejection of the connection. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ProvisioningState.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ProvisioningState.java deleted file mode 100644 index 525376c8037d..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ProvisioningState.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningState. */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** Static value Accepted for ProvisioningState. */ - public static final ProvisioningState ACCEPTED = fromString("Accepted"); - - /** Static value Verifying for ProvisioningState. */ - public static final ProvisioningState VERIFYING = fromString("Verifying"); - - /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ProvisioningState. */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - - /** Static value Deprovisioned for ProvisioningState. */ - public static final ProvisioningState DEPROVISIONED = fromString("Deprovisioned"); - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @JsonCreator - public static ProvisioningState fromString(String name) { - return fromString(name, ProvisioningState.class); - } - - /** @return known ProvisioningState values. */ - public static Collection values() { - return values(ProvisioningState.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PublicNetworkAccess.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PublicNetworkAccess.java deleted file mode 100644 index ad77b7e7f9d7..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/PublicNetworkAccess.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PublicNetworkAccess. */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - @JsonCreator - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** @return known PublicNetworkAccess values. */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAccessPolicyEntry.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAccessPolicyEntry.java deleted file mode 100644 index 3a76b1b14404..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAccessPolicyEntry.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** An access policy entry. */ -@Fluent -public final class ServiceAccessPolicyEntry { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceAccessPolicyEntry.class); - - /* - * An Azure AD object ID (User or Apps) that is allowed access to the FHIR - * service. - */ - @JsonProperty(value = "objectId", required = true) - private String objectId; - - /** - * Get the objectId property: An Azure AD object ID (User or Apps) that is allowed access to the FHIR service. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId property: An Azure AD object ID (User or Apps) that is allowed access to the FHIR service. - * - * @param objectId the objectId value to set. - * @return the ServiceAccessPolicyEntry object itself. - */ - public ServiceAccessPolicyEntry withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (objectId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property objectId in model ServiceAccessPolicyEntry")); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAcrConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAcrConfigurationInfo.java deleted file mode 100644 index 8bf5fe8a9614..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAcrConfigurationInfo.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Azure container registry configuration information. */ -@Fluent -public final class ServiceAcrConfigurationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceAcrConfigurationInfo.class); - - /* - * The list of the ACR login servers. - */ - @JsonProperty(value = "loginServers") - private List loginServers; - - /** - * Get the loginServers property: The list of the ACR login servers. - * - * @return the loginServers value. - */ - public List loginServers() { - return this.loginServers; - } - - /** - * Set the loginServers property: The list of the ACR login servers. - * - * @param loginServers the loginServers value to set. - * @return the ServiceAcrConfigurationInfo object itself. - */ - public ServiceAcrConfigurationInfo withLoginServers(List loginServers) { - this.loginServers = loginServers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAuthenticationConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAuthenticationConfigurationInfo.java deleted file mode 100644 index eda47c90fadf..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceAuthenticationConfigurationInfo.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Authentication configuration information. */ -@Fluent -public final class ServiceAuthenticationConfigurationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceAuthenticationConfigurationInfo.class); - - /* - * The authority url for the service - */ - @JsonProperty(value = "authority") - private String authority; - - /* - * The audience url for the service - */ - @JsonProperty(value = "audience") - private String audience; - - /* - * If the SMART on FHIR proxy is enabled - */ - @JsonProperty(value = "smartProxyEnabled") - private Boolean smartProxyEnabled; - - /** - * Get the authority property: The authority url for the service. - * - * @return the authority value. - */ - public String authority() { - return this.authority; - } - - /** - * Set the authority property: The authority url for the service. - * - * @param authority the authority value to set. - * @return the ServiceAuthenticationConfigurationInfo object itself. - */ - public ServiceAuthenticationConfigurationInfo withAuthority(String authority) { - this.authority = authority; - return this; - } - - /** - * Get the audience property: The audience url for the service. - * - * @return the audience value. - */ - public String audience() { - return this.audience; - } - - /** - * Set the audience property: The audience url for the service. - * - * @param audience the audience value to set. - * @return the ServiceAuthenticationConfigurationInfo object itself. - */ - public ServiceAuthenticationConfigurationInfo withAudience(String audience) { - this.audience = audience; - return this; - } - - /** - * Get the smartProxyEnabled property: If the SMART on FHIR proxy is enabled. - * - * @return the smartProxyEnabled value. - */ - public Boolean smartProxyEnabled() { - return this.smartProxyEnabled; - } - - /** - * Set the smartProxyEnabled property: If the SMART on FHIR proxy is enabled. - * - * @param smartProxyEnabled the smartProxyEnabled value to set. - * @return the ServiceAuthenticationConfigurationInfo object itself. - */ - public ServiceAuthenticationConfigurationInfo withSmartProxyEnabled(Boolean smartProxyEnabled) { - this.smartProxyEnabled = smartProxyEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCorsConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCorsConfigurationInfo.java deleted file mode 100644 index 7a2526bfaeb5..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCorsConfigurationInfo.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The settings for the CORS configuration of the service instance. */ -@Fluent -public final class ServiceCorsConfigurationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceCorsConfigurationInfo.class); - - /* - * The origins to be allowed via CORS. - */ - @JsonProperty(value = "origins") - private List origins; - - /* - * The headers to be allowed via CORS. - */ - @JsonProperty(value = "headers") - private List headers; - - /* - * The methods to be allowed via CORS. - */ - @JsonProperty(value = "methods") - private List methods; - - /* - * The max age to be allowed via CORS. - */ - @JsonProperty(value = "maxAge") - private Integer maxAge; - - /* - * If credentials are allowed via CORS. - */ - @JsonProperty(value = "allowCredentials") - private Boolean allowCredentials; - - /** - * Get the origins property: The origins to be allowed via CORS. - * - * @return the origins value. - */ - public List origins() { - return this.origins; - } - - /** - * Set the origins property: The origins to be allowed via CORS. - * - * @param origins the origins value to set. - * @return the ServiceCorsConfigurationInfo object itself. - */ - public ServiceCorsConfigurationInfo withOrigins(List origins) { - this.origins = origins; - return this; - } - - /** - * Get the headers property: The headers to be allowed via CORS. - * - * @return the headers value. - */ - public List headers() { - return this.headers; - } - - /** - * Set the headers property: The headers to be allowed via CORS. - * - * @param headers the headers value to set. - * @return the ServiceCorsConfigurationInfo object itself. - */ - public ServiceCorsConfigurationInfo withHeaders(List headers) { - this.headers = headers; - return this; - } - - /** - * Get the methods property: The methods to be allowed via CORS. - * - * @return the methods value. - */ - public List methods() { - return this.methods; - } - - /** - * Set the methods property: The methods to be allowed via CORS. - * - * @param methods the methods value to set. - * @return the ServiceCorsConfigurationInfo object itself. - */ - public ServiceCorsConfigurationInfo withMethods(List methods) { - this.methods = methods; - return this; - } - - /** - * Get the maxAge property: The max age to be allowed via CORS. - * - * @return the maxAge value. - */ - public Integer maxAge() { - return this.maxAge; - } - - /** - * Set the maxAge property: The max age to be allowed via CORS. - * - * @param maxAge the maxAge value to set. - * @return the ServiceCorsConfigurationInfo object itself. - */ - public ServiceCorsConfigurationInfo withMaxAge(Integer maxAge) { - this.maxAge = maxAge; - return this; - } - - /** - * Get the allowCredentials property: If credentials are allowed via CORS. - * - * @return the allowCredentials value. - */ - public Boolean allowCredentials() { - return this.allowCredentials; - } - - /** - * Set the allowCredentials property: If credentials are allowed via CORS. - * - * @param allowCredentials the allowCredentials value to set. - * @return the ServiceCorsConfigurationInfo object itself. - */ - public ServiceCorsConfigurationInfo withAllowCredentials(Boolean allowCredentials) { - this.allowCredentials = allowCredentials; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCosmosDbConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCosmosDbConfigurationInfo.java deleted file mode 100644 index 76d2d5120433..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceCosmosDbConfigurationInfo.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The settings for the Cosmos DB database backing the service. */ -@Fluent -public final class ServiceCosmosDbConfigurationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceCosmosDbConfigurationInfo.class); - - /* - * The provisioned throughput for the backing database. - */ - @JsonProperty(value = "offerThroughput") - private Integer offerThroughput; - - /* - * The URI of the customer-managed key for the backing database. - */ - @JsonProperty(value = "keyVaultKeyUri") - private String keyVaultKeyUri; - - /** - * Get the offerThroughput property: The provisioned throughput for the backing database. - * - * @return the offerThroughput value. - */ - public Integer offerThroughput() { - return this.offerThroughput; - } - - /** - * Set the offerThroughput property: The provisioned throughput for the backing database. - * - * @param offerThroughput the offerThroughput value to set. - * @return the ServiceCosmosDbConfigurationInfo object itself. - */ - public ServiceCosmosDbConfigurationInfo withOfferThroughput(Integer offerThroughput) { - this.offerThroughput = offerThroughput; - return this; - } - - /** - * Get the keyVaultKeyUri property: The URI of the customer-managed key for the backing database. - * - * @return the keyVaultKeyUri value. - */ - public String keyVaultKeyUri() { - return this.keyVaultKeyUri; - } - - /** - * Set the keyVaultKeyUri property: The URI of the customer-managed key for the backing database. - * - * @param keyVaultKeyUri the keyVaultKeyUri value to set. - * @return the ServiceCosmosDbConfigurationInfo object itself. - */ - public ServiceCosmosDbConfigurationInfo withKeyVaultKeyUri(String keyVaultKeyUri) { - this.keyVaultKeyUri = keyVaultKeyUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceExportConfigurationInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceExportConfigurationInfo.java deleted file mode 100644 index 978e66371c9e..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceExportConfigurationInfo.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Export operation configuration information. */ -@Fluent -public final class ServiceExportConfigurationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceExportConfigurationInfo.class); - - /* - * The name of the default export storage account. - */ - @JsonProperty(value = "storageAccountName") - private String storageAccountName; - - /** - * Get the storageAccountName property: The name of the default export storage account. - * - * @return the storageAccountName value. - */ - public String storageAccountName() { - return this.storageAccountName; - } - - /** - * Set the storageAccountName property: The name of the default export storage account. - * - * @param storageAccountName the storageAccountName value to set. - * @return the ServiceExportConfigurationInfo object itself. - */ - public ServiceExportConfigurationInfo withStorageAccountName(String storageAccountName) { - this.storageAccountName = storageAccountName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceNameUnavailabilityReason.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceNameUnavailabilityReason.java deleted file mode 100644 index 8da06d7ec551..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServiceNameUnavailabilityReason.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for ServiceNameUnavailabilityReason. */ -public enum ServiceNameUnavailabilityReason { - /** Enum value Invalid. */ - INVALID("Invalid"), - - /** Enum value AlreadyExists. */ - ALREADY_EXISTS("AlreadyExists"); - - /** The actual serialized value for a ServiceNameUnavailabilityReason instance. */ - private final String value; - - ServiceNameUnavailabilityReason(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ServiceNameUnavailabilityReason instance. - * - * @param value the serialized value to parse. - * @return the parsed ServiceNameUnavailabilityReason object, or null if unable to parse. - */ - @JsonCreator - public static ServiceNameUnavailabilityReason fromString(String value) { - ServiceNameUnavailabilityReason[] items = ServiceNameUnavailabilityReason.values(); - for (ServiceNameUnavailabilityReason item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Services.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Services.java deleted file mode 100644 index 90cad71effcb..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/Services.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Services. */ -public interface Services { - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 metadata of a service instance. - */ - ServicesDescription getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Get the metadata of a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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 metadata of a service instance. - */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String resourceName, Context context); - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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. - */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Delete a service instance. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @param resourceName The name of the service instance. - * @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. - */ - void delete(String resourceGroupName, String resourceName, Context context); - - /** - * Get all the service instances in a subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the service instances in a subscription. - */ - PagedIterable list(); - - /** - * Get all the service instances in a subscription. - * - * @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 all the service instances in a subscription. - */ - PagedIterable list(Context context); - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @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 all the service instances in a resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all the service instances in a resource group. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @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 all the service instances in a resource group. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @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 properties indicating whether a given service name is available. - */ - ServicesNameAvailabilityInfo checkNameAvailability(CheckNameAvailabilityParameters checkNameAvailabilityInputs); - - /** - * Check if a service instance name is available. - * - * @param checkNameAvailabilityInputs Set the name parameter in the CheckNameAvailabilityParameters structure to the - * name of the service instance to check. - * @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 properties indicating whether a given service name is available. - */ - Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityParameters checkNameAvailabilityInputs, Context context); - - /** - * Get the metadata of a service instance. - * - * @param id the resource ID. - * @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 metadata of a service instance. - */ - ServicesDescription getById(String id); - - /** - * Get the metadata of a service instance. - * - * @param id the resource 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 metadata of a service instance. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a service instance. - * - * @param id the resource ID. - * @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. - */ - void deleteById(String id); - - /** - * Delete a service instance. - * - * @param id the resource 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. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ServicesDescription resource. - * - * @param name resource name. - * @return the first stage of the new ServicesDescription definition. - */ - ServicesDescription.DefinitionStages.Blank define(String name); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescription.java deleted file mode 100644 index 1a1ed4abdb2b..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescription.java +++ /dev/null @@ -1,287 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; -import java.util.Map; - -/** An immutable client-side representation of ServicesDescription. */ -public interface ServicesDescription { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the kind property: The kind of the service. - * - * @return the kind value. - */ - Kind kind(); - - /** - * Gets the etag property: An etag associated with the resource, used for optimistic concurrency when editing it. - * - * @return the etag value. - */ - String etag(); - - /** - * Gets the identity property: Setting indicating whether the service has a managed identity associated with it. - * - * @return the identity value. - */ - ServicesResourceIdentity identity(); - - /** - * Gets the properties property: The common properties of a service. - * - * @return the properties value. - */ - ServicesProperties properties(); - - /** - * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the inner com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner object. - * - * @return the inner object. - */ - ServicesDescriptionInner innerModel(); - - /** The entirety of the ServicesDescription definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithKind, - DefinitionStages.WithCreate { - } - /** The ServicesDescription definition stages. */ - interface DefinitionStages { - /** The first stage of the ServicesDescription definition. */ - interface Blank extends WithLocation { - } - /** The stage of the ServicesDescription definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - /** The stage of the ServicesDescription definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group that contains the service instance. - * @return the next definition stage. - */ - WithKind withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the ServicesDescription definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: The kind of the service.. - * - * @param kind The kind of the service. - * @return the next definition stage. - */ - WithCreate withKind(Kind kind); - } - /** - * The stage of the ServicesDescription definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithEtag, - DefinitionStages.WithIdentity, - DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ServicesDescription create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ServicesDescription create(Context context); - } - /** The stage of the ServicesDescription definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the ServicesDescription definition allowing to specify etag. */ - interface WithEtag { - /** - * Specifies the etag property: An etag associated with the resource, used for optimistic concurrency when - * editing it.. - * - * @param etag An etag associated with the resource, used for optimistic concurrency when editing it. - * @return the next definition stage. - */ - WithCreate withEtag(String etag); - } - /** The stage of the ServicesDescription definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Setting indicating whether the service has a managed identity associated - * with it.. - * - * @param identity Setting indicating whether the service has a managed identity associated with it. - * @return the next definition stage. - */ - WithCreate withIdentity(ServicesResourceIdentity identity); - } - /** The stage of the ServicesDescription definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The common properties of a service.. - * - * @param properties The common properties of a service. - * @return the next definition stage. - */ - WithCreate withProperties(ServicesProperties properties); - } - } - /** - * Begins update for the ServicesDescription resource. - * - * @return the stage of resource update. - */ - ServicesDescription.Update update(); - - /** The template for ServicesDescription update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithPublicNetworkAccess { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ServicesDescription apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ServicesDescription apply(Context context); - } - /** The ServicesDescription update stages. */ - interface UpdateStages { - /** The stage of the ServicesDescription update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Instance tags. - * - * @param tags Instance tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the ServicesDescription update allowing to specify publicNetworkAccess. */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Control permission for data plane traffic coming from public - * networks while private endpoint is enabled.. - * - * @param publicNetworkAccess Control permission for data plane traffic coming from public networks while - * private endpoint is enabled. - * @return the next definition stage. - */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ServicesDescription refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ServicesDescription refresh(Context context); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescriptionListResult.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescriptionListResult.java deleted file mode 100644 index 31366b5b95a6..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesDescriptionListResult.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesDescriptionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of service description objects with a next link. */ -@Fluent -public final class ServicesDescriptionListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesDescriptionListResult.class); - - /* - * The link used to get the next page of service description objects. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * A list of service description objects. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the nextLink property: The link used to get the next page of service description objects. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of service description objects. - * - * @param nextLink the nextLink value to set. - * @return the ServicesDescriptionListResult object itself. - */ - public ServicesDescriptionListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: A list of service description objects. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: A list of service description objects. - * - * @param value the value value to set. - * @return the ServicesDescriptionListResult object itself. - */ - public ServicesDescriptionListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesNameAvailabilityInfo.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesNameAvailabilityInfo.java deleted file mode 100644 index 226730abd830..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesNameAvailabilityInfo.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner; - -/** An immutable client-side representation of ServicesNameAvailabilityInfo. */ -public interface ServicesNameAvailabilityInfo { - /** - * Gets the nameAvailable property: The value which indicates whether the provided name is available. - * - * @return the nameAvailable value. - */ - Boolean nameAvailable(); - - /** - * Gets the reason property: The reason for unavailability. - * - * @return the reason value. - */ - ServiceNameUnavailabilityReason reason(); - - /** - * Gets the message property: The detailed reason message. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.healthcareapis.fluent.models.ServicesNameAvailabilityInfoInner object. - * - * @return the inner object. - */ - ServicesNameAvailabilityInfoInner innerModel(); -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesPatchDescription.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesPatchDescription.java deleted file mode 100644 index 8ebaa4021061..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesPatchDescription.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The description of the service. */ -@JsonFlatten -@Fluent -public class ServicesPatchDescription { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesPatchDescription.class); - - /* - * Instance tags - */ - @JsonProperty(value = "tags") - private Map tags; - - /* - * Control permission for data plane traffic coming from public networks - * while private endpoint is enabled. - */ - @JsonProperty(value = "properties.publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /** - * Get the tags property: Instance tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Instance tags. - * - * @param tags the tags value to set. - * @return the ServicesPatchDescription object itself. - */ - public ServicesPatchDescription withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while - * private endpoint is enabled. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while - * private endpoint is enabled. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ServicesPatchDescription object itself. - */ - public ServicesPatchDescription withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesProperties.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesProperties.java deleted file mode 100644 index 6c6e49727ad2..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesProperties.java +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The properties of a service instance. */ -@Fluent -public final class ServicesProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesProperties.class); - - /* - * The provisioning state. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The access policies of the service instance. - */ - @JsonProperty(value = "accessPolicies") - private List accessPolicies; - - /* - * The settings for the Cosmos DB database backing the service. - */ - @JsonProperty(value = "cosmosDbConfiguration") - private ServiceCosmosDbConfigurationInfo cosmosDbConfiguration; - - /* - * The authentication configuration for the service instance. - */ - @JsonProperty(value = "authenticationConfiguration") - private ServiceAuthenticationConfigurationInfo authenticationConfiguration; - - /* - * The settings for the CORS configuration of the service instance. - */ - @JsonProperty(value = "corsConfiguration") - private ServiceCorsConfigurationInfo corsConfiguration; - - /* - * The settings for the export operation of the service instance. - */ - @JsonProperty(value = "exportConfiguration") - private ServiceExportConfigurationInfo exportConfiguration; - - /* - * The list of private endpoint connections that are set up for this - * resource. - */ - @JsonProperty(value = "privateEndpointConnections") - private List privateEndpointConnections; - - /* - * Control permission for data plane traffic coming from public networks - * while private endpoint is enabled. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /* - * The azure container registry settings used for convert data operation of - * the service instance. - */ - @JsonProperty(value = "acrConfiguration") - private ServiceAcrConfigurationInfo acrConfiguration; - - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the accessPolicies property: The access policies of the service instance. - * - * @return the accessPolicies value. - */ - public List accessPolicies() { - return this.accessPolicies; - } - - /** - * Set the accessPolicies property: The access policies of the service instance. - * - * @param accessPolicies the accessPolicies value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withAccessPolicies(List accessPolicies) { - this.accessPolicies = accessPolicies; - return this; - } - - /** - * Get the cosmosDbConfiguration property: The settings for the Cosmos DB database backing the service. - * - * @return the cosmosDbConfiguration value. - */ - public ServiceCosmosDbConfigurationInfo cosmosDbConfiguration() { - return this.cosmosDbConfiguration; - } - - /** - * Set the cosmosDbConfiguration property: The settings for the Cosmos DB database backing the service. - * - * @param cosmosDbConfiguration the cosmosDbConfiguration value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withCosmosDbConfiguration(ServiceCosmosDbConfigurationInfo cosmosDbConfiguration) { - this.cosmosDbConfiguration = cosmosDbConfiguration; - return this; - } - - /** - * Get the authenticationConfiguration property: The authentication configuration for the service instance. - * - * @return the authenticationConfiguration value. - */ - public ServiceAuthenticationConfigurationInfo authenticationConfiguration() { - return this.authenticationConfiguration; - } - - /** - * Set the authenticationConfiguration property: The authentication configuration for the service instance. - * - * @param authenticationConfiguration the authenticationConfiguration value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withAuthenticationConfiguration( - ServiceAuthenticationConfigurationInfo authenticationConfiguration) { - this.authenticationConfiguration = authenticationConfiguration; - return this; - } - - /** - * Get the corsConfiguration property: The settings for the CORS configuration of the service instance. - * - * @return the corsConfiguration value. - */ - public ServiceCorsConfigurationInfo corsConfiguration() { - return this.corsConfiguration; - } - - /** - * Set the corsConfiguration property: The settings for the CORS configuration of the service instance. - * - * @param corsConfiguration the corsConfiguration value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withCorsConfiguration(ServiceCorsConfigurationInfo corsConfiguration) { - this.corsConfiguration = corsConfiguration; - return this; - } - - /** - * Get the exportConfiguration property: The settings for the export operation of the service instance. - * - * @return the exportConfiguration value. - */ - public ServiceExportConfigurationInfo exportConfiguration() { - return this.exportConfiguration; - } - - /** - * Set the exportConfiguration property: The settings for the export operation of the service instance. - * - * @param exportConfiguration the exportConfiguration value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withExportConfiguration(ServiceExportConfigurationInfo exportConfiguration) { - this.exportConfiguration = exportConfiguration; - return this; - } - - /** - * Get the privateEndpointConnections property: The list of private endpoint connections that are set up for this - * resource. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Set the privateEndpointConnections property: The list of private endpoint connections that are set up for this - * resource. - * - * @param privateEndpointConnections the privateEndpointConnections value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withPrivateEndpointConnections( - List privateEndpointConnections) { - this.privateEndpointConnections = privateEndpointConnections; - return this; - } - - /** - * Get the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while - * private endpoint is enabled. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Control permission for data plane traffic coming from public networks while - * private endpoint is enabled. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the acrConfiguration property: The azure container registry settings used for convert data operation of the - * service instance. - * - * @return the acrConfiguration value. - */ - public ServiceAcrConfigurationInfo acrConfiguration() { - return this.acrConfiguration; - } - - /** - * Set the acrConfiguration property: The azure container registry settings used for convert data operation of the - * service instance. - * - * @param acrConfiguration the acrConfiguration value to set. - * @return the ServicesProperties object itself. - */ - public ServicesProperties withAcrConfiguration(ServiceAcrConfigurationInfo acrConfiguration) { - this.acrConfiguration = acrConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (accessPolicies() != null) { - accessPolicies().forEach(e -> e.validate()); - } - if (cosmosDbConfiguration() != null) { - cosmosDbConfiguration().validate(); - } - if (authenticationConfiguration() != null) { - authenticationConfiguration().validate(); - } - if (corsConfiguration() != null) { - corsConfiguration().validate(); - } - if (exportConfiguration() != null) { - exportConfiguration().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (acrConfiguration() != null) { - acrConfiguration().validate(); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResource.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResource.java deleted file mode 100644 index 0096ad909466..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResource.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The common properties of a service. */ -@Fluent -public class ServicesResource extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesResource.class); - - /* - * The kind of the service. - */ - @JsonProperty(value = "kind", required = true) - private Kind kind; - - /* - * An etag associated with the resource, used for optimistic concurrency - * when editing it. - */ - @JsonProperty(value = "etag") - private String etag; - - /* - * Setting indicating whether the service has a managed identity associated - * with it. - */ - @JsonProperty(value = "identity") - private ServicesResourceIdentity identity; - - /** - * Get the kind property: The kind of the service. - * - * @return the kind value. - */ - public Kind kind() { - return this.kind; - } - - /** - * Set the kind property: The kind of the service. - * - * @param kind the kind value to set. - * @return the ServicesResource object itself. - */ - public ServicesResource withKind(Kind kind) { - this.kind = kind; - return this; - } - - /** - * Get the etag property: An etag associated with the resource, used for optimistic concurrency when editing it. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: An etag associated with the resource, used for optimistic concurrency when editing it. - * - * @param etag the etag value to set. - * @return the ServicesResource object itself. - */ - public ServicesResource withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the identity property: Setting indicating whether the service has a managed identity associated with it. - * - * @return the identity value. - */ - public ServicesResourceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Setting indicating whether the service has a managed identity associated with it. - * - * @param identity the identity value to set. - * @return the ServicesResource object itself. - */ - public ServicesResource withIdentity(ServicesResourceIdentity identity) { - this.identity = identity; - return this; - } - - /** {@inheritDoc} */ - @Override - public ServicesResource withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ServicesResource withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kind() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property kind in model ServicesResource")); - } - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResourceIdentity.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResourceIdentity.java deleted file mode 100644 index d933a0417c68..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/ServicesResourceIdentity.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.healthcareapis.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Setting indicating whether the service has a managed identity associated with it. */ -@Fluent -public class ServicesResourceIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServicesResourceIdentity.class); - - /* - * The principal ID of the resource identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private String principalId; - - /* - * The tenant ID of the resource. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * Type of identity being specified, currently SystemAssigned and None are - * allowed. - */ - @JsonProperty(value = "type") - private ManagedServiceIdentityType type; - - /** - * Get the principalId property: The principal ID of the resource identity. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the resource. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the type property: Type of identity being specified, currently SystemAssigned and None are allowed. - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: Type of identity being specified, currently SystemAssigned and None are allowed. - * - * @param type the type value to set. - * @return the ServicesResourceIdentity object itself. - */ - public ServicesResourceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/package-info.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/package-info.java deleted file mode 100644 index 90e70f4be3eb..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/models/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the data models for HealthcareApisManagementClient. Azure Healthcare APIs Client. */ -package com.azure.resourcemanager.healthcareapis.models; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/package-info.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/package-info.java deleted file mode 100644 index 01aa5abf802a..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/com/azure/resourcemanager/healthcareapis/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** Package containing the classes for HealthcareApisManagementClient. Azure Healthcare APIs Client. */ -package com.azure.resourcemanager.healthcareapis; diff --git a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/module-info.java b/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/module-info.java deleted file mode 100644 index 574ec34e06ff..000000000000 --- a/sdk/healthcareapis/azure-resourcemanager-healthcareapis/src/main/java/module-info.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.healthcareapis { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.healthcareapis; - exports com.azure.resourcemanager.healthcareapis.fluent; - exports com.azure.resourcemanager.healthcareapis.fluent.models; - exports com.azure.resourcemanager.healthcareapis.models; - - opens com.azure.resourcemanager.healthcareapis.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.healthcareapis.models to - com.azure.core, - com.fasterxml.jackson.databind; -}