From 0087c8cc908b12967126c3ed019f83fc1fe713ec Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 17 Jan 2022 08:05:08 +0000 Subject: [PATCH] CodeGen from PR 17368 in Azure/azure-rest-api-specs Merge 3bb29c1902c5fcbee7098fdc0aa201f2e4d7978e into 86c901cfca1e57402e367c2678265574d1fed93e --- .../devspaces/DevSpacesManager.java | 239 --- .../fluent/ContainerHostMappingsClient.java | 49 - .../devspaces/fluent/ControllersClient.java | 273 --- .../fluent/DevSpacesManagementClient.java | 67 - .../devspaces/fluent/OperationsClient.java | 36 - .../models/ContainerHostMappingInner.java | 65 - .../ControllerConnectionDetailsListInner.java | 56 - .../fluent/models/ControllerInner.java | 202 -- ...ourceProviderOperationDefinitionInner.java | 80 - .../devspaces/fluent/models/package-info.java | 6 - .../devspaces/fluent/package-info.java | 6 - .../ContainerHostMappingImpl.java | 36 - .../ContainerHostMappingsClientImpl.java | 256 --- .../ContainerHostMappingsImpl.java | 65 - .../ControllerConnectionDetailsListImpl.java | 41 - .../implementation/ControllerImpl.java | 237 --- .../implementation/ControllersClientImpl.java | 1635 ----------------- .../implementation/ControllersImpl.java | 203 -- .../DevSpacesManagementClientBuilder.java | 146 -- .../DevSpacesManagementClientImpl.java | 321 ---- .../implementation/OperationsClientImpl.java | 270 --- .../implementation/OperationsImpl.java | 46 - ...sourceProviderOperationDefinitionImpl.java | 38 - .../devspaces/implementation/Utils.java | 204 -- .../implementation/package-info.java | 6 - .../models/ContainerHostMapping.java | 31 - .../models/ContainerHostMappings.java | 45 - .../devspaces/models/Controller.java | 313 ---- .../models/ControllerConnectionDetails.java | 57 - .../ControllerConnectionDetailsList.java | 25 - .../devspaces/models/ControllerList.java | 72 - .../models/ControllerUpdateParameters.java | 80 - .../devspaces/models/Controllers.java | 189 -- .../models/KubernetesConnectionDetails.java | 56 - .../ListConnectionDetailsParameters.java | 60 - .../devspaces/models/Operations.java | 31 - ...OrchestratorSpecificConnectionDetails.java | 33 - .../devspaces/models/ProvisioningState.java | 49 - .../ResourceProviderOperationDefinition.java | 31 - .../ResourceProviderOperationDisplay.java | 128 -- .../models/ResourceProviderOperationList.java | 71 - .../resourcemanager/devspaces/models/Sku.java | 80 - .../devspaces/models/SkuName.java | 31 - .../devspaces/models/SkuTier.java | 31 - .../devspaces/models/package-info.java | 6 - .../devspaces/package-info.java | 6 - .../src/main/java/module-info.java | 19 - 47 files changed, 6027 deletions(-) delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/DevSpacesManager.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ContainerHostMappingsClient.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ControllersClient.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/DevSpacesManagementClient.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/OperationsClient.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ContainerHostMappingInner.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerConnectionDetailsListInner.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerInner.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ResourceProviderOperationDefinitionInner.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/package-info.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/package-info.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsClientImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerConnectionDetailsListImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersClientImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientBuilder.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/OperationsClientImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/OperationsImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ResourceProviderOperationDefinitionImpl.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/Utils.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/package-info.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMapping.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMappings.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controller.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetails.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetailsList.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerList.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerUpdateParameters.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controllers.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/KubernetesConnectionDetails.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ListConnectionDetailsParameters.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Operations.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/OrchestratorSpecificConnectionDetails.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ProvisioningState.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDefinition.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDisplay.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationList.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Sku.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuName.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuTier.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/package-info.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/package-info.java delete mode 100644 sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/module-info.java diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/DevSpacesManager.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/DevSpacesManager.java deleted file mode 100644 index f7732865f03e..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/DevSpacesManager.java +++ /dev/null @@ -1,239 +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.devspaces; - -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.devspaces.fluent.DevSpacesManagementClient; -import com.azure.resourcemanager.devspaces.implementation.ContainerHostMappingsImpl; -import com.azure.resourcemanager.devspaces.implementation.ControllersImpl; -import com.azure.resourcemanager.devspaces.implementation.DevSpacesManagementClientBuilder; -import com.azure.resourcemanager.devspaces.implementation.OperationsImpl; -import com.azure.resourcemanager.devspaces.models.ContainerHostMappings; -import com.azure.resourcemanager.devspaces.models.Controllers; -import com.azure.resourcemanager.devspaces.models.Operations; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** Entry point to DevSpacesManager. Dev Spaces Client. */ -public final class DevSpacesManager { - private ContainerHostMappings containerHostMappings; - - private Operations operations; - - private Controllers controllers; - - private final DevSpacesManagementClient clientObject; - - private DevSpacesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new DevSpacesManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); - } - - /** - * Creates an instance of DevSpaces service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the DevSpaces service API instance. - */ - public static DevSpacesManager 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 DevSpacesManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new DevSpacesManager.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 DevSpaces service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the DevSpaces service API instance. - */ - public DevSpacesManager 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.devspaces") - .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 DevSpacesManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** @return Resource collection API of ContainerHostMappings. */ - public ContainerHostMappings containerHostMappings() { - if (this.containerHostMappings == null) { - this.containerHostMappings = new ContainerHostMappingsImpl(clientObject.getContainerHostMappings(), this); - } - return containerHostMappings; - } - - /** @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 Controllers. */ - public Controllers controllers() { - if (this.controllers == null) { - this.controllers = new ControllersImpl(clientObject.getControllers(), this); - } - return controllers; - } - - /** - * @return Wrapped service client DevSpacesManagementClient providing direct access to the underlying auto-generated - * API implementation, based on Azure REST API. - */ - public DevSpacesManagementClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ContainerHostMappingsClient.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ContainerHostMappingsClient.java deleted file mode 100644 index 16f4d82fce85..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ContainerHostMappingsClient.java +++ /dev/null @@ -1,49 +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.devspaces.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.devspaces.fluent.models.ContainerHostMappingInner; - -/** An instance of this class provides access to all the operations defined in ContainerHostMappingsClient. */ -public interface ContainerHostMappingsClient { - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerHostMappingInner getContainerHostMapping( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping); - - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getContainerHostMappingWithResponse( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ControllersClient.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ControllersClient.java deleted file mode 100644 index 588ed46cf84c..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/ControllersClient.java +++ /dev/null @@ -1,273 +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.devspaces.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.devspaces.fluent.models.ControllerConnectionDetailsListInner; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner; -import com.azure.resourcemanager.devspaces.models.ControllerUpdateParameters; -import com.azure.resourcemanager.devspaces.models.ListConnectionDetailsParameters; - -/** An instance of this class provides access to all the operations defined in ControllersClient. */ -public interface ControllersClient { - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for an Azure Dev Spaces Controller. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ControllerInner getByResourceGroup(String resourceGroupName, String name); - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 properties for an Azure Dev Spaces Controller. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ControllerInner> beginCreate( - String resourceGroupName, String name, ControllerInner controller); - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, ControllerInner> beginCreate( - String resourceGroupName, String name, ControllerInner controller, Context context); - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ControllerInner create(String resourceGroupName, String name, ControllerInner controller); - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ControllerInner create(String resourceGroupName, String name, ControllerInner controller, Context context); - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SyncPoller, Void> beginDelete(String resourceGroupName, String name); - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, Context context); - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String name); - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, Context context); - - /** - * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ControllerInner update( - String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters); - - /** - * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters, Context context); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the 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 the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ControllerConnectionDetailsListInner listConnectionDetails( - String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters); - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listConnectionDetailsWithResponse( - String resourceGroupName, - String name, - ListConnectionDetailsParameters listConnectionDetailsParameters, - Context context); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/DevSpacesManagementClient.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/DevSpacesManagementClient.java deleted file mode 100644 index bbe976bcd13e..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/DevSpacesManagementClient.java +++ /dev/null @@ -1,67 +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.devspaces.fluent; - -import com.azure.core.http.HttpPipeline; -import java.time.Duration; - -/** The interface for DevSpacesManagementClient class. */ -public interface DevSpacesManagementClient { - /** - * Gets Azure subscription ID. - * - * @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 ContainerHostMappingsClient object to access its operations. - * - * @return the ContainerHostMappingsClient object. - */ - ContainerHostMappingsClient getContainerHostMappings(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the ControllersClient object to access its operations. - * - * @return the ControllersClient object. - */ - ControllersClient getControllers(); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/OperationsClient.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/OperationsClient.java deleted file mode 100644 index e2e7057d0e84..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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.devspaces.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.devspaces.fluent.models.ResourceProviderOperationDefinitionInner; - -/** An instance of this class provides access to all the operations defined in OperationsClient. */ -public interface OperationsClient { - /** - * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ContainerHostMappingInner.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ContainerHostMappingInner.java deleted file mode 100644 index dc566c38b9c2..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ContainerHostMappingInner.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.devspaces.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; - -/** Container host mapping object specifying the Container host resource ID and its associated Controller resource. */ -@Fluent -public final class ContainerHostMappingInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerHostMappingInner.class); - - /* - * ARM ID of the Container Host resource - */ - @JsonProperty(value = "containerHostResourceId") - private String containerHostResourceId; - - /* - * ARM ID of the mapped Controller resource - */ - @JsonProperty(value = "mappedControllerResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String mappedControllerResourceId; - - /** - * Get the containerHostResourceId property: ARM ID of the Container Host resource. - * - * @return the containerHostResourceId value. - */ - public String containerHostResourceId() { - return this.containerHostResourceId; - } - - /** - * Set the containerHostResourceId property: ARM ID of the Container Host resource. - * - * @param containerHostResourceId the containerHostResourceId value to set. - * @return the ContainerHostMappingInner object itself. - */ - public ContainerHostMappingInner withContainerHostResourceId(String containerHostResourceId) { - this.containerHostResourceId = containerHostResourceId; - return this; - } - - /** - * Get the mappedControllerResourceId property: ARM ID of the mapped Controller resource. - * - * @return the mappedControllerResourceId value. - */ - public String mappedControllerResourceId() { - return this.mappedControllerResourceId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerConnectionDetailsListInner.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerConnectionDetailsListInner.java deleted file mode 100644 index 48eec1048c48..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerConnectionDetailsListInner.java +++ /dev/null @@ -1,56 +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.devspaces.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.devspaces.models.ControllerConnectionDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ControllerConnectionDetailsList model. */ -@Fluent -public final class ControllerConnectionDetailsListInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ControllerConnectionDetailsListInner.class); - - /* - * List of Azure Dev Spaces Controller connection details. - */ - @JsonProperty(value = "connectionDetailsList") - private List connectionDetailsList; - - /** - * Get the connectionDetailsList property: List of Azure Dev Spaces Controller connection details. - * - * @return the connectionDetailsList value. - */ - public List connectionDetailsList() { - return this.connectionDetailsList; - } - - /** - * Set the connectionDetailsList property: List of Azure Dev Spaces Controller connection details. - * - * @param connectionDetailsList the connectionDetailsList value to set. - * @return the ControllerConnectionDetailsListInner object itself. - */ - public ControllerConnectionDetailsListInner withConnectionDetailsList( - List connectionDetailsList) { - this.connectionDetailsList = connectionDetailsList; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (connectionDetailsList() != null) { - connectionDetailsList().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerInner.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerInner.java deleted file mode 100644 index 22aa3bb59b4d..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerInner.java +++ /dev/null @@ -1,202 +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.devspaces.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.JsonFlatten; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.devspaces.models.ProvisioningState; -import com.azure.resourcemanager.devspaces.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The Controller model. */ -@JsonFlatten -@Fluent -public class ControllerInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ControllerInner.class); - - /* - * Model representing SKU for Azure Dev Spaces Controller. - */ - @JsonProperty(value = "sku", required = true) - private Sku sku; - - /* - * Provisioning state of the Azure Dev Spaces Controller. - */ - @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * DNS suffix for public endpoints running in the Azure Dev Spaces - * Controller. - */ - @JsonProperty(value = "properties.hostSuffix", access = JsonProperty.Access.WRITE_ONLY) - private String hostSuffix; - - /* - * DNS name for accessing DataPlane services - */ - @JsonProperty(value = "properties.dataPlaneFqdn", access = JsonProperty.Access.WRITE_ONLY) - private String dataPlaneFqdn; - - /* - * DNS of the target container host's API server - */ - @JsonProperty(value = "properties.targetContainerHostApiServerFqdn", access = JsonProperty.Access.WRITE_ONLY) - private String targetContainerHostApiServerFqdn; - - /* - * Resource ID of the target container host - */ - @JsonProperty(value = "properties.targetContainerHostResourceId", required = true) - private String targetContainerHostResourceId; - - /* - * Credentials of the target container host (base64). - */ - @JsonProperty(value = "properties.targetContainerHostCredentialsBase64", required = true) - private String targetContainerHostCredentialsBase64; - - /** - * Get the sku property: Model representing SKU for Azure Dev Spaces Controller. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Model representing SKU for Azure Dev Spaces Controller. - * - * @param sku the sku value to set. - * @return the ControllerInner object itself. - */ - public ControllerInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Azure Dev Spaces Controller. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the hostSuffix property: DNS suffix for public endpoints running in the Azure Dev Spaces Controller. - * - * @return the hostSuffix value. - */ - public String hostSuffix() { - return this.hostSuffix; - } - - /** - * Get the dataPlaneFqdn property: DNS name for accessing DataPlane services. - * - * @return the dataPlaneFqdn value. - */ - public String dataPlaneFqdn() { - return this.dataPlaneFqdn; - } - - /** - * Get the targetContainerHostApiServerFqdn property: DNS of the target container host's API server. - * - * @return the targetContainerHostApiServerFqdn value. - */ - public String targetContainerHostApiServerFqdn() { - return this.targetContainerHostApiServerFqdn; - } - - /** - * Get the targetContainerHostResourceId property: Resource ID of the target container host. - * - * @return the targetContainerHostResourceId value. - */ - public String targetContainerHostResourceId() { - return this.targetContainerHostResourceId; - } - - /** - * Set the targetContainerHostResourceId property: Resource ID of the target container host. - * - * @param targetContainerHostResourceId the targetContainerHostResourceId value to set. - * @return the ControllerInner object itself. - */ - public ControllerInner withTargetContainerHostResourceId(String targetContainerHostResourceId) { - this.targetContainerHostResourceId = targetContainerHostResourceId; - return this; - } - - /** - * Get the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64). - * - * @return the targetContainerHostCredentialsBase64 value. - */ - public String targetContainerHostCredentialsBase64() { - return this.targetContainerHostCredentialsBase64; - } - - /** - * Set the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64). - * - * @param targetContainerHostCredentialsBase64 the targetContainerHostCredentialsBase64 value to set. - * @return the ControllerInner object itself. - */ - public ControllerInner withTargetContainerHostCredentialsBase64(String targetContainerHostCredentialsBase64) { - this.targetContainerHostCredentialsBase64 = targetContainerHostCredentialsBase64; - return this; - } - - /** {@inheritDoc} */ - @Override - public ControllerInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public ControllerInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sku() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property sku in model ControllerInner")); - } else { - sku().validate(); - } - if (targetContainerHostResourceId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetContainerHostResourceId in model ControllerInner")); - } - if (targetContainerHostCredentialsBase64() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetContainerHostCredentialsBase64 in model ControllerInner")); - } - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ResourceProviderOperationDefinitionInner.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ResourceProviderOperationDefinitionInner.java deleted file mode 100644 index 9cabe8382582..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ResourceProviderOperationDefinitionInner.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devspaces.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.devspaces.models.ResourceProviderOperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ResourceProviderOperationDefinition model. */ -@Fluent -public final class ResourceProviderOperationDefinitionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProviderOperationDefinitionInner.class); - - /* - * Resource provider operation name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The display property. - */ - @JsonProperty(value = "display") - private ResourceProviderOperationDisplay display; - - /** - * Get the name property: Resource provider operation name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Resource provider operation name. - * - * @param name the name value to set. - * @return the ResourceProviderOperationDefinitionInner object itself. - */ - public ResourceProviderOperationDefinitionInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: The display property. - * - * @return the display value. - */ - public ResourceProviderOperationDisplay display() { - return this.display; - } - - /** - * Set the display property: The display property. - * - * @param display the display value to set. - * @return the ResourceProviderOperationDefinitionInner object itself. - */ - public ResourceProviderOperationDefinitionInner withDisplay(ResourceProviderOperationDisplay 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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/package-info.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/package-info.java deleted file mode 100644 index 885da36e0dbf..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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 DevSpacesManagementClient. Dev Spaces Client. */ -package com.azure.resourcemanager.devspaces.fluent.models; diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/package-info.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/package-info.java deleted file mode 100644 index 70bf6411825f..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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 DevSpacesManagementClient. Dev Spaces Client. */ -package com.azure.resourcemanager.devspaces.fluent; diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingImpl.java deleted file mode 100644 index 3047c0c4ccee..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingImpl.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.devspaces.implementation; - -import com.azure.resourcemanager.devspaces.fluent.models.ContainerHostMappingInner; -import com.azure.resourcemanager.devspaces.models.ContainerHostMapping; - -public final class ContainerHostMappingImpl implements ContainerHostMapping { - private ContainerHostMappingInner innerObject; - - private final com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager; - - ContainerHostMappingImpl( - ContainerHostMappingInner innerObject, com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String containerHostResourceId() { - return this.innerModel().containerHostResourceId(); - } - - public String mappedControllerResourceId() { - return this.innerModel().mappedControllerResourceId(); - } - - public ContainerHostMappingInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.devspaces.DevSpacesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsClientImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsClientImpl.java deleted file mode 100644 index cf08eea6fadf..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsClientImpl.java +++ /dev/null @@ -1,256 +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.devspaces.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -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.Post; -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.devspaces.fluent.ContainerHostMappingsClient; -import com.azure.resourcemanager.devspaces.fluent.models.ContainerHostMappingInner; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ContainerHostMappingsClient. */ -public final class ContainerHostMappingsClientImpl implements ContainerHostMappingsClient { - private final ClientLogger logger = new ClientLogger(ContainerHostMappingsClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ContainerHostMappingsService service; - - /** The service client containing this operation class. */ - private final DevSpacesManagementClientImpl client; - - /** - * Initializes an instance of ContainerHostMappingsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerHostMappingsClientImpl(DevSpacesManagementClientImpl client) { - this.service = - RestProxy - .create(ContainerHostMappingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DevSpacesManagementClientContainerHostMappings to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DevSpacesManagementC") - private interface ContainerHostMappingsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/locations" - + "/{location}/checkContainerHostMapping") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getContainerHostMapping( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("location") String location, - @BodyParam("application/json") ContainerHostMappingInner containerHostMapping, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getContainerHostMappingWithResponseAsync( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (containerHostMapping == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerHostMapping is required and cannot be null.")); - } else { - containerHostMapping.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getContainerHostMapping( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - location, - containerHostMapping, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getContainerHostMappingWithResponseAsync( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (containerHostMapping == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerHostMapping is required and cannot be null.")); - } else { - containerHostMapping.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getContainerHostMapping( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - location, - containerHostMapping, - accept, - context); - } - - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getContainerHostMappingAsync( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping) { - return getContainerHostMappingWithResponseAsync(resourceGroupName, location, containerHostMapping) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerHostMappingInner getContainerHostMapping( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping) { - return getContainerHostMappingAsync(resourceGroupName, location, containerHostMapping).block(); - } - - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getContainerHostMappingWithResponse( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context) { - return getContainerHostMappingWithResponseAsync(resourceGroupName, location, containerHostMapping, context) - .block(); - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsImpl.java deleted file mode 100644 index 9737902ae5d7..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ContainerHostMappingsImpl.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.devspaces.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.devspaces.fluent.ContainerHostMappingsClient; -import com.azure.resourcemanager.devspaces.fluent.models.ContainerHostMappingInner; -import com.azure.resourcemanager.devspaces.models.ContainerHostMapping; -import com.azure.resourcemanager.devspaces.models.ContainerHostMappings; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ContainerHostMappingsImpl implements ContainerHostMappings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerHostMappingsImpl.class); - - private final ContainerHostMappingsClient innerClient; - - private final com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager; - - public ContainerHostMappingsImpl( - ContainerHostMappingsClient innerClient, com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public ContainerHostMapping getContainerHostMapping( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping) { - ContainerHostMappingInner inner = - this.serviceClient().getContainerHostMapping(resourceGroupName, location, containerHostMapping); - if (inner != null) { - return new ContainerHostMappingImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getContainerHostMappingWithResponse( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context) { - Response inner = - this - .serviceClient() - .getContainerHostMappingWithResponse(resourceGroupName, location, containerHostMapping, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ContainerHostMappingImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - private ContainerHostMappingsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.devspaces.DevSpacesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerConnectionDetailsListImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerConnectionDetailsListImpl.java deleted file mode 100644 index 7a99f2646b64..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerConnectionDetailsListImpl.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.devspaces.implementation; - -import com.azure.resourcemanager.devspaces.fluent.models.ControllerConnectionDetailsListInner; -import com.azure.resourcemanager.devspaces.models.ControllerConnectionDetails; -import com.azure.resourcemanager.devspaces.models.ControllerConnectionDetailsList; -import java.util.Collections; -import java.util.List; - -public final class ControllerConnectionDetailsListImpl implements ControllerConnectionDetailsList { - private ControllerConnectionDetailsListInner innerObject; - - private final com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager; - - ControllerConnectionDetailsListImpl( - ControllerConnectionDetailsListInner innerObject, - com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List connectionDetailsList() { - List inner = this.innerModel().connectionDetailsList(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ControllerConnectionDetailsListInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.devspaces.DevSpacesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerImpl.java deleted file mode 100644 index d2d67cf3be22..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllerImpl.java +++ /dev/null @@ -1,237 +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.devspaces.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner; -import com.azure.resourcemanager.devspaces.models.Controller; -import com.azure.resourcemanager.devspaces.models.ControllerConnectionDetailsList; -import com.azure.resourcemanager.devspaces.models.ControllerUpdateParameters; -import com.azure.resourcemanager.devspaces.models.ListConnectionDetailsParameters; -import com.azure.resourcemanager.devspaces.models.ProvisioningState; -import com.azure.resourcemanager.devspaces.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class ControllerImpl implements Controller, Controller.Definition, Controller.Update { - private ControllerInner innerObject; - - private final com.azure.resourcemanager.devspaces.DevSpacesManager 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 Sku sku() { - return this.innerModel().sku(); - } - - public ProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String hostSuffix() { - return this.innerModel().hostSuffix(); - } - - public String dataPlaneFqdn() { - return this.innerModel().dataPlaneFqdn(); - } - - public String targetContainerHostApiServerFqdn() { - return this.innerModel().targetContainerHostApiServerFqdn(); - } - - public String targetContainerHostResourceId() { - return this.innerModel().targetContainerHostResourceId(); - } - - public String targetContainerHostCredentialsBase64() { - return this.innerModel().targetContainerHostCredentialsBase64(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public ControllerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.devspaces.DevSpacesManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String name; - - private ControllerUpdateParameters updateControllerUpdateParameters; - - public ControllerImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Controller create() { - this.innerObject = - serviceManager - .serviceClient() - .getControllers() - .create(resourceGroupName, name, this.innerModel(), Context.NONE); - return this; - } - - public Controller create(Context context) { - this.innerObject = - serviceManager.serviceClient().getControllers().create(resourceGroupName, name, this.innerModel(), context); - return this; - } - - ControllerImpl(String name, com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerObject = new ControllerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ControllerImpl update() { - this.updateControllerUpdateParameters = new ControllerUpdateParameters(); - return this; - } - - public Controller apply() { - this.innerObject = - serviceManager - .serviceClient() - .getControllers() - .updateWithResponse(resourceGroupName, name, updateControllerUpdateParameters, Context.NONE) - .getValue(); - return this; - } - - public Controller apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getControllers() - .updateWithResponse(resourceGroupName, name, updateControllerUpdateParameters, context) - .getValue(); - return this; - } - - ControllerImpl(ControllerInner innerObject, com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "controllers"); - } - - public Controller refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getControllers() - .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) - .getValue(); - return this; - } - - public Controller refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getControllers() - .getByResourceGroupWithResponse(resourceGroupName, name, context) - .getValue(); - return this; - } - - public ControllerConnectionDetailsList listConnectionDetails( - ListConnectionDetailsParameters listConnectionDetailsParameters) { - return serviceManager - .controllers() - .listConnectionDetails(resourceGroupName, name, listConnectionDetailsParameters); - } - - public Response listConnectionDetailsWithResponse( - ListConnectionDetailsParameters listConnectionDetailsParameters, Context context) { - return serviceManager - .controllers() - .listConnectionDetailsWithResponse(resourceGroupName, name, listConnectionDetailsParameters, context); - } - - public ControllerImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ControllerImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ControllerImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public ControllerImpl withTargetContainerHostResourceId(String targetContainerHostResourceId) { - this.innerModel().withTargetContainerHostResourceId(targetContainerHostResourceId); - return this; - } - - public ControllerImpl withTargetContainerHostCredentialsBase64(String targetContainerHostCredentialsBase64) { - if (isInCreateMode()) { - this.innerModel().withTargetContainerHostCredentialsBase64(targetContainerHostCredentialsBase64); - return this; - } else { - this - .updateControllerUpdateParameters - .withTargetContainerHostCredentialsBase64(targetContainerHostCredentialsBase64); - return this; - } - } - - public ControllerImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateControllerUpdateParameters.withTags(tags); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersClientImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersClientImpl.java deleted file mode 100644 index 525aabe21ad6..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersClientImpl.java +++ /dev/null @@ -1,1635 +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.devspaces.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.devspaces.fluent.ControllersClient; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerConnectionDetailsListInner; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner; -import com.azure.resourcemanager.devspaces.models.ControllerList; -import com.azure.resourcemanager.devspaces.models.ControllerUpdateParameters; -import com.azure.resourcemanager.devspaces.models.ListConnectionDetailsParameters; -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 ControllersClient. */ -public final class ControllersClientImpl implements ControllersClient { - private final ClientLogger logger = new ClientLogger(ControllersClientImpl.class); - - /** The proxy service used to perform REST calls. */ - private final ControllersService service; - - /** The service client containing this operation class. */ - private final DevSpacesManagementClientImpl client; - - /** - * Initializes an instance of ControllersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ControllersClientImpl(DevSpacesManagementClientImpl client) { - this.service = - RestProxy.create(ControllersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DevSpacesManagementClientControllers to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DevSpacesManagementC") - private interface ControllersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces" - + "/controllers/{name}") - @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("name") String name, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces" - + "/controllers/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @BodyParam("application/json") ControllerInner controller, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces" - + "/controllers/{name}") - @ExpectedResponses({200, 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("name") String name, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces" - + "/controllers/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @BodyParam("application/json") ControllerUpdateParameters controllerUpdateParameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces" - + "/controllers") - @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"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DevSpaces/controllers") - @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"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces" - + "/controllers/{name}/listConnectionDetails") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listConnectionDetails( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("name") String name, - @BodyParam("application/json") ListConnectionDetailsParameters listConnectionDetailsParameters, - @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); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for an Azure Dev Spaces Controller. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - name, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 properties for an Azure Dev Spaces Controller. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String name, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - name, - accept, - context); - } - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for an Azure Dev Spaces Controller. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String name) { - return getByResourceGroupWithResponseAsync(resourceGroupName, name) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for an Azure Dev Spaces Controller. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ControllerInner getByResourceGroup(String resourceGroupName, String name) { - return getByResourceGroupAsync(resourceGroupName, name).block(); - } - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 properties for an Azure Dev Spaces Controller. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String name, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String name, ControllerInner controller) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (controller == null) { - return Mono.error(new IllegalArgumentException("Parameter controller is required and cannot be null.")); - } else { - controller.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - controller, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync( - String resourceGroupName, String name, ControllerInner controller, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (controller == null) { - return Mono.error(new IllegalArgumentException("Parameter controller is required and cannot be null.")); - } else { - controller.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - controller, - accept, - context); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ControllerInner> beginCreateAsync( - String resourceGroupName, String name, ControllerInner controller) { - Mono>> mono = createWithResponseAsync(resourceGroupName, name, controller); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ControllerInner.class, ControllerInner.class, Context.NONE); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, ControllerInner> beginCreateAsync( - String resourceGroupName, String name, ControllerInner controller, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createWithResponseAsync(resourceGroupName, name, controller, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ControllerInner.class, ControllerInner.class, context); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ControllerInner> beginCreate( - String resourceGroupName, String name, ControllerInner controller) { - return beginCreateAsync(resourceGroupName, name, controller).getSyncPoller(); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, ControllerInner> beginCreate( - String resourceGroupName, String name, ControllerInner controller, Context context) { - return beginCreateAsync(resourceGroupName, name, controller, context).getSyncPoller(); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String name, ControllerInner controller) { - return beginCreateAsync(resourceGroupName, name, controller) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String name, ControllerInner controller, Context context) { - return beginCreateAsync(resourceGroupName, name, controller, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ControllerInner create(String resourceGroupName, String name, ControllerInner controller) { - return createAsync(resourceGroupName, name, controller).block(); - } - - /** - * Creates an Azure Dev Spaces Controller with the specified create parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controller Controller create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ControllerInner create(String resourceGroupName, String name, ControllerInner controller, Context context) { - return createAsync(resourceGroupName, name, controller, context).block(); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - name, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, - name, - accept, - context); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, name); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SyncPoller, Void> beginDelete(String resourceGroupName, String name) { - return beginDeleteAsync(resourceGroupName, name).getSyncPoller(); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, Context context) { - return beginDeleteAsync(resourceGroupName, name, context).getSyncPoller(); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String name) { - return beginDeleteAsync(resourceGroupName, name).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, Context context) { - return beginDeleteAsync(resourceGroupName, name, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String name) { - deleteAsync(resourceGroupName, name).block(); - } - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, Context context) { - deleteAsync(resourceGroupName, name, context).block(); - } - - /** - * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (controllerUpdateParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter controllerUpdateParameters is required and cannot be null.")); - } else { - controllerUpdateParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - controllerUpdateParameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (controllerUpdateParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter controllerUpdateParameters is required and cannot be null.")); - } else { - controllerUpdateParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - controllerUpdateParameters, - accept, - context); - } - - /** - * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters) { - return updateWithResponseAsync(resourceGroupName, name, controllerUpdateParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ControllerInner update( - String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters) { - return updateAsync(resourceGroupName, name, controllerUpdateParameters).block(); - } - - /** - * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param controllerUpdateParameters Parameters for updating the Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters, Context context) { - return updateWithResponseAsync(resourceGroupName, name, controllerUpdateParameters, context).block(); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @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())); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @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)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @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())); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the 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 the response. - */ - @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)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the 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 the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the 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 the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConnectionDetailsWithResponseAsync( - String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (listConnectionDetailsParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter listConnectionDetailsParameters is required and cannot be null.")); - } else { - listConnectionDetailsParameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listConnectionDetails( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - listConnectionDetailsParameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConnectionDetailsWithResponseAsync( - String resourceGroupName, - String name, - ListConnectionDetailsParameters listConnectionDetailsParameters, - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (listConnectionDetailsParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter listConnectionDetailsParameters is required and cannot be null.")); - } else { - listConnectionDetailsParameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listConnectionDetails( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - name, - listConnectionDetailsParameters, - accept, - context); - } - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listConnectionDetailsAsync( - String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters) { - return listConnectionDetailsWithResponseAsync(resourceGroupName, name, listConnectionDetailsParameters) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); - } - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ControllerConnectionDetailsListInner listConnectionDetails( - String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters) { - return listConnectionDetailsAsync(resourceGroupName, name, listConnectionDetailsParameters).block(); - } - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listConnectionDetailsWithResponse( - String resourceGroupName, - String name, - ListConnectionDetailsParameters listConnectionDetailsParameters, - Context context) { - return listConnectionDetailsWithResponseAsync(resourceGroupName, name, listConnectionDetailsParameters, 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 the response. - */ - @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 the response. - */ - @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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersImpl.java deleted file mode 100644 index 4d400adbca6f..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ControllersImpl.java +++ /dev/null @@ -1,203 +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.devspaces.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.devspaces.fluent.ControllersClient; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerConnectionDetailsListInner; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner; -import com.azure.resourcemanager.devspaces.models.Controller; -import com.azure.resourcemanager.devspaces.models.ControllerConnectionDetailsList; -import com.azure.resourcemanager.devspaces.models.Controllers; -import com.azure.resourcemanager.devspaces.models.ListConnectionDetailsParameters; -import com.fasterxml.jackson.annotation.JsonIgnore; - -public final class ControllersImpl implements Controllers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ControllersImpl.class); - - private final ControllersClient innerClient; - - private final com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager; - - public ControllersImpl( - ControllersClient innerClient, com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Controller getByResourceGroup(String resourceGroupName, String name) { - ControllerInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); - if (inner != null) { - return new ControllerImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ControllerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String name) { - this.serviceClient().delete(resourceGroupName, name); - } - - public void delete(String resourceGroupName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, name, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ControllerImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ControllerImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ControllerImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ControllerImpl(inner1, this.manager())); - } - - public ControllerConnectionDetailsList listConnectionDetails( - String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters) { - ControllerConnectionDetailsListInner inner = - this.serviceClient().listConnectionDetails(resourceGroupName, name, listConnectionDetailsParameters); - if (inner != null) { - return new ControllerConnectionDetailsListImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listConnectionDetailsWithResponse( - String resourceGroupName, - String name, - ListConnectionDetailsParameters listConnectionDetailsParameters, - Context context) { - Response inner = - this - .serviceClient() - .listConnectionDetailsWithResponse(resourceGroupName, name, listConnectionDetailsParameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ControllerConnectionDetailsListImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Controller 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 name = Utils.getValueFromIdByName(id, "controllers"); - if (name == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "controllers"); - if (name == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "controllers"); - if (name == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id))); - } - this.delete(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "controllers"); - if (name == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id))); - } - this.delete(resourceGroupName, name, context); - } - - private ControllersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.devspaces.DevSpacesManager manager() { - return this.serviceManager; - } - - public ControllerImpl define(String name) { - return new ControllerImpl(name, this.manager()); - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientBuilder.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientBuilder.java deleted file mode 100644 index 672f07eaf978..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientBuilder.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.devspaces.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 DevSpacesManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {DevSpacesManagementClientImpl.class}) -public final class DevSpacesManagementClientBuilder { - /* - * Azure subscription ID. - */ - private String subscriptionId; - - /** - * Sets Azure subscription ID. - * - * @param subscriptionId the subscriptionId value. - * @return the DevSpacesManagementClientBuilder. - */ - public DevSpacesManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the DevSpacesManagementClientBuilder. - */ - public DevSpacesManagementClientBuilder 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 DevSpacesManagementClientBuilder. - */ - public DevSpacesManagementClientBuilder 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 DevSpacesManagementClientBuilder. - */ - public DevSpacesManagementClientBuilder 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 DevSpacesManagementClientBuilder. - */ - public DevSpacesManagementClientBuilder 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 DevSpacesManagementClientBuilder. - */ - public DevSpacesManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of DevSpacesManagementClientImpl with the provided parameters. - * - * @return an instance of DevSpacesManagementClientImpl. - */ - public DevSpacesManagementClientImpl 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(); - } - DevSpacesManagementClientImpl client = - new DevSpacesManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); - return client; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientImpl.java deleted file mode 100644 index 8828a3d05aa4..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/DevSpacesManagementClientImpl.java +++ /dev/null @@ -1,321 +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.devspaces.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.devspaces.fluent.ContainerHostMappingsClient; -import com.azure.resourcemanager.devspaces.fluent.ControllersClient; -import com.azure.resourcemanager.devspaces.fluent.DevSpacesManagementClient; -import com.azure.resourcemanager.devspaces.fluent.OperationsClient; -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 DevSpacesManagementClientImpl type. */ -@ServiceClient(builder = DevSpacesManagementClientBuilder.class) -public final class DevSpacesManagementClientImpl implements DevSpacesManagementClient { - private final ClientLogger logger = new ClientLogger(DevSpacesManagementClientImpl.class); - - /** Azure subscription ID. */ - private final String subscriptionId; - - /** - * Gets Azure subscription ID. - * - * @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 ContainerHostMappingsClient object to access its operations. */ - private final ContainerHostMappingsClient containerHostMappings; - - /** - * Gets the ContainerHostMappingsClient object to access its operations. - * - * @return the ContainerHostMappingsClient object. - */ - public ContainerHostMappingsClient getContainerHostMappings() { - return this.containerHostMappings; - } - - /** 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 ControllersClient object to access its operations. */ - private final ControllersClient controllers; - - /** - * Gets the ControllersClient object to access its operations. - * - * @return the ControllersClient object. - */ - public ControllersClient getControllers() { - return this.controllers; - } - - /** - * Initializes an instance of DevSpacesManagementClient 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 Azure subscription ID. - * @param endpoint server parameter. - */ - DevSpacesManagementClientImpl( - 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 = "2019-04-01"; - this.containerHostMappings = new ContainerHostMappingsClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.controllers = new ControllersClientImpl(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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/OperationsClientImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/OperationsClientImpl.java deleted file mode 100644 index 150a59a8288f..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,270 +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.devspaces.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.devspaces.fluent.OperationsClient; -import com.azure.resourcemanager.devspaces.fluent.models.ResourceProviderOperationDefinitionInner; -import com.azure.resourcemanager.devspaces.models.ResourceProviderOperationList; -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 DevSpacesManagementClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(DevSpacesManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for DevSpacesManagementClientOperations to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "DevSpacesManagementC") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.DevSpaces/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 the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @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 the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @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 the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/OperationsImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/OperationsImpl.java deleted file mode 100644 index bd566f928d0e..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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.devspaces.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.devspaces.fluent.OperationsClient; -import com.azure.resourcemanager.devspaces.fluent.models.ResourceProviderOperationDefinitionInner; -import com.azure.resourcemanager.devspaces.models.Operations; -import com.azure.resourcemanager.devspaces.models.ResourceProviderOperationDefinition; -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.devspaces.DevSpacesManager serviceManager; - - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationDefinitionImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ResourceProviderOperationDefinitionImpl(inner1, this.manager())); - } - - private OperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.devspaces.DevSpacesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ResourceProviderOperationDefinitionImpl.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ResourceProviderOperationDefinitionImpl.java deleted file mode 100644 index 88b16a65189f..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/ResourceProviderOperationDefinitionImpl.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.devspaces.implementation; - -import com.azure.resourcemanager.devspaces.fluent.models.ResourceProviderOperationDefinitionInner; -import com.azure.resourcemanager.devspaces.models.ResourceProviderOperationDefinition; -import com.azure.resourcemanager.devspaces.models.ResourceProviderOperationDisplay; - -public final class ResourceProviderOperationDefinitionImpl implements ResourceProviderOperationDefinition { - private ResourceProviderOperationDefinitionInner innerObject; - - private final com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager; - - ResourceProviderOperationDefinitionImpl( - ResourceProviderOperationDefinitionInner innerObject, - com.azure.resourcemanager.devspaces.DevSpacesManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public ResourceProviderOperationDisplay display() { - return this.innerModel().display(); - } - - public ResourceProviderOperationDefinitionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.devspaces.DevSpacesManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/Utils.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/Utils.java deleted file mode 100644 index 0cbbb5cd597d..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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.devspaces.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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/package-info.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/implementation/package-info.java deleted file mode 100644 index 4f0ab16f9fb4..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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 DevSpacesManagementClient. Dev Spaces Client. */ -package com.azure.resourcemanager.devspaces.implementation; diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMapping.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMapping.java deleted file mode 100644 index d750c6fc258f..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMapping.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.devspaces.models; - -import com.azure.resourcemanager.devspaces.fluent.models.ContainerHostMappingInner; - -/** An immutable client-side representation of ContainerHostMapping. */ -public interface ContainerHostMapping { - /** - * Gets the containerHostResourceId property: ARM ID of the Container Host resource. - * - * @return the containerHostResourceId value. - */ - String containerHostResourceId(); - - /** - * Gets the mappedControllerResourceId property: ARM ID of the mapped Controller resource. - * - * @return the mappedControllerResourceId value. - */ - String mappedControllerResourceId(); - - /** - * Gets the inner com.azure.resourcemanager.devspaces.fluent.models.ContainerHostMappingInner object. - * - * @return the inner object. - */ - ContainerHostMappingInner innerModel(); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMappings.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMappings.java deleted file mode 100644 index be578c3d5772..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ContainerHostMappings.java +++ /dev/null @@ -1,45 +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.devspaces.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.devspaces.fluent.models.ContainerHostMappingInner; - -/** Resource collection API of ContainerHostMappings. */ -public interface ContainerHostMappings { - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - ContainerHostMapping getContainerHostMapping( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping); - - /** - * Returns container host mapping object for a container host resource ID if an associated controller exists. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param location Location of the container host. - * @param containerHostMapping Container host mapping object specifying the Container host resource ID and its - * associated Controller 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 container host mapping object specifying the Container host resource ID and its associated Controller - * resource. - */ - Response getContainerHostMappingWithResponse( - String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controller.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controller.java deleted file mode 100644 index aaf673465af7..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controller.java +++ /dev/null @@ -1,313 +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.devspaces.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner; -import java.util.Map; - -/** An immutable client-side representation of Controller. */ -public interface Controller { - /** - * 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 sku property: Model representing SKU for Azure Dev Spaces Controller. - * - * @return the sku value. - */ - Sku sku(); - - /** - * Gets the provisioningState property: Provisioning state of the Azure Dev Spaces Controller. - * - * @return the provisioningState value. - */ - ProvisioningState provisioningState(); - - /** - * Gets the hostSuffix property: DNS suffix for public endpoints running in the Azure Dev Spaces Controller. - * - * @return the hostSuffix value. - */ - String hostSuffix(); - - /** - * Gets the dataPlaneFqdn property: DNS name for accessing DataPlane services. - * - * @return the dataPlaneFqdn value. - */ - String dataPlaneFqdn(); - - /** - * Gets the targetContainerHostApiServerFqdn property: DNS of the target container host's API server. - * - * @return the targetContainerHostApiServerFqdn value. - */ - String targetContainerHostApiServerFqdn(); - - /** - * Gets the targetContainerHostResourceId property: Resource ID of the target container host. - * - * @return the targetContainerHostResourceId value. - */ - String targetContainerHostResourceId(); - - /** - * Gets the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64). - * - * @return the targetContainerHostCredentialsBase64 value. - */ - String targetContainerHostCredentialsBase64(); - - /** - * 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.devspaces.fluent.models.ControllerInner object. - * - * @return the inner object. - */ - ControllerInner innerModel(); - - /** The entirety of the Controller definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithSku, - DefinitionStages.WithTargetContainerHostResourceId, - DefinitionStages.WithTargetContainerHostCredentialsBase64, - DefinitionStages.WithCreate { - } - /** The Controller definition stages. */ - interface DefinitionStages { - /** The first stage of the Controller definition. */ - interface Blank extends WithLocation { - } - /** The stage of the Controller 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 Controller definition allowing to specify parent resource. */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @return the next definition stage. - */ - WithSku withExistingResourceGroup(String resourceGroupName); - } - /** The stage of the Controller definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Model representing SKU for Azure Dev Spaces Controller.. - * - * @param sku Model representing SKU for Azure Dev Spaces Controller. - * @return the next definition stage. - */ - WithTargetContainerHostResourceId withSku(Sku sku); - } - /** The stage of the Controller definition allowing to specify targetContainerHostResourceId. */ - interface WithTargetContainerHostResourceId { - /** - * Specifies the targetContainerHostResourceId property: Resource ID of the target container host. - * - * @param targetContainerHostResourceId Resource ID of the target container host. - * @return the next definition stage. - */ - WithTargetContainerHostCredentialsBase64 withTargetContainerHostResourceId( - String targetContainerHostResourceId); - } - /** The stage of the Controller definition allowing to specify targetContainerHostCredentialsBase64. */ - interface WithTargetContainerHostCredentialsBase64 { - /** - * Specifies the targetContainerHostCredentialsBase64 property: Credentials of the target container host - * (base64).. - * - * @param targetContainerHostCredentialsBase64 Credentials of the target container host (base64). - * @return the next definition stage. - */ - WithCreate withTargetContainerHostCredentialsBase64(String targetContainerHostCredentialsBase64); - } - /** - * The stage of the Controller 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - Controller create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Controller create(Context context); - } - /** The stage of the Controller 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); - } - } - /** - * Begins update for the Controller resource. - * - * @return the stage of resource update. - */ - Controller.Update update(); - - /** The template for Controller update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithTargetContainerHostCredentialsBase64 { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Controller apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Controller apply(Context context); - } - /** The Controller update stages. */ - interface UpdateStages { - /** The stage of the Controller update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Tags for the Azure Dev Spaces Controller.. - * - * @param tags Tags for the Azure Dev Spaces Controller. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the Controller update allowing to specify targetContainerHostCredentialsBase64. */ - interface WithTargetContainerHostCredentialsBase64 { - /** - * Specifies the targetContainerHostCredentialsBase64 property: Credentials of the target container host - * (base64).. - * - * @param targetContainerHostCredentialsBase64 Credentials of the target container host (base64). - * @return the next definition stage. - */ - Update withTargetContainerHostCredentialsBase64(String targetContainerHostCredentialsBase64); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Controller refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Controller refresh(Context context); - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ControllerConnectionDetailsList listConnectionDetails( - ListConnectionDetailsParameters listConnectionDetailsParameters); - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listConnectionDetailsWithResponse( - ListConnectionDetailsParameters listConnectionDetailsParameters, Context context); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetails.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetails.java deleted file mode 100644 index c28b694ce600..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetails.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.devspaces.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 ControllerConnectionDetails model. */ -@Fluent -public final class ControllerConnectionDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ControllerConnectionDetails.class); - - /* - * Base class for types that supply values used to connect to container - * orchestrators - */ - @JsonProperty(value = "orchestratorSpecificConnectionDetails") - private OrchestratorSpecificConnectionDetails orchestratorSpecificConnectionDetails; - - /** - * Get the orchestratorSpecificConnectionDetails property: Base class for types that supply values used to connect - * to container orchestrators. - * - * @return the orchestratorSpecificConnectionDetails value. - */ - public OrchestratorSpecificConnectionDetails orchestratorSpecificConnectionDetails() { - return this.orchestratorSpecificConnectionDetails; - } - - /** - * Set the orchestratorSpecificConnectionDetails property: Base class for types that supply values used to connect - * to container orchestrators. - * - * @param orchestratorSpecificConnectionDetails the orchestratorSpecificConnectionDetails value to set. - * @return the ControllerConnectionDetails object itself. - */ - public ControllerConnectionDetails withOrchestratorSpecificConnectionDetails( - OrchestratorSpecificConnectionDetails orchestratorSpecificConnectionDetails) { - this.orchestratorSpecificConnectionDetails = orchestratorSpecificConnectionDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (orchestratorSpecificConnectionDetails() != null) { - orchestratorSpecificConnectionDetails().validate(); - } - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetailsList.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetailsList.java deleted file mode 100644 index 00d09b681d3d..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerConnectionDetailsList.java +++ /dev/null @@ -1,25 +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.devspaces.models; - -import com.azure.resourcemanager.devspaces.fluent.models.ControllerConnectionDetailsListInner; -import java.util.List; - -/** An immutable client-side representation of ControllerConnectionDetailsList. */ -public interface ControllerConnectionDetailsList { - /** - * Gets the connectionDetailsList property: List of Azure Dev Spaces Controller connection details. - * - * @return the connectionDetailsList value. - */ - List connectionDetailsList(); - - /** - * Gets the inner com.azure.resourcemanager.devspaces.fluent.models.ControllerConnectionDetailsListInner object. - * - * @return the inner object. - */ - ControllerConnectionDetailsListInner innerModel(); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerList.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerList.java deleted file mode 100644 index c9700e879fed..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerList.java +++ /dev/null @@ -1,72 +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.devspaces.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.devspaces.fluent.models.ControllerInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ControllerList model. */ -@Fluent -public final class ControllerList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ControllerList.class); - - /* - * List of Azure Dev Spaces Controllers. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The URI that can be used to request the next page for list of Azure Dev - * Spaces Controllers. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: List of Azure Dev Spaces Controllers. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of Azure Dev Spaces Controllers. - * - * @param value the value value to set. - * @return the ControllerList object itself. - */ - public ControllerList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI that can be used to request the next page for list of Azure Dev Spaces - * Controllers. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * 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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerUpdateParameters.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerUpdateParameters.java deleted file mode 100644 index 501d8fc7f421..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ControllerUpdateParameters.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devspaces.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; - -/** Parameters for updating an Azure Dev Spaces Controller. */ -@JsonFlatten -@Fluent -public class ControllerUpdateParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ControllerUpdateParameters.class); - - /* - * Tags for the Azure Dev Spaces Controller. - */ - @JsonProperty(value = "tags") - private Map tags; - - /* - * Credentials of the target container host (base64). - */ - @JsonProperty(value = "properties.targetContainerHostCredentialsBase64") - private String targetContainerHostCredentialsBase64; - - /** - * Get the tags property: Tags for the Azure Dev Spaces Controller. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Tags for the Azure Dev Spaces Controller. - * - * @param tags the tags value to set. - * @return the ControllerUpdateParameters object itself. - */ - public ControllerUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64). - * - * @return the targetContainerHostCredentialsBase64 value. - */ - public String targetContainerHostCredentialsBase64() { - return this.targetContainerHostCredentialsBase64; - } - - /** - * Set the targetContainerHostCredentialsBase64 property: Credentials of the target container host (base64). - * - * @param targetContainerHostCredentialsBase64 the targetContainerHostCredentialsBase64 value to set. - * @return the ControllerUpdateParameters object itself. - */ - public ControllerUpdateParameters withTargetContainerHostCredentialsBase64( - String targetContainerHostCredentialsBase64) { - this.targetContainerHostCredentialsBase64 = targetContainerHostCredentialsBase64; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controllers.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controllers.java deleted file mode 100644 index a88ae352ad4a..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Controllers.java +++ /dev/null @@ -1,189 +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.devspaces.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 Controllers. */ -public interface Controllers { - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties for an Azure Dev Spaces Controller. - */ - Controller getByResourceGroup(String resourceGroupName, String name); - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 properties for an Azure Dev Spaces Controller. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String name); - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the 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 name, Context context); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and - * subscription. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PagedIterable list(); - - /** - * Lists all the Azure Dev Spaces Controllers with their properties in the 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 the response. - */ - PagedIterable list(Context context); - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ControllerConnectionDetailsList listConnectionDetails( - String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters); - - /** - * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller. - * - * @param resourceGroupName Resource group to which the resource belongs. - * @param name Name of the resource. - * @param listConnectionDetailsParameters Parameters for listing connection details of Azure Dev Spaces Controller. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - Response listConnectionDetailsWithResponse( - String resourceGroupName, - String name, - ListConnectionDetailsParameters listConnectionDetailsParameters, - Context context); - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @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 properties for an Azure Dev Spaces Controller. - */ - Controller getById(String id); - - /** - * Gets the properties for an Azure Dev Spaces Controller. - * - * @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 properties for an Azure Dev Spaces Controller. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes an existing Azure Dev Spaces Controller. - * - * @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 an existing Azure Dev Spaces Controller. - * - * @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 Controller resource. - * - * @param name resource name. - * @return the first stage of the new Controller definition. - */ - Controller.DefinitionStages.Blank define(String name); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/KubernetesConnectionDetails.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/KubernetesConnectionDetails.java deleted file mode 100644 index b12e5ad53528..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/KubernetesConnectionDetails.java +++ /dev/null @@ -1,56 +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.devspaces.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 com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Contains information used to connect to a Kubernetes cluster. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "instanceType") -@JsonTypeName("Kubernetes") -@Fluent -public final class KubernetesConnectionDetails extends OrchestratorSpecificConnectionDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KubernetesConnectionDetails.class); - - /* - * Gets the kubeconfig for the cluster. - */ - @JsonProperty(value = "kubeConfig") - private String kubeConfig; - - /** - * Get the kubeConfig property: Gets the kubeconfig for the cluster. - * - * @return the kubeConfig value. - */ - public String kubeConfig() { - return this.kubeConfig; - } - - /** - * Set the kubeConfig property: Gets the kubeconfig for the cluster. - * - * @param kubeConfig the kubeConfig value to set. - * @return the KubernetesConnectionDetails object itself. - */ - public KubernetesConnectionDetails withKubeConfig(String kubeConfig) { - this.kubeConfig = kubeConfig; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ListConnectionDetailsParameters.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ListConnectionDetailsParameters.java deleted file mode 100644 index aa6d7756156b..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ListConnectionDetailsParameters.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.devspaces.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; - -/** Parameters for listing connection details of an Azure Dev Spaces Controller. */ -@Fluent -public final class ListConnectionDetailsParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ListConnectionDetailsParameters.class); - - /* - * Resource ID of the target container host mapped to the Azure Dev Spaces - * Controller. - */ - @JsonProperty(value = "targetContainerHostResourceId", required = true) - private String targetContainerHostResourceId; - - /** - * Get the targetContainerHostResourceId property: Resource ID of the target container host mapped to the Azure Dev - * Spaces Controller. - * - * @return the targetContainerHostResourceId value. - */ - public String targetContainerHostResourceId() { - return this.targetContainerHostResourceId; - } - - /** - * Set the targetContainerHostResourceId property: Resource ID of the target container host mapped to the Azure Dev - * Spaces Controller. - * - * @param targetContainerHostResourceId the targetContainerHostResourceId value to set. - * @return the ListConnectionDetailsParameters object itself. - */ - public ListConnectionDetailsParameters withTargetContainerHostResourceId(String targetContainerHostResourceId) { - this.targetContainerHostResourceId = targetContainerHostResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetContainerHostResourceId() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetContainerHostResourceId in model" - + " ListConnectionDetailsParameters")); - } - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Operations.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Operations.java deleted file mode 100644 index 3bb5be8d4ee2..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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.devspaces.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** Resource collection API of Operations. */ -public interface Operations { - /** - * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PagedIterable list(); - - /** - * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - PagedIterable list(Context context); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/OrchestratorSpecificConnectionDetails.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/OrchestratorSpecificConnectionDetails.java deleted file mode 100644 index 9eed37c3f647..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/OrchestratorSpecificConnectionDetails.java +++ /dev/null @@ -1,33 +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.devspaces.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.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base class for types that supply values used to connect to container orchestrators. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "instanceType", - defaultImpl = OrchestratorSpecificConnectionDetails.class) -@JsonTypeName("OrchestratorSpecificConnectionDetails") -@JsonSubTypes({@JsonSubTypes.Type(name = "Kubernetes", value = KubernetesConnectionDetails.class)}) -@Immutable -public class OrchestratorSpecificConnectionDetails { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OrchestratorSpecificConnectionDetails.class); - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ProvisioningState.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ProvisioningState.java deleted file mode 100644 index 414ff6a36290..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ProvisioningState.java +++ /dev/null @@ -1,49 +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.devspaces.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 Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** 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 Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** Static value Creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** Static value Deleted for ProvisioningState. */ - public static final ProvisioningState DELETED = fromString("Deleted"); - - /** - * 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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDefinition.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDefinition.java deleted file mode 100644 index 63c2b0073c6a..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDefinition.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.devspaces.models; - -import com.azure.resourcemanager.devspaces.fluent.models.ResourceProviderOperationDefinitionInner; - -/** An immutable client-side representation of ResourceProviderOperationDefinition. */ -public interface ResourceProviderOperationDefinition { - /** - * Gets the name property: Resource provider operation name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: The display property. - * - * @return the display value. - */ - ResourceProviderOperationDisplay display(); - - /** - * Gets the inner com.azure.resourcemanager.devspaces.fluent.models.ResourceProviderOperationDefinitionInner object. - * - * @return the inner object. - */ - ResourceProviderOperationDefinitionInner innerModel(); -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDisplay.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDisplay.java deleted file mode 100644 index 699b5d341df0..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationDisplay.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.devspaces.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 ResourceProviderOperationDisplay model. */ -@Fluent -public final class ResourceProviderOperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProviderOperationDisplay.class); - - /* - * Name of the resource provider. - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * Name of the resource type. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * Name of the resource provider operation. - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * Description of the resource provider operation. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider property: Name of the resource provider. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: Name of the resource provider. - * - * @param provider the provider value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Name of the resource type. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Name of the resource type. - * - * @param resource the resource value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Name of the resource provider operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: Name of the resource provider operation. - * - * @param operation the operation value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Description of the resource provider operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the resource provider operation. - * - * @param description the description value to set. - * @return the ResourceProviderOperationDisplay object itself. - */ - public ResourceProviderOperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationList.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationList.java deleted file mode 100644 index 0e382a80ac7b..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/ResourceProviderOperationList.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.devspaces.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.devspaces.fluent.models.ResourceProviderOperationDefinitionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ResourceProviderOperationList model. */ -@Fluent -public final class ResourceProviderOperationList { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProviderOperationList.class); - - /* - * Resource provider operations list. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The URI that can be used to request the next page for list of Azure - * operations. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * Get the value property: Resource provider operations list. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Resource provider operations list. - * - * @param value the value value to set. - * @return the ResourceProviderOperationList object itself. - */ - public ResourceProviderOperationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI that can be used to request the next page for list of Azure operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * 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/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Sku.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Sku.java deleted file mode 100644 index 694c61eef211..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/Sku.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.devspaces.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; - -/** Model representing SKU for Azure Dev Spaces Controller. */ -@Fluent -public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - - /* - * The name of the SKU for Azure Dev Spaces Controller. - */ - @JsonProperty(value = "name", required = true) - private SkuName name; - - /* - * The tier of the SKU for Azure Dev Spaces Controller. - */ - @JsonProperty(value = "tier") - private SkuTier tier; - - /** - * Get the name property: The name of the SKU for Azure Dev Spaces Controller. - * - * @return the name value. - */ - public SkuName name() { - return this.name; - } - - /** - * Set the name property: The name of the SKU for Azure Dev Spaces Controller. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(SkuName name) { - this.name = name; - return this; - } - - /** - * Get the tier property: The tier of the SKU for Azure Dev Spaces Controller. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: The tier of the SKU for Azure Dev Spaces Controller. - * - * @param tier the tier value to set. - * @return the Sku object itself. - */ - public Sku withTier(SkuTier tier) { - this.tier = tier; - 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 Sku")); - } - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuName.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuName.java deleted file mode 100644 index 010262160e87..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuName.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.devspaces.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuName. */ -public final class SkuName extends ExpandableStringEnum { - /** Static value S1 for SkuName. */ - public static final SkuName S1 = fromString("S1"); - - /** - * Creates or finds a SkuName from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuName. - */ - @JsonCreator - public static SkuName fromString(String name) { - return fromString(name, SkuName.class); - } - - /** @return known SkuName values. */ - public static Collection values() { - return values(SkuName.class); - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuTier.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuTier.java deleted file mode 100644 index 23d4504137ec..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/SkuTier.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.devspaces.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuTier. */ -public final class SkuTier extends ExpandableStringEnum { - /** Static value Standard for SkuTier. */ - public static final SkuTier STANDARD = fromString("Standard"); - - /** - * Creates or finds a SkuTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuTier. - */ - @JsonCreator - public static SkuTier fromString(String name) { - return fromString(name, SkuTier.class); - } - - /** @return known SkuTier values. */ - public static Collection values() { - return values(SkuTier.class); - } -} diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/package-info.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/models/package-info.java deleted file mode 100644 index 9af655912cef..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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 DevSpacesManagementClient. Dev Spaces Client. */ -package com.azure.resourcemanager.devspaces.models; diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/package-info.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/package-info.java deleted file mode 100644 index c414cea2ab4e..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/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 DevSpacesManagementClient. Dev Spaces Client. */ -package com.azure.resourcemanager.devspaces; diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/module-info.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/module-info.java deleted file mode 100644 index d45b38ccdee0..000000000000 --- a/sdk/devspaces/azure-resourcemanager-devspaces/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.devspaces { - requires transitive com.azure.core.management; - - exports com.azure.resourcemanager.devspaces; - exports com.azure.resourcemanager.devspaces.fluent; - exports com.azure.resourcemanager.devspaces.fluent.models; - exports com.azure.resourcemanager.devspaces.models; - - opens com.azure.resourcemanager.devspaces.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.devspaces.models to - com.azure.core, - com.fasterxml.jackson.databind; -}