diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/CHANGELOG.md b/sdk/devspaces/azure-resourcemanager-devspaces/CHANGELOG.md
index 7c6a9749f9b4..744862224759 100644
--- a/sdk/devspaces/azure-resourcemanager-devspaces/CHANGELOG.md
+++ b/sdk/devspaces/azure-resourcemanager-devspaces/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.1 (2023-01-16)
+- Azure Resource Manager DevSpaces client library for Java. This package contains Microsoft Azure SDK for DevSpaces Management SDK. Dev Spaces Client. Package tag package-2019-04-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.1 (2021-04-15)
diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/README.md b/sdk/devspaces/azure-resourcemanager-devspaces/README.md
index b1b5f2e0e5ed..308d67f3d528 100644
--- a/sdk/devspaces/azure-resourcemanager-devspaces/README.md
+++ b/sdk/devspaces/azure-resourcemanager-devspaces/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanagerazure-resourcemanager-devspaces
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
-[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
### Authentication
-By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
-In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
-With above configuration, `azure` client can be authenticated by following code:
+With above configuration, `azure` client can be authenticated using the following code:
```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
@@ -74,19 +74,22 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/devspaces/azure-resourcemanager-devspaces/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
## Contributing
-For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+For details on contributing to this repository, see the [contributing guide][cg].
+
+This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit .
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.
-1. Fork it
-1. Create your feature branch (`git checkout -b my-new-feature`)
-1. Commit your changes (`git commit -am 'Add some feature'`)
-1. Push to the branch (`git push origin my-new-feature`)
-1. Create new Pull Request
+This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments.
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -97,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
+[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
+[coc]: https://opensource.microsoft.com/codeofconduct/
+[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/SAMPLE.md b/sdk/devspaces/azure-resourcemanager-devspaces/SAMPLE.md
new file mode 100644
index 000000000000..044000d58844
--- /dev/null
+++ b/sdk/devspaces/azure-resourcemanager-devspaces/SAMPLE.md
@@ -0,0 +1,244 @@
+# Code snippets and samples
+
+
+## ContainerHostMappings
+
+- [GetContainerHostMapping](#containerhostmappings_getcontainerhostmapping)
+
+## Controllers
+
+- [Create](#controllers_create)
+- [Delete](#controllers_delete)
+- [GetByResourceGroup](#controllers_getbyresourcegroup)
+- [List](#controllers_list)
+- [ListByResourceGroup](#controllers_listbyresourcegroup)
+- [ListConnectionDetails](#controllers_listconnectiondetails)
+- [Update](#controllers_update)
+### ContainerHostMappings_GetContainerHostMapping
+
+```java
+import com.azure.resourcemanager.devspaces.fluent.models.ContainerHostMappingInner;
+
+/** Samples for ContainerHostMappings GetContainerHostMapping. */
+public final class ContainerHostMappingsGetContainerHostMappingSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ContainerHostMappingsGetContainerHostMapping_example.json
+ */
+ /**
+ * Sample code: ContainerHostMappingsGetContainerHostMapping.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void containerHostMappingsGetContainerHostMapping(
+ com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ manager
+ .containerHostMappings()
+ .getContainerHostMappingWithResponse(
+ "myResourceGroup",
+ "eastus",
+ new ContainerHostMappingInner()
+ .withContainerHostResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Controllers_Create
+
+```java
+import com.azure.resourcemanager.devspaces.models.Sku;
+import com.azure.resourcemanager.devspaces.models.SkuName;
+import com.azure.resourcemanager.devspaces.models.SkuTier;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Controllers Create. */
+public final class ControllersCreateSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersCreate_example.json
+ */
+ /**
+ * Sample code: ControllersCreate.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void controllersCreate(com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ manager
+ .controllers()
+ .define("myControllerResource")
+ .withRegion("eastus")
+ .withExistingResourceGroup("myResourceGroup")
+ .withSku(new Sku().withName(SkuName.S1).withTier(SkuTier.STANDARD))
+ .withTargetContainerHostResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster")
+ .withTargetContainerHostCredentialsBase64("QmFzZTY0IEVuY29kZWQgVmFsdWUK")
+ .withTags(mapOf())
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Controllers_Delete
+
+```java
+/** Samples for Controllers Delete. */
+public final class ControllersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersDelete_example.json
+ */
+ /**
+ * Sample code: ControllersDelete.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void controllersDelete(com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ manager.controllers().delete("myResourceGroup", "myControllerResource", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Controllers_GetByResourceGroup
+
+```java
+/** Samples for Controllers GetByResourceGroup. */
+public final class ControllersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersGet_example.json
+ */
+ /**
+ * Sample code: ControllersGet.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void controllersGet(com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ manager
+ .controllers()
+ .getByResourceGroupWithResponse(
+ "myResourceGroup", "myControllerResource", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Controllers_List
+
+```java
+/** Samples for Controllers List. */
+public final class ControllersListSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersList_example.json
+ */
+ /**
+ * Sample code: ControllersList.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void controllersList(com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ manager.controllers().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Controllers_ListByResourceGroup
+
+```java
+/** Samples for Controllers ListByResourceGroup. */
+public final class ControllersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersListByResourceGroup_example.json
+ */
+ /**
+ * Sample code: ControllersListByResourceGroup.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void controllersListByResourceGroup(com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ manager.controllers().listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Controllers_ListConnectionDetails
+
+```java
+import com.azure.resourcemanager.devspaces.models.ListConnectionDetailsParameters;
+
+/** Samples for Controllers ListConnectionDetails. */
+public final class ControllersListConnectionDetailsSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersListConnectionDetails_example.json
+ */
+ /**
+ * Sample code: ControllersListConnectionDetails.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void controllersListConnectionDetails(com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ manager
+ .controllers()
+ .listConnectionDetailsWithResponse(
+ "myResourceGroup",
+ "myControllerResource",
+ new ListConnectionDetailsParameters()
+ .withTargetContainerHostResourceId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myCluster"),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Controllers_Update
+
+```java
+import com.azure.resourcemanager.devspaces.models.Controller;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Controllers Update. */
+public final class ControllersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/devspaces/resource-manager/Microsoft.DevSpaces/stable/2019-04-01/examples/ControllersUpdate_example.json
+ */
+ /**
+ * Sample code: ControllersUpdate.
+ *
+ * @param manager Entry point to DevSpacesManager.
+ */
+ public static void controllersUpdate(com.azure.resourcemanager.devspaces.DevSpacesManager manager) {
+ Controller resource =
+ manager
+ .controllers()
+ .getByResourceGroupWithResponse(
+ "myResourceGroup", "myControllerResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("key", "value"))
+ .withTargetContainerHostCredentialsBase64("QmFzZTY0IEVuY29kZWQgVmFsdWUK")
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml b/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml
index 2f0ba1980998..5650959cf1f8 100644
--- a/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml
+++ b/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-devspaces
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-devspaces
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for DevSpaces Management
- This package contains Microsoft Azure SDK for DevSpaces Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Dev Spaces Client. Package tag package-2019-04-01.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for DevSpaces Management
+ This package contains Microsoft Azure SDK for DevSpaces Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Dev Spaces Client. Package tag package-2019-04-01.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.35.0
-
-
- com.azure
- azure-core-management
- 1.10.0
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.35.0
+
+
+ com.azure
+ azure-core-management
+ 1.10.0
+
+
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
index f7732865f03e..0ba9d2822bfc 100644
--- 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
@@ -8,15 +8,18 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
+import com.azure.core.http.policy.AddHeadersFromContextPolicy;
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.RetryOptions;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -33,6 +36,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to DevSpacesManager. Dev Spaces Client. */
public final class DevSpacesManager {
@@ -69,6 +73,19 @@ public static DevSpacesManager authenticate(TokenCredential credential, AzurePro
return configure().authenticate(credential, profile);
}
+ /**
+ * Creates an instance of DevSpaces service API entry point.
+ *
+ * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
+ * @param profile the Azure profile for client.
+ * @return the DevSpaces service API instance.
+ */
+ public static DevSpacesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return new DevSpacesManager(httpPipeline, profile, null);
+ }
+
/**
* Gets a Configurable instance that can be used to create DevSpacesManager with optional configuration.
*
@@ -80,12 +97,14 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
private Duration defaultPollInterval;
private Configurable() {
@@ -124,6 +143,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -135,6 +165,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
return this;
}
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ *
This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
/**
* Sets the default poll interval, used when service does not provide "Retry-After" header.
*
@@ -142,9 +185,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -180,20 +225,38 @@ public DevSpacesManager authenticate(TokenCredential credential, AzureProfile pr
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
- retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -205,7 +268,11 @@ public DevSpacesManager authenticate(TokenCredential credential, AzureProfile pr
}
}
- /** @return Resource collection API of ContainerHostMappings. */
+ /**
+ * Gets the resource collection API of ContainerHostMappings.
+ *
+ * @return Resource collection API of ContainerHostMappings.
+ */
public ContainerHostMappings containerHostMappings() {
if (this.containerHostMappings == null) {
this.containerHostMappings = new ContainerHostMappingsImpl(clientObject.getContainerHostMappings(), this);
@@ -213,7 +280,11 @@ public ContainerHostMappings containerHostMappings() {
return containerHostMappings;
}
- /** @return Resource collection API of Operations. */
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
public Operations operations() {
if (this.operations == null) {
this.operations = new OperationsImpl(clientObject.getOperations(), this);
@@ -221,7 +292,11 @@ public Operations operations() {
return operations;
}
- /** @return Resource collection API of Controllers. */
+ /**
+ * Gets the resource collection API of Controllers. It manages Controller.
+ *
+ * @return Resource collection API of Controllers.
+ */
public Controllers controllers() {
if (this.controllers == null) {
this.controllers = new ControllersImpl(clientObject.getControllers(), this);
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
index 16f4d82fce85..aa7a6edf425d 100644
--- 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
@@ -19,15 +19,16 @@ public interface ContainerHostMappingsClient {
* @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.
+ * resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ContainerHostMappingInner getContainerHostMapping(
- String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping);
+ Response getContainerHostMappingWithResponse(
+ String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context);
/**
* Returns container host mapping object for a container host resource ID if an associated controller exists.
@@ -36,7 +37,6 @@ ContainerHostMappingInner getContainerHostMapping(
* @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.
@@ -44,6 +44,6 @@ ContainerHostMappingInner getContainerHostMapping(
* resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response getContainerHostMappingWithResponse(
- String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context);
+ ContainerHostMappingInner getContainerHostMapping(
+ String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping);
}
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
index 588ed46cf84c..1f880c635462 100644
--- 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
@@ -19,34 +19,40 @@
/** 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.
+ * Gets an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the properties for an Azure Dev Spaces Controller along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ControllerInner getByResourceGroup(String resourceGroupName, String name);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);
/**
- * Gets the properties for an Azure Dev Spaces Controller.
+ * Gets an Azure Dev Spaces Controller.
+ *
+ *
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);
+ ControllerInner getByResourceGroup(String resourceGroupName, String name);
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -54,14 +60,16 @@ public interface ControllersClient {
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ControllerInner> beginCreate(
String resourceGroupName, String name, ControllerInner controller);
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -70,14 +78,16 @@ SyncPoller, ControllerInner> beginCreate(
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ControllerInner> beginCreate(
String resourceGroupName, String name, ControllerInner controller, Context context);
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -91,7 +101,9 @@ SyncPoller, ControllerInner> beginCreate(
ControllerInner create(String resourceGroupName, String name, ControllerInner controller);
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -106,20 +118,24 @@ SyncPoller, ControllerInner> beginCreate(
ControllerInner create(String resourceGroupName, String name, ControllerInner controller, Context context);
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String name);
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -127,13 +143,15 @@ SyncPoller, ControllerInner> beginCreate(
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context);
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -145,7 +163,9 @@ SyncPoller, ControllerInner> beginCreate(
void delete(String resourceGroupName, String name);
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -158,51 +178,59 @@ SyncPoller, ControllerInner> beginCreate(
void delete(String resourceGroupName, String name, Context context);
/**
- * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
+ * Updates an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ControllerInner update(
- String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters);
+ Response updateWithResponse(
+ String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters, Context context);
/**
- * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
+ * Updates an Azure Dev Spaces Controller.
+ *
+ *
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);
+ ControllerInner update(
+ String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters);
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
@@ -210,64 +238,72 @@ Response updateWithResponse(
* @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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
/**
- * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
+ * Lists connection details for an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- ControllerConnectionDetailsListInner listConnectionDetails(
- String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters);
+ Response listConnectionDetailsWithResponse(
+ String resourceGroupName,
+ String name,
+ ListConnectionDetailsParameters listConnectionDetailsParameters,
+ Context context);
/**
- * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
+ * Lists connection details for an Azure Dev Spaces Controller.
+ *
+ *
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);
+ ControllerConnectionDetailsListInner listConnectionDetails(
+ String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters);
}
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
index e2e7057d0e84..5d98f09fb5b6 100644
--- 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
@@ -13,23 +13,27 @@
/** 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.
+ * Lists operations for the resource provider.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
/**
- * Lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description.
+ * Lists operations for the resource provider.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@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
index dc566c38b9c2..226aad783b89 100644
--- 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
@@ -5,15 +5,11 @@
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
*/
@@ -26,6 +22,10 @@ public final class ContainerHostMappingInner {
@JsonProperty(value = "mappedControllerResourceId", access = JsonProperty.Access.WRITE_ONLY)
private String mappedControllerResourceId;
+ /** Creates an instance of ContainerHostMappingInner class. */
+ public ContainerHostMappingInner() {
+ }
+
/**
* Get the containerHostResourceId property: ARM ID of the Container Host resource.
*
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
index 48eec1048c48..3f4ebb52a1c2 100644
--- 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
@@ -5,23 +5,23 @@
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;
+ /** Creates an instance of ControllerConnectionDetailsListInner class. */
+ public ControllerConnectionDetailsListInner() {
+ }
+
/**
* Get the connectionDetailsList property: List of Azure Dev Spaces Controller connection details.
*
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
index 22aa3bb59b4d..21ad7a64e15d 100644
--- 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
@@ -5,20 +5,21 @@
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);
+public final class ControllerInner extends Resource {
+ /*
+ * The properties property.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private ControllerProperties innerProperties = new ControllerProperties();
/*
* Model representing SKU for Azure Dev Spaces Controller.
@@ -26,42 +27,18 @@ public class ControllerInner extends Resource {
@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;
+ /** Creates an instance of ControllerInner class. */
+ public ControllerInner() {
+ }
- /*
- * Credentials of the target container host (base64).
+ /**
+ * Get the innerProperties property: The properties property.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.targetContainerHostCredentialsBase64", required = true)
- private String targetContainerHostCredentialsBase64;
+ private ControllerProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the sku property: Model representing SKU for Azure Dev Spaces Controller.
@@ -83,13 +60,27 @@ public ControllerInner withSku(Sku sku) {
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;
+ }
+
/**
* Get the provisioningState property: Provisioning state of the Azure Dev Spaces Controller.
*
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -98,7 +89,7 @@ public ProvisioningState provisioningState() {
* @return the hostSuffix value.
*/
public String hostSuffix() {
- return this.hostSuffix;
+ return this.innerProperties() == null ? null : this.innerProperties().hostSuffix();
}
/**
@@ -107,7 +98,7 @@ public String hostSuffix() {
* @return the dataPlaneFqdn value.
*/
public String dataPlaneFqdn() {
- return this.dataPlaneFqdn;
+ return this.innerProperties() == null ? null : this.innerProperties().dataPlaneFqdn();
}
/**
@@ -116,7 +107,7 @@ public String dataPlaneFqdn() {
* @return the targetContainerHostApiServerFqdn value.
*/
public String targetContainerHostApiServerFqdn() {
- return this.targetContainerHostApiServerFqdn;
+ return this.innerProperties() == null ? null : this.innerProperties().targetContainerHostApiServerFqdn();
}
/**
@@ -125,7 +116,7 @@ public String targetContainerHostApiServerFqdn() {
* @return the targetContainerHostResourceId value.
*/
public String targetContainerHostResourceId() {
- return this.targetContainerHostResourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().targetContainerHostResourceId();
}
/**
@@ -135,7 +126,10 @@ public String targetContainerHostResourceId() {
* @return the ControllerInner object itself.
*/
public ControllerInner withTargetContainerHostResourceId(String targetContainerHostResourceId) {
- this.targetContainerHostResourceId = targetContainerHostResourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ControllerProperties();
+ }
+ this.innerProperties().withTargetContainerHostResourceId(targetContainerHostResourceId);
return this;
}
@@ -145,7 +139,7 @@ public ControllerInner withTargetContainerHostResourceId(String targetContainerH
* @return the targetContainerHostCredentialsBase64 value.
*/
public String targetContainerHostCredentialsBase64() {
- return this.targetContainerHostCredentialsBase64;
+ return this.innerProperties() == null ? null : this.innerProperties().targetContainerHostCredentialsBase64();
}
/**
@@ -155,21 +149,10 @@ public String targetContainerHostCredentialsBase64() {
* @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);
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ControllerProperties();
+ }
+ this.innerProperties().withTargetContainerHostCredentialsBase64(targetContainerHostCredentialsBase64);
return this;
}
@@ -179,24 +162,21 @@ public ControllerInner withTags(Map tags) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property innerProperties in model ControllerInner"));
+ } else {
+ innerProperties().validate();
+ }
if (sku() == null) {
- throw logger
+ 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"));
- }
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ControllerInner.class);
}
diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerProperties.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerProperties.java
new file mode 100644
index 000000000000..c001b4b884e5
--- /dev/null
+++ b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerProperties.java
@@ -0,0 +1,153 @@
+// 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.ProvisioningState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The ControllerProperties model. */
+@Fluent
+public final class ControllerProperties {
+ /*
+ * Provisioning state of the Azure Dev Spaces Controller.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * DNS suffix for public endpoints running in the Azure Dev Spaces Controller.
+ */
+ @JsonProperty(value = "hostSuffix", access = JsonProperty.Access.WRITE_ONLY)
+ private String hostSuffix;
+
+ /*
+ * DNS name for accessing DataPlane services
+ */
+ @JsonProperty(value = "dataPlaneFqdn", access = JsonProperty.Access.WRITE_ONLY)
+ private String dataPlaneFqdn;
+
+ /*
+ * DNS of the target container host's API server
+ */
+ @JsonProperty(value = "targetContainerHostApiServerFqdn", access = JsonProperty.Access.WRITE_ONLY)
+ private String targetContainerHostApiServerFqdn;
+
+ /*
+ * Resource ID of the target container host
+ */
+ @JsonProperty(value = "targetContainerHostResourceId", required = true)
+ private String targetContainerHostResourceId;
+
+ /*
+ * Credentials of the target container host (base64).
+ */
+ @JsonProperty(value = "targetContainerHostCredentialsBase64", required = true)
+ private String targetContainerHostCredentialsBase64;
+
+ /** Creates an instance of ControllerProperties class. */
+ public ControllerProperties() {
+ }
+
+ /**
+ * 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 ControllerProperties object itself.
+ */
+ public ControllerProperties 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 ControllerProperties object itself.
+ */
+ public ControllerProperties withTargetContainerHostCredentialsBase64(String targetContainerHostCredentialsBase64) {
+ this.targetContainerHostCredentialsBase64 = targetContainerHostCredentialsBase64;
+ 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 ControllerProperties"));
+ }
+ if (targetContainerHostCredentialsBase64() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property targetContainerHostCredentialsBase64 in model"
+ + " ControllerProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(ControllerProperties.class);
+}
diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerUpdateParametersProperties.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerUpdateParametersProperties.java
new file mode 100644
index 000000000000..aa6d4b643f90
--- /dev/null
+++ b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ControllerUpdateParametersProperties.java
@@ -0,0 +1,51 @@
+// 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.fasterxml.jackson.annotation.JsonProperty;
+
+/** The ControllerUpdateParametersProperties model. */
+@Fluent
+public final class ControllerUpdateParametersProperties {
+ /*
+ * Credentials of the target container host (base64).
+ */
+ @JsonProperty(value = "targetContainerHostCredentialsBase64")
+ private String targetContainerHostCredentialsBase64;
+
+ /** Creates an instance of ControllerUpdateParametersProperties class. */
+ public ControllerUpdateParametersProperties() {
+ }
+
+ /**
+ * 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 ControllerUpdateParametersProperties object itself.
+ */
+ public ControllerUpdateParametersProperties 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/fluent/models/ResourceProviderOperationDefinitionInner.java b/sdk/devspaces/azure-resourcemanager-devspaces/src/main/java/com/azure/resourcemanager/devspaces/fluent/models/ResourceProviderOperationDefinitionInner.java
index 9cabe8382582..1d604c508b06 100644
--- 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
@@ -5,16 +5,12 @@
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.
*/
@@ -27,6 +23,10 @@ public final class ResourceProviderOperationDefinitionInner {
@JsonProperty(value = "display")
private ResourceProviderOperationDisplay display;
+ /** Creates an instance of ResourceProviderOperationDefinitionInner class. */
+ public ResourceProviderOperationDefinitionInner() {
+ }
+
/**
* Get the name property: Resource provider operation name.
*
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
index cf08eea6fadf..b0b7c94ffefb 100644
--- 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
@@ -22,15 +22,12 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.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;
@@ -55,7 +52,7 @@ public final class ContainerHostMappingsClientImpl implements ContainerHostMappi
*/
@Host("{$host}")
@ServiceInterface(name = "DevSpacesManagementC")
- private interface ContainerHostMappingsService {
+ public interface ContainerHostMappingsService {
@Headers({"Content-Type: application/json"})
@Post(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces/locations"
@@ -84,7 +81,7 @@ Mono> getContainerHostMapping(
* @throws 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.
+ * resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getContainerHostMappingWithResponseAsync(
@@ -143,7 +140,7 @@ private Mono> getContainerHostMappingWithRes
* @throws 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.
+ * resource along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getContainerHostMappingWithResponseAsync(
@@ -198,20 +195,13 @@ private Mono> getContainerHostMappingWithRes
* @throws 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.
+ * resource on successful completion of {@link Mono}.
*/
@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();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
@@ -221,16 +211,18 @@ private Mono getContainerHostMappingAsync(
* @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.
+ * resource along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ContainerHostMappingInner getContainerHostMapping(
- String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping) {
- return getContainerHostMappingAsync(resourceGroupName, location, containerHostMapping).block();
+ public Response getContainerHostMappingWithResponse(
+ String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context) {
+ return getContainerHostMappingWithResponseAsync(resourceGroupName, location, containerHostMapping, context)
+ .block();
}
/**
@@ -240,7 +232,6 @@ public ContainerHostMappingInner getContainerHostMapping(
* @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.
@@ -248,9 +239,9 @@ public ContainerHostMappingInner getContainerHostMapping(
* resource.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getContainerHostMappingWithResponse(
- String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping, Context context) {
- return getContainerHostMappingWithResponseAsync(resourceGroupName, location, containerHostMapping, context)
- .block();
+ public ContainerHostMappingInner getContainerHostMapping(
+ String resourceGroupName, String location, ContainerHostMappingInner containerHostMapping) {
+ return getContainerHostMappingWithResponse(resourceGroupName, location, containerHostMapping, Context.NONE)
+ .getValue();
}
}
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
index 9737902ae5d7..256c094080ff 100644
--- 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
@@ -12,10 +12,9 @@
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 static final ClientLogger LOGGER = new ClientLogger(ContainerHostMappingsImpl.class);
private final ContainerHostMappingsClient innerClient;
@@ -27,17 +26,6 @@ public ContainerHostMappingsImpl(
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 =
@@ -55,6 +43,17 @@ public Response getContainerHostMappingWithResponse(
}
}
+ 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;
+ }
+ }
+
private ContainerHostMappingsClient serviceClient() {
return this.innerClient;
}
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
index d2d67cf3be22..9cac7ad99791 100644
--- 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
@@ -83,6 +83,10 @@ public String regionName() {
return this.location();
}
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
public ControllerInner innerModel() {
return this.innerObject;
}
@@ -175,18 +179,18 @@ public Controller refresh(Context context) {
return this;
}
- public ControllerConnectionDetailsList listConnectionDetails(
- ListConnectionDetailsParameters listConnectionDetailsParameters) {
+ public Response listConnectionDetailsWithResponse(
+ ListConnectionDetailsParameters listConnectionDetailsParameters, Context context) {
return serviceManager
.controllers()
- .listConnectionDetails(resourceGroupName, name, listConnectionDetailsParameters);
+ .listConnectionDetailsWithResponse(resourceGroupName, name, listConnectionDetailsParameters, context);
}
- public Response listConnectionDetailsWithResponse(
- ListConnectionDetailsParameters listConnectionDetailsParameters, Context context) {
+ public ControllerConnectionDetailsList listConnectionDetails(
+ ListConnectionDetailsParameters listConnectionDetailsParameters) {
return serviceManager
.controllers()
- .listConnectionDetailsWithResponse(resourceGroupName, name, listConnectionDetailsParameters, context);
+ .listConnectionDetails(resourceGroupName, name, listConnectionDetailsParameters);
}
public ControllerImpl withRegion(Region location) {
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
index 525aabe21ad6..6792c0e132e8 100644
--- 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
@@ -31,7 +31,6 @@
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;
@@ -46,8 +45,6 @@
/** 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;
@@ -71,7 +68,7 @@ public final class ControllersClientImpl implements ControllersClient {
*/
@Host("{$host}")
@ServiceInterface(name = "DevSpacesManagementC")
- private interface ControllersService {
+ public interface ControllersService {
@Headers({"Content-Type: application/json"})
@Get(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevSpaces"
@@ -197,14 +194,17 @@ Mono> listNext(
}
/**
- * Gets the properties for an Azure Dev Spaces Controller.
+ * Gets an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the properties for an Azure Dev Spaces Controller along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String name) {
@@ -244,7 +244,9 @@ private Mono> getByResourceGroupWithResponseAsync(Stri
}
/**
- * Gets the properties for an Azure Dev Spaces Controller.
+ * Gets an Azure Dev Spaces Controller.
+ *
+ *
Gets the properties for an Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -252,7 +254,8 @@ private Mono> getByResourceGroupWithResponseAsync(Stri
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the properties for an Azure Dev Spaces Controller along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getByResourceGroupWithResponseAsync(
@@ -290,62 +293,63 @@ private Mono> getByResourceGroupWithResponseAsync(
}
/**
- * Gets the properties for an Azure Dev Spaces Controller.
+ * Gets an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the properties for an Azure Dev Spaces Controller on successful completion of {@link Mono}.
*/
@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();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Gets the properties for an Azure Dev Spaces Controller.
+ * Gets an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the properties for an Azure Dev Spaces Controller along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ControllerInner getByResourceGroup(String resourceGroupName, String name) {
- return getByResourceGroupAsync(resourceGroupName, name).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String name, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block();
}
/**
- * Gets the properties for an Azure Dev Spaces Controller.
+ * Gets an Azure Dev Spaces Controller.
+ *
+ *
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();
+ public ControllerInner getByResourceGroup(String resourceGroupName, String name) {
+ return getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE).getValue();
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -353,7 +357,7 @@ public Response getByResourceGroupWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -400,7 +404,9 @@ private Mono>> createWithResponseAsync(
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -409,7 +415,7 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -453,7 +459,9 @@ private Mono>> createWithResponseAsync(
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -461,20 +469,26 @@ private Mono>> createWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
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);
+ mono,
+ this.client.getHttpPipeline(),
+ ControllerInner.class,
+ ControllerInner.class,
+ this.client.getContext());
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -483,9 +497,9 @@ private PollerFlux, ControllerInner> beginCreateAsyn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ControllerInner> beginCreateAsync(
String resourceGroupName, String name, ControllerInner controller, Context context) {
context = this.client.mergeContext(context);
@@ -497,7 +511,9 @@ private PollerFlux, ControllerInner> beginCreateAsyn
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -505,16 +521,18 @@ private PollerFlux, ControllerInner> beginCreateAsyn
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ControllerInner> beginCreate(
String resourceGroupName, String name, ControllerInner controller) {
- return beginCreateAsync(resourceGroupName, name, controller).getSyncPoller();
+ return this.beginCreateAsync(resourceGroupName, name, controller).getSyncPoller();
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -523,16 +541,18 @@ public SyncPoller, ControllerInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, ControllerInner> beginCreate(
String resourceGroupName, String name, ControllerInner controller, Context context) {
- return beginCreateAsync(resourceGroupName, name, controller, context).getSyncPoller();
+ return this.beginCreateAsync(resourceGroupName, name, controller, context).getSyncPoller();
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -540,7 +560,7 @@ public SyncPoller, ControllerInner> beginCreate(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(String resourceGroupName, String name, ControllerInner controller) {
@@ -550,7 +570,9 @@ private Mono createAsync(String resourceGroupName, String name,
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -559,7 +581,7 @@ private Mono createAsync(String resourceGroupName, String name,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -570,7 +592,9 @@ private Mono createAsync(
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -586,7 +610,9 @@ public ControllerInner create(String resourceGroupName, String name, ControllerI
}
/**
- * Creates an Azure Dev Spaces Controller with the specified create parameters.
+ * Creates an Azure Dev Spaces 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.
@@ -603,14 +629,16 @@ public ControllerInner create(String resourceGroupName, String name, ControllerI
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(String resourceGroupName, String name) {
@@ -650,7 +678,9 @@ private Mono>> deleteWithResponseAsync(String resource
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -658,7 +688,7 @@ private Mono>> deleteWithResponseAsync(String 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.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -696,25 +726,30 @@ private Mono>> deleteWithResponseAsync(
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
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);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -722,9 +757,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String name, Context context) {
context = this.client.mergeContext(context);
@@ -735,22 +770,26 @@ private PollerFlux, Void> beginDeleteAsync(
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String name) {
- return beginDeleteAsync(resourceGroupName, name).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, name).getSyncPoller();
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -758,22 +797,24 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context) {
- return beginDeleteAsync(resourceGroupName, name, context).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, name, context).getSyncPoller();
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String name) {
@@ -781,7 +822,9 @@ private Mono deleteAsync(String resourceGroupName, String name) {
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -789,7 +832,7 @@ private Mono deleteAsync(String resourceGroupName, String name) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String name, Context context) {
@@ -797,7 +840,9 @@ private Mono deleteAsync(String resourceGroupName, String name, Context co
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -811,7 +856,9 @@ public void delete(String resourceGroupName, String name) {
}
/**
- * Deletes an existing Azure Dev Spaces Controller.
+ * Deletes an Azure Dev Spaces Controller.
+ *
+ *
Deletes an existing Azure Dev Spaces Controller.
*
* @param resourceGroupName Resource group to which the resource belongs.
* @param name Name of the resource.
@@ -826,7 +873,9 @@ public void delete(String resourceGroupName, String name, Context context) {
}
/**
- * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
+ * Updates an Azure Dev Spaces Controller.
+ *
+ *
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.
@@ -834,7 +883,7 @@ public void delete(String resourceGroupName, String name, Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -884,7 +933,9 @@ private Mono> updateWithResponseAsync(
}
/**
- * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
+ * Updates an Azure Dev Spaces Controller.
+ *
+ *
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.
@@ -893,7 +944,7 @@ private Mono> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -940,7 +991,9 @@ private Mono> updateWithResponseAsync(
}
/**
- * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
+ * Updates an Azure Dev Spaces Controller.
+ *
+ *
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.
@@ -948,66 +1001,65 @@ private Mono> updateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body on successful completion of {@link Mono}.
*/
@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();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
+ * Updates an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ControllerInner update(
- String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters) {
- return updateAsync(resourceGroupName, name, controllerUpdateParameters).block();
+ public Response updateWithResponse(
+ String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters, Context context) {
+ return updateWithResponseAsync(resourceGroupName, name, controllerUpdateParameters, context).block();
}
/**
- * Updates the properties of an existing Azure Dev Spaces Controller with the specified update parameters.
+ * Updates an Azure Dev Spaces Controller.
+ *
+ *
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();
+ public ControllerInner update(
+ String resourceGroupName, String name, ControllerUpdateParameters controllerUpdateParameters) {
+ return updateWithResponse(resourceGroupName, name, controllerUpdateParameters, Context.NONE).getValue();
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -1052,7 +1104,9 @@ private Mono> listByResourceGroupSinglePageAsync(
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
@@ -1060,7 +1114,7 @@ private Mono> listByResourceGroupSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -1103,14 +1157,16 @@ private Mono> listByResourceGroupSinglePageAsync(
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -1120,7 +1176,9 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
@@ -1128,7 +1186,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -1138,14 +1196,16 @@ private PagedFlux listByResourceGroupAsync(String resourceGroup
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -1153,7 +1213,9 @@ public PagedIterable listByResourceGroup(String resourceGroupNa
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the specified resource group and
+ * Lists the Azure Dev Spaces Controllers in a resource group.
+ *
+ *
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.
@@ -1161,7 +1223,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -1169,11 +1231,13 @@ public PagedIterable listByResourceGroup(String resourceGroupNa
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -1213,13 +1277,15 @@ private Mono> listSinglePageAsync() {
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -1256,11 +1322,13 @@ private Mono> listSinglePageAsync(Context context
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -1268,13 +1336,15 @@ private PagedFlux listAsync() {
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -1283,11 +1353,13 @@ private PagedFlux listAsync(Context context) {
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -1295,13 +1367,15 @@ public PagedIterable list() {
}
/**
- * Lists all the Azure Dev Spaces Controllers with their properties in the subscription.
+ * Lists the Azure Dev Spaces Controllers in a subscription.
+ *
+ *
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.
+ * @return the paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -1309,7 +1383,9 @@ public PagedIterable list(Context context) {
}
/**
- * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
+ * Lists connection details for an Azure Dev Spaces Controller.
+ *
+ *
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.
@@ -1317,7 +1393,7 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listConnectionDetailsWithResponseAsync(
@@ -1367,7 +1443,9 @@ private Mono> listConnectionDetai
}
/**
- * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
+ * Lists connection details for an Azure Dev Spaces Controller.
+ *
+ *
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.
@@ -1376,7 +1454,7 @@ private Mono> listConnectionDetai
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listConnectionDetailsWithResponseAsync(
@@ -1426,7 +1504,9 @@ private Mono> listConnectionDetai
}
/**
- * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
+ * Lists connection details for an Azure Dev Spaces Controller.
+ *
+ *
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.
@@ -1434,69 +1514,68 @@ private Mono> listConnectionDetai
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException 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.
+ * @return the response body on successful completion of {@link Mono}.
*/
@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();
- }
- });
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
+ * Lists connection details for an Azure Dev Spaces Controller.
+ *
+ *
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.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public ControllerConnectionDetailsListInner listConnectionDetails(
- String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters) {
- return listConnectionDetailsAsync(resourceGroupName, name, listConnectionDetailsParameters).block();
+ public Response listConnectionDetailsWithResponse(
+ String resourceGroupName,
+ String name,
+ ListConnectionDetailsParameters listConnectionDetailsParameters,
+ Context context) {
+ return listConnectionDetailsWithResponseAsync(resourceGroupName, name, listConnectionDetailsParameters, context)
+ .block();
}
/**
- * Lists connection details for the underlying container resources of an Azure Dev Spaces Controller.
+ * Lists connection details for an Azure Dev Spaces Controller.
+ *
+ *
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();
+ public ControllerConnectionDetailsListInner listConnectionDetails(
+ String resourceGroupName, String name, ListConnectionDetailsParameters listConnectionDetailsParameters) {
+ return listConnectionDetailsWithResponse(resourceGroupName, name, listConnectionDetailsParameters, Context.NONE)
+ .getValue();
}
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ *
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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -1528,12 +1607,13 @@ private Mono> listByResourceGroupNextSinglePageAs
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ *
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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(
@@ -1565,11 +1645,12 @@ private Mono> listByResourceGroupNextSinglePageAs
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ *
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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -1600,12 +1681,13 @@ private Mono> listNextSinglePageAsync(String next
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ *
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.
+ * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/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
index 4d400adbca6f..ce5043d3bf52 100644
--- 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
@@ -16,10 +16,9 @@
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 static final ClientLogger LOGGER = new ClientLogger(ControllersImpl.class);
private final ControllersClient innerClient;
@@ -31,15 +30,6 @@ public ControllersImpl(
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);
@@ -54,6 +44,15 @@ public Response getByResourceGroupWithResponse(String resourceGroupN
}
}
+ 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 void deleteByResourceGroup(String resourceGroupName, String name) {
this.serviceClient().delete(resourceGroupName, name);
}
@@ -82,17 +81,6 @@ public PagedIterable list(Context 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,
@@ -113,10 +101,21 @@ public Response listConnectionDetailsWithRespon
}
}
+ 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 Controller getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -124,7 +123,7 @@ public Controller getById(String id) {
}
String name = Utils.getValueFromIdByName(id, "controllers");
if (name == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id)));
@@ -135,7 +134,7 @@ public Controller getById(String id) {
public Response getByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -143,7 +142,7 @@ public Response getByIdWithResponse(String id, Context context) {
}
String name = Utils.getValueFromIdByName(id, "controllers");
if (name == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id)));
@@ -154,7 +153,7 @@ public Response getByIdWithResponse(String id, Context context) {
public void deleteById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -162,7 +161,7 @@ public void deleteById(String id) {
}
String name = Utils.getValueFromIdByName(id, "controllers");
if (name == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id)));
@@ -173,7 +172,7 @@ public void deleteById(String id) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String
@@ -181,7 +180,7 @@ public void deleteByIdWithResponse(String id, Context context) {
}
String name = Utils.getValueFromIdByName(id, "controllers");
if (name == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'controllers'.", id)));
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
index 672f07eaf978..c5300d0f70f6 100644
--- 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
@@ -7,7 +7,6 @@
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;
@@ -67,34 +66,34 @@ public DevSpacesManagementClientBuilder environment(AzureEnvironment environment
}
/*
- * The default poll interval for long-running operation
+ * The HTTP pipeline to send requests through
*/
- private Duration defaultPollInterval;
+ private HttpPipeline pipeline;
/**
- * Sets The default poll interval for long-running operation.
+ * Sets The HTTP pipeline to send requests through.
*
- * @param defaultPollInterval the defaultPollInterval value.
+ * @param pipeline the pipeline value.
* @return the DevSpacesManagementClientBuilder.
*/
- public DevSpacesManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = defaultPollInterval;
+ public DevSpacesManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
return this;
}
/*
- * The HTTP pipeline to send requests through
+ * The default poll interval for long-running operation
*/
- private HttpPipeline pipeline;
+ private Duration defaultPollInterval;
/**
- * Sets The HTTP pipeline to send requests through.
+ * Sets The default poll interval for long-running operation.
*
- * @param pipeline the pipeline value.
+ * @param defaultPollInterval the defaultPollInterval value.
* @return the DevSpacesManagementClientBuilder.
*/
- public DevSpacesManagementClientBuilder pipeline(HttpPipeline pipeline) {
- this.pipeline = pipeline;
+ public DevSpacesManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -120,27 +119,26 @@ public DevSpacesManagementClientBuilder serializerAdapter(SerializerAdapter seri
* @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();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
DevSpacesManagementClientImpl client =
new DevSpacesManagementClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
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
index 8828a3d05aa4..c5e36a1b965f 100644
--- 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
@@ -15,6 +15,7 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
@@ -31,15 +32,12 @@
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;
@@ -192,10 +190,7 @@ public Context getContext() {
* @return the merged context.
*/
public Context mergeContext(Context context) {
- for (Map.Entry