diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/CHANGELOG.md b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/CHANGELOG.md index b47ce56cbc67..e4ecc7877a65 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/CHANGELOG.md +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/CHANGELOG.md @@ -1,14 +1,96 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.2.0-beta.1 (2026-01-09) -### Features Added +- Azure Resource Manager Resource Connector client library for Java. This package contains Microsoft Azure SDK for Resource Connector Management SDK. The appliances Rest API spec. Package api-version 2025-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.ApplianceListResult` was removed + +#### `models.ApplianceOperationsList` was removed + +#### `models.ArtifactProfile` was modified + +* `ArtifactProfile()` was changed to private access +* `validate()` was removed + +#### `models.PatchableAppliance` was modified + +* `validate()` was removed + +#### `models.SupportedVersion` was modified + +* `SupportedVersion()` was changed to private access +* `validate()` was removed + +#### `models.UpgradeGraphProperties` was modified + +* `UpgradeGraphProperties()` was changed to private access +* `validate()` was removed + +#### `models.SupportedVersionCatalogVersionData` was modified + +* `SupportedVersionCatalogVersionData()` was changed to private access +* `validate()` was removed + +#### `models.SshKey` was modified + +* `SshKey()` was changed to private access +* `validate()` was removed + +#### `ResourceConnectorManager` was modified + +* `fluent.ResourceConnector serviceClient()` -> `fluent.ResourceConnectorManagementClient serviceClient()` + +#### `models.HybridConnectionConfig` was modified + +* `HybridConnectionConfig()` was changed to private access +* `validate()` was removed + +#### `models.ApplianceCredentialKubeconfig` was modified + +* `ApplianceCredentialKubeconfig()` was changed to private access +* `validate()` was removed + +#### `models.AppliancePropertiesInfrastructureConfig` was modified + +* `validate()` was removed + +#### `models.SupportedVersionCatalogVersion` was modified + +* `SupportedVersionCatalogVersion()` was changed to private access +* `validate()` was removed + +#### `models.SupportedVersionMetadata` was modified + +* `SupportedVersionMetadata()` was changed to private access +* `validate()` was removed + +#### `models.Identity` was modified + +* `validate()` was removed + +### Features Added + +* `models.ProxyConfiguration` was added + +* `models.NetworkProfile` was added + +* `models.Event` was added + +* `models.GatewayConfiguration` was added + +* `models.DnsConfiguration` was added + +#### `models.Appliance` was modified + +* `events()` was added +* `networkProfile()` was added + +#### `models.Appliance$Definition` was modified -### Other Changes +* `withNetworkProfile(models.NetworkProfile)` was added ## 1.1.0 (2024-12-11) diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/README.md b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/README.md index acfd7dd8f35c..afa059ef871a 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/README.md +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Resource Connector client library for Java. -This package contains Microsoft Azure SDK for Resource Connector Management SDK. The appliances Rest API spec. Package tag package-2022-10-27. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Resource Connector Management SDK. The appliances Rest API spec. Package api-version 2025-03-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ResourceConnectorManager manager = ResourceConnectorManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [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/resourceconnector/azure-resourcemanager-resourceconnector/SAMPLE.md b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/SAMPLE.md index f6ca60d7f6b6..6816fe924bf1 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/SAMPLE.md +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/SAMPLE.md @@ -19,16 +19,16 @@ ```java import com.azure.resourcemanager.resourceconnector.models.AppliancePropertiesInfrastructureConfig; import com.azure.resourcemanager.resourceconnector.models.Distro; +import com.azure.resourcemanager.resourceconnector.models.NetworkProfile; import com.azure.resourcemanager.resourceconnector.models.Provider; +import com.azure.resourcemanager.resourceconnector.models.ProxyConfiguration; /** * Samples for Appliances CreateOrUpdate. */ public final class AppliancesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesCreate_Update.json + * x-ms-original-file: 2025-03-01-preview/AppliancesCreate_Update.json */ /** * Sample code: Create/Update Appliance. @@ -45,6 +45,28 @@ public final class AppliancesCreateOrUpdateSamples { .withInfrastructureConfig(new AppliancePropertiesInfrastructureConfig().withProvider(Provider.VMWARE)) .create(); } + + /* + * x-ms-original-file: 2025-03-01-preview/AppliancesUpdateProxy.json + */ + /** + * Sample code: Update Appliance Proxy Configuration. + * + * @param manager Entry point to ResourceConnectorManager. + */ + public static void updateApplianceProxyConfiguration( + com.azure.resourcemanager.resourceconnector.ResourceConnectorManager manager) { + manager.appliances() + .define("appliance01") + .withRegion("West US") + .withExistingResourceGroup("testresourcegroup") + .withDistro(Distro.AKSEDGE) + .withInfrastructureConfig(new AppliancePropertiesInfrastructureConfig().withProvider(Provider.VMWARE)) + .withPublicKey("xxxxxxxx") + .withNetworkProfile( + new NetworkProfile().withProxyConfiguration(new ProxyConfiguration().withVersion("latest"))) + .create(); + } } ``` @@ -56,9 +78,7 @@ public final class AppliancesCreateOrUpdateSamples { */ public final class AppliancesDeleteSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesDelete.json + * x-ms-original-file: 2025-03-01-preview/AppliancesDelete.json */ /** * Sample code: Delete Appliance. @@ -79,9 +99,7 @@ public final class AppliancesDeleteSamples { */ public final class AppliancesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesGet.json + * x-ms-original-file: 2025-03-01-preview/AppliancesGet.json */ /** * Sample code: Get Appliance. @@ -103,9 +121,7 @@ public final class AppliancesGetByResourceGroupSamples { */ public final class AppliancesGetTelemetryConfigSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * TelemetryConfig.json + * x-ms-original-file: 2025-03-01-preview/TelemetryConfig.json */ /** * Sample code: GetTelemetryConfig Appliance. @@ -127,9 +143,7 @@ public final class AppliancesGetTelemetryConfigSamples { */ public final class AppliancesGetUpgradeGraphSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * UpgradeGraph.json + * x-ms-original-file: 2025-03-01-preview/UpgradeGraph.json */ /** * Sample code: Get Appliance Upgrade Graph. @@ -153,9 +167,7 @@ public final class AppliancesGetUpgradeGraphSamples { */ public final class AppliancesListSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListBySubscription.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListBySubscription.json */ /** * Sample code: List Appliances by subscription. @@ -177,9 +189,7 @@ public final class AppliancesListSamples { */ public final class AppliancesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListByResourceGroup.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListByResourceGroup.json */ /** * Sample code: List Appliances by resource group. @@ -201,9 +211,7 @@ public final class AppliancesListByResourceGroupSamples { */ public final class AppliancesListClusterUserCredentialSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListClusterUserCredential.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListClusterUserCredential.json */ /** * Sample code: ListClusterUserCredentialAppliance. @@ -227,9 +235,7 @@ public final class AppliancesListClusterUserCredentialSamples { */ public final class AppliancesListKeysSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListKeys.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListKeys.json */ /** * Sample code: ListKeys Appliance. @@ -251,9 +257,7 @@ public final class AppliancesListKeysSamples { */ public final class AppliancesListOperationsSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListOperations.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListOperations.json */ /** * Sample code: List Appliances operations. @@ -279,9 +283,7 @@ import java.util.Map; */ public final class AppliancesUpdateSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesPatch.json + * x-ms-original-file: 2025-03-01-preview/AppliancesPatch.json */ /** * Sample code: Update Appliance. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/pom.xml b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/pom.xml index 013266eab449..ce27cac3b16f 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/pom.xml +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for Resource Connector Management - This package contains Microsoft Azure SDK for Resource Connector Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The appliances Rest API spec. Package tag package-2022-10-27. + This package contains Microsoft Azure SDK for Resource Connector Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The appliances Rest API spec. Package api-version 2025-03-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/ResourceConnectorManager.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/ResourceConnectorManager.java index f6f9a384905c..4fcb1409d942 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/ResourceConnectorManager.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/ResourceConnectorManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector; @@ -22,15 +22,17 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.resourceconnector.fluent.ResourceConnector; +import com.azure.resourcemanager.resourceconnector.fluent.ResourceConnectorManagementClient; import com.azure.resourcemanager.resourceconnector.implementation.AppliancesImpl; -import com.azure.resourcemanager.resourceconnector.implementation.ResourceConnectorBuilder; +import com.azure.resourcemanager.resourceconnector.implementation.ResourceConnectorManagementClientBuilder; import com.azure.resourcemanager.resourceconnector.models.Appliances; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -41,12 +43,12 @@ public final class ResourceConnectorManager { private Appliances appliances; - private final ResourceConnector clientObject; + private final ResourceConnectorManagementClient clientObject; private ResourceConnectorManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new ResourceConnectorBuilder().pipeline(httpPipeline) + this.clientObject = new ResourceConnectorManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -93,6 +95,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-resourceconnector.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -200,12 +205,14 @@ public ResourceConnectorManager authenticate(TokenCredential credential, AzurePr Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.resourceconnector") .append("/") - .append("1.1.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -264,12 +271,12 @@ public Appliances appliances() { } /** - * Gets wrapped service client ResourceConnector providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets wrapped service client ResourceConnectorManagementClient providing direct access to the underlying + * auto-generated API implementation, based on Azure REST API. * - * @return Wrapped service client ResourceConnector. + * @return Wrapped service client ResourceConnectorManagementClient. */ - public ResourceConnector serviceClient() { + public ResourceConnectorManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/AppliancesClient.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/AppliancesClient.java index 8b49314d7937..f79d4c5cffc1 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/AppliancesClient.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/AppliancesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent; @@ -23,109 +23,6 @@ * An instance of this class provides access to all the operations defined in AppliancesClient. */ public interface AppliancesClient { - /** - * Lists all available Appliances operations. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOperations(); - - /** - * Lists all available Appliances operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOperations(Context context); - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Gets the telemetry config. - * - * @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 telemetry config along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getTelemetryConfigWithResponse(Context context); - - /** - * Gets the telemetry config. - * - * @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 telemetry config. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplianceGetTelemetryConfigResultInner getTelemetryConfig(); - - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Gets an Appliance. * @@ -137,7 +34,9 @@ public interface AppliancesClient { * @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 details of an Appliance with a specified resource group and name along with {@link Response}. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, @@ -153,7 +52,9 @@ Response getByResourceGroupWithResponse(String resourceGroupName * @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 details of an Appliance with a specified resource group and name. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name. */ @ServiceMethod(returns = ReturnType.SINGLE) ApplianceInner getByResourceGroup(String resourceGroupName, String resourceName); @@ -227,6 +128,40 @@ SyncPoller, ApplianceInner> beginCreateOrUpdate(Strin ApplianceInner createOrUpdate(String resourceGroupName, String resourceName, ApplianceInner parameters, Context context); + /** + * Updates an Appliance. + * + * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. + * @param parameters The updatable fields of an existing Appliance. + * @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 appliances definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String resourceName, + PatchableAppliance parameters, Context context); + + /** + * Updates an Appliance. + * + * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. + * @param parameters The updatable fields of an existing Appliance. + * @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 appliances definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplianceInner update(String resourceGroupName, String resourceName, PatchableAppliance parameters); + /** * Deletes an Appliance. * @@ -288,38 +223,71 @@ ApplianceInner createOrUpdate(String resourceGroupName, String resourceName, App void delete(String resourceGroupName, String resourceName, Context context); /** - * Updates an Appliance. + * Gets a list of Appliances in the specified subscription and resource group. * - * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param parameters The updatable fields of an existing Appliance. - * @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 appliances definition along with {@link Response}. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String resourceName, - PatchableAppliance parameters, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Updates an Appliance. + * Gets a list of Appliances in the specified subscription and resource group. * - * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param parameters The updatable fields of an existing Appliance. + * @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 appliances definition. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplianceInner update(String resourceGroupName, String resourceName, PatchableAppliance parameters); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Gets a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Gets a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); /** * Returns the cluster user credential. @@ -365,7 +333,9 @@ Response listClusterUserCredentialWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance along with {@link Response}. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listKeysWithResponse(String resourceGroupName, String resourceName, @@ -381,7 +351,9 @@ Response listKeysWithResponse(String resourceGrou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) ApplianceListKeysResultsInner listKeys(String resourceGroupName, String resourceName); @@ -398,8 +370,10 @@ Response listKeysWithResponse(String resourceGrou * @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 upgrade graph of an Appliance with a specified resource group and name and specific release train - * along with {@link Response}. + * @return an Appliance upgrade graph. + * + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getUpgradeGraphWithResponse(String resourceGroupName, String resourceName, @@ -416,8 +390,54 @@ Response getUpgradeGraphWithResponse(String resourceGroupName * @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 upgrade graph of an Appliance with a specified resource group and name and specific release train. + * @return an Appliance upgrade graph. + * + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. */ @ServiceMethod(returns = ReturnType.SINGLE) UpgradeGraphInner getUpgradeGraph(String resourceGroupName, String resourceName, String upgradeGraph); + + /** + * Lists all available Appliances operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(); + + /** + * Lists all available Appliances operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(Context context); + + /** + * Gets the telemetry config. + * + * @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 telemetry config along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getTelemetryConfigWithResponse(Context context); + + /** + * Gets the telemetry config. + * + * @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 telemetry config. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApplianceGetTelemetryConfigResultInner getTelemetryConfig(); } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/ResourceConnector.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/ResourceConnectorManagementClient.java similarity index 76% rename from sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/ResourceConnector.java rename to sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/ResourceConnectorManagementClient.java index 4ccac536a660..1398f3b9d6dc 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/ResourceConnector.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/ResourceConnectorManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for ResourceConnector class. + * The interface for ResourceConnectorManagementClient class. */ -public interface ResourceConnector { +public interface ResourceConnectorManagementClient { /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceGetTelemetryConfigResultInner.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceGetTelemetryConfigResultInner.java index e1dfbc4ff78e..1df6b77c001a 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceGetTelemetryConfigResultInner.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceGetTelemetryConfigResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent.models; @@ -25,7 +25,7 @@ public final class ApplianceGetTelemetryConfigResultInner /** * Creates an instance of ApplianceGetTelemetryConfigResultInner class. */ - public ApplianceGetTelemetryConfigResultInner() { + private ApplianceGetTelemetryConfigResultInner() { } /** @@ -37,14 +37,6 @@ public String telemetryInstrumentationKey() { return this.telemetryInstrumentationKey; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceInner.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceInner.java index befe75185a4f..4c6ae2775788 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceInner.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent.models; @@ -12,9 +12,12 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.resourceconnector.models.AppliancePropertiesInfrastructureConfig; import com.azure.resourcemanager.resourceconnector.models.Distro; +import com.azure.resourcemanager.resourceconnector.models.Event; import com.azure.resourcemanager.resourceconnector.models.Identity; +import com.azure.resourcemanager.resourceconnector.models.NetworkProfile; import com.azure.resourcemanager.resourceconnector.models.Status; import java.io.IOException; +import java.util.List; import java.util.Map; /** @@ -23,14 +26,14 @@ @Fluent public final class ApplianceInner extends Resource { /* - * Identity for the resource. + * The set of properties specific to an Appliance */ - private Identity identity; + private ApplianceProperties innerProperties; /* - * The set of properties specific to an Appliance + * Identity for the resource. */ - private ApplianceProperties innerProperties; + private Identity identity; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -58,6 +61,15 @@ public final class ApplianceInner extends Resource { public ApplianceInner() { } + /** + * Get the innerProperties property: The set of properties specific to an Appliance. + * + * @return the innerProperties value. + */ + private ApplianceProperties innerProperties() { + return this.innerProperties; + } + /** * Get the identity property: Identity for the resource. * @@ -78,15 +90,6 @@ public ApplianceInner withIdentity(Identity identity) { return this; } - /** - * Get the innerProperties property: The set of properties specific to an Appliance. - * - * @return the innerProperties value. - */ - private ApplianceProperties innerProperties() { - return this.innerProperties; - } - /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -224,7 +227,8 @@ public ApplianceInner withPublicKey(String publicKey) { } /** - * Get the status property: Appliance’s health and state of connection to on-prem. + * Get the status property: Appliance’s health and state of connection to on-prem. This list of values is not + * exhaustive. * * @return the status value. */ @@ -256,17 +260,35 @@ public ApplianceInner withVersion(String version) { } /** - * Validates the instance. + * Get the events property: A list of events that occurred on the Appliance to relay information to the user. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the events value. */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); + public List events() { + return this.innerProperties() == null ? null : this.innerProperties().events(); + } + + /** + * Get the networkProfile property: Contains network information about the Appliance. + * + * @return the networkProfile value. + */ + public NetworkProfile networkProfile() { + return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); + } + + /** + * Set the networkProfile property: Contains network information about the Appliance. + * + * @param networkProfile the networkProfile value to set. + * @return the ApplianceInner object itself. + */ + public ApplianceInner withNetworkProfile(NetworkProfile networkProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplianceProperties(); } + this.innerProperties().withNetworkProfile(networkProfile); + return this; } /** @@ -277,8 +299,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("identity", this.identity); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeJsonField("identity", this.identity); return jsonWriter.writeEndObject(); } @@ -309,10 +331,10 @@ public static ApplianceInner fromJson(JsonReader jsonReader) throws IOException } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedApplianceInner.withTags(tags); - } else if ("identity".equals(fieldName)) { - deserializedApplianceInner.identity = Identity.fromJson(reader); } else if ("properties".equals(fieldName)) { deserializedApplianceInner.innerProperties = ApplianceProperties.fromJson(reader); + } else if ("identity".equals(fieldName)) { + deserializedApplianceInner.identity = Identity.fromJson(reader); } else if ("systemData".equals(fieldName)) { deserializedApplianceInner.systemData = SystemData.fromJson(reader); } else { diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListCredentialResultsInner.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListCredentialResultsInner.java index 724e09237b2e..9145a37ca466 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListCredentialResultsInner.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListCredentialResultsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent.models; @@ -33,7 +33,7 @@ public final class ApplianceListCredentialResultsInner /** * Creates an instance of ApplianceListCredentialResultsInner class. */ - public ApplianceListCredentialResultsInner() { + private ApplianceListCredentialResultsInner() { } /** @@ -55,20 +55,6 @@ public List kubeconfigs() { return this.kubeconfigs; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (hybridConnectionConfig() != null) { - hybridConnectionConfig().validate(); - } - if (kubeconfigs() != null) { - kubeconfigs().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListKeysResultsInner.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListKeysResultsInner.java index 6b049a54836a..56917c9db1cf 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListKeysResultsInner.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListKeysResultsInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent.models; @@ -39,7 +39,7 @@ public final class ApplianceListKeysResultsInner implements JsonSerializable sshKeys() { return this.sshKeys; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (artifactProfiles() != null) { - artifactProfiles().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - if (kubeconfigs() != null) { - kubeconfigs().forEach(e -> e.validate()); - } - if (sshKeys() != null) { - sshKeys().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceOperationInner.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceOperationInner.java index 2d07fc341d9b..9063a66c297d 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceOperationInner.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceOperationInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent.models; @@ -39,7 +39,7 @@ public final class ApplianceOperationInner implements JsonSerializable events; + + /* + * Contains network information about the Appliance + */ + private NetworkProfile networkProfile; + /** * Creates an instance of ApplianceProperties class. */ @@ -126,7 +139,8 @@ public ApplianceProperties withPublicKey(String publicKey) { } /** - * Get the status property: Appliance’s health and state of connection to on-prem. + * Get the status property: Appliance’s health and state of connection to on-prem. This list of values is not + * exhaustive. * * @return the status value. */ @@ -155,14 +169,32 @@ public ApplianceProperties withVersion(String version) { } /** - * Validates the instance. + * Get the events property: A list of events that occurred on the Appliance to relay information to the user. + * + * @return the events value. + */ + public List events() { + return this.events; + } + + /** + * Get the networkProfile property: Contains network information about the Appliance. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the networkProfile value. */ - public void validate() { - if (infrastructureConfig() != null) { - infrastructureConfig().validate(); - } + public NetworkProfile networkProfile() { + return this.networkProfile; + } + + /** + * Set the networkProfile property: Contains network information about the Appliance. + * + * @param networkProfile the networkProfile value to set. + * @return the ApplianceProperties object itself. + */ + public ApplianceProperties withNetworkProfile(NetworkProfile networkProfile) { + this.networkProfile = networkProfile; + return this; } /** @@ -175,6 +207,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("infrastructureConfig", this.infrastructureConfig); jsonWriter.writeStringField("publicKey", this.publicKey); jsonWriter.writeStringField("version", this.version); + jsonWriter.writeJsonField("networkProfile", this.networkProfile); return jsonWriter.writeEndObject(); } @@ -206,6 +239,11 @@ public static ApplianceProperties fromJson(JsonReader jsonReader) throws IOExcep deserializedApplianceProperties.status = Status.fromString(reader.getString()); } else if ("version".equals(fieldName)) { deserializedApplianceProperties.version = reader.getString(); + } else if ("events".equals(fieldName)) { + List events = reader.readArray(reader1 -> Event.fromJson(reader1)); + deserializedApplianceProperties.events = events; + } else if ("networkProfile".equals(fieldName)) { + deserializedApplianceProperties.networkProfile = NetworkProfile.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/UpgradeGraphInner.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/UpgradeGraphInner.java index 787060a5c4a7..105ee8a0da1c 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/UpgradeGraphInner.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/UpgradeGraphInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The Upgrade Graph for appliance. */ -@Fluent +@Immutable public final class UpgradeGraphInner implements JsonSerializable { /* * The appliance resource path @@ -35,7 +35,7 @@ public final class UpgradeGraphInner implements JsonSerializable events() { + List inner = this.innerModel().events(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public NetworkProfile networkProfile() { + return this.innerModel().networkProfile(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -240,7 +256,12 @@ public ApplianceImpl withVersion(String version) { return this; } + public ApplianceImpl withNetworkProfile(NetworkProfile networkProfile) { + this.innerModel().withNetworkProfile(networkProfile); + return this; + } + private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListCredentialResultsImpl.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListCredentialResultsImpl.java index 8890d640c204..3a1b453934ae 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListCredentialResultsImpl.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListCredentialResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListKeysResultsImpl.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListKeysResultsImpl.java index 2ab0cd010034..c79fcc4256f1 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListKeysResultsImpl.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListKeysResultsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceOperationImpl.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceOperationImpl.java index 25b60be6b462..1301f03752e9 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceOperationImpl.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceOperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesClientImpl.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesClientImpl.java index dc92424f1e8a..71019bf32ecc 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesClientImpl.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; @@ -29,6 +29,7 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.core.util.polling.PollerFlux; @@ -40,8 +41,8 @@ import com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceListKeysResultsInner; import com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceOperationInner; import com.azure.resourcemanager.resourceconnector.fluent.models.UpgradeGraphInner; -import com.azure.resourcemanager.resourceconnector.models.ApplianceListResult; -import com.azure.resourcemanager.resourceconnector.models.ApplianceOperationsList; +import com.azure.resourcemanager.resourceconnector.implementation.models.ApplianceListResult; +import com.azure.resourcemanager.resourceconnector.implementation.models.ApplianceOperationsList; import com.azure.resourcemanager.resourceconnector.models.PatchableAppliance; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -59,102 +60,148 @@ public final class AppliancesClientImpl implements AppliancesClient { /** * The service client containing this operation class. */ - private final ResourceConnectorImpl client; + private final ResourceConnectorManagementClientImpl client; /** * Initializes an instance of AppliancesClientImpl. * * @param client the instance of the service client containing this operation class. */ - AppliancesClientImpl(ResourceConnectorImpl client) { + AppliancesClientImpl(ResourceConnectorManagementClientImpl client) { this.service = RestProxy.create(AppliancesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ResourceConnectorAppliances to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for ResourceConnectorManagementClientAppliances to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "ResourceConnectorApp") + @Host("{endpoint}") + @ServiceInterface(name = "ResourceConnectorManagementClientAppliances") public interface AppliancesService { @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.ResourceConnector/operations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOperations(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/appliances") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/telemetryconfig") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplianceInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createOrUpdateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplianceInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getTelemetryConfig(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PatchableAppliance parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PatchableAppliance parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") - @ExpectedResponses({ 200, 201 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/appliances") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") ApplianceInner parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") - @ExpectedResponses({ 202, 204 }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/appliances") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + Mono> listClusterUserCredential( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @BodyParam("application/json") PatchableAppliance parameters, @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listClusterUserCredential( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, + Response listClusterUserCredentialSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); @@ -163,7 +210,16 @@ Mono> listClusterUserCredential( @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listkeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys(@HostParam("$host") String endpoint, + Mono> listKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @QueryParam("artifactType") String artifactType, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listkeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listKeysSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @QueryParam("artifactType") String artifactType, @HeaderParam("Accept") String accept, Context context); @@ -172,491 +228,97 @@ Mono> listKeys(@HostParam("$host") Strin @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/upgradeGraphs/{upgradeGraph}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getUpgradeGraph(@HostParam("$host") String endpoint, + Mono> getUpgradeGraph(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @PathParam("upgradeGraph") String upgradeGraph, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/upgradeGraphs/{upgradeGraph}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOperationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Response getUpgradeGraphSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("upgradeGraph") String upgradeGraph, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/providers/Microsoft.ResourceConnector/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); + Mono> listOperations(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/providers/Microsoft.ResourceConnector/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all available Appliances operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOperationsSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext( - context -> service.listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all available Appliances operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOperationsSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all available Appliances operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listOperationsAsync() { - return new PagedFlux<>(() -> listOperationsSinglePageAsync(), - nextLink -> listOperationsNextSinglePageAsync(nextLink)); - } - - /** - * Lists all available Appliances operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listOperationsAsync(Context context) { - return new PagedFlux<>(() -> listOperationsSinglePageAsync(context), - nextLink -> listOperationsNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all available Appliances operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listOperations() { - return new PagedIterable<>(listOperationsAsync()); - } - - /** - * Lists all available Appliances operations. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listOperations(Context context) { - return new PagedIterable<>(listOperationsAsync(context)); - } - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets a list of Appliances in a subscription. - * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Gets the telemetry config. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the telemetry config along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getTelemetryConfigWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getTelemetryConfig(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the telemetry config. - * - * @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 telemetry config along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getTelemetryConfigWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getTelemetryConfig(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets the telemetry config. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the telemetry config on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getTelemetryConfigAsync() { - return getTelemetryConfigWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); - } + Response listOperationsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - /** - * Gets the telemetry config. - * - * @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 telemetry config along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTelemetryConfigWithResponse(Context context) { - return getTelemetryConfigWithResponseAsync(context).block(); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/telemetryconfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getTelemetryConfig( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - /** - * Gets the telemetry config. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the telemetry config. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplianceGetTelemetryConfigResultInner getTelemetryConfig() { - return getTelemetryConfigWithResponse(Context.NONE).getValue(); - } + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/telemetryconfig") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getTelemetryConfigSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listBySubscriptionNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOperationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); - /** - * Gets a list of Appliances in the specified subscription and resource group. - * - * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of - * each Appliance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listOperationsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** @@ -669,27 +331,14 @@ public PagedIterable listByResourceGroup(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Appliance with a specified resource group and name along with {@link Response} on + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name along with {@link Response} on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), @@ -704,48 +353,12 @@ private Mono> getByResourceGroupWithResponseAsync(Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @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 details of an Appliance with a specified resource group and name along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); - } - - /** - * Gets an Appliance. - * - * Gets the details of an Appliance with a specified resource group and name. + * @return an Appliance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances 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 details of an Appliance with a specified resource group and name on successful completion of + * Gets the details of an Appliance with a specified resource group and name on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -765,12 +378,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Appliance with a specified resource group and name along with {@link Response}. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** @@ -783,7 +400,9 @@ public Response getByResourceGroupWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Appliance with a specified resource group and name. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name. */ @ServiceMethod(returns = ReturnType.SINGLE) public ApplianceInner getByResourceGroup(String resourceGroupName, String resourceName) { @@ -806,30 +425,12 @@ public ApplianceInner getByResourceGroup(String resourceGroupName, String resour @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String resourceName, ApplianceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -841,39 +442,19 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param parameters Parameters supplied to create or update an Appliance. - * @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 appliances definition along with {@link Response} on successful completion of {@link Mono}. + * @return appliances definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String resourceName, ApplianceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + ApplianceInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context); + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, + Context.NONE); } /** @@ -884,18 +465,19 @@ private Mono>> createOrUpdateWithResponseAsync(String * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param parameters Parameters supplied to create or update an Appliance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of appliances definition. + * @return appliances definition along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ApplianceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, ApplianceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ApplianceInner.class, ApplianceInner.class, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createOrUpdateWithResponse(String resourceGroupName, String resourceName, + ApplianceInner parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); } /** @@ -906,7 +488,6 @@ private PollerFlux, ApplianceInner> beginCreateOrUpda * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param parameters Parameters supplied to create or update an Appliance. - * @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. @@ -914,12 +495,11 @@ private PollerFlux, ApplianceInner> beginCreateOrUpda */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ApplianceInner> beginCreateOrUpdateAsync(String resourceGroupName, - String resourceName, ApplianceInner parameters, Context context) { - context = this.client.mergeContext(context); + String resourceName, ApplianceInner parameters) { Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters, context); + = createOrUpdateWithResponseAsync(resourceGroupName, resourceName, parameters); return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ApplianceInner.class, ApplianceInner.class, context); + ApplianceInner.class, ApplianceInner.class, this.client.getContext()); } /** @@ -938,7 +518,9 @@ private PollerFlux, ApplianceInner> beginCreateOrUpda @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplianceInner> beginCreateOrUpdate(String resourceGroupName, String resourceName, ApplianceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters).getSyncPoller(); + Response response = createOrUpdateWithResponse(resourceGroupName, resourceName, parameters); + return this.client.getLroResult(response, ApplianceInner.class, + ApplianceInner.class, Context.NONE); } /** @@ -958,7 +540,10 @@ public SyncPoller, ApplianceInner> beginCreateOrUpdat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ApplianceInner> beginCreateOrUpdate(String resourceGroupName, String resourceName, ApplianceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).getSyncPoller(); + Response response + = createOrUpdateWithResponse(resourceGroupName, resourceName, parameters, context); + return this.client.getLroResult(response, ApplianceInner.class, + ApplianceInner.class, context); } /** @@ -988,56 +573,119 @@ private Mono createOrUpdateAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @param parameters Parameters supplied to create or update an Appliance. - * @param context The context to associate with this operation. + * @param parameters Parameters supplied to create or update an Appliance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return appliances definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplianceInner createOrUpdate(String resourceGroupName, String resourceName, ApplianceInner parameters) { + return beginCreateOrUpdate(resourceGroupName, resourceName, parameters).getFinalResult(); + } + + /** + * Creates or updates an Appliance. + * + * Creates or updates an Appliance in the specified Subscription and Resource Group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. + * @param parameters Parameters supplied to create or update an Appliance. + * @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 appliances definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplianceInner createOrUpdate(String resourceGroupName, String resourceName, ApplianceInner parameters, + Context context) { + return beginCreateOrUpdate(resourceGroupName, resourceName, parameters, context).getFinalResult(); + } + + /** + * Updates an Appliance. + * + * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. + * @param parameters The updatable fields of an existing Appliance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return appliances definition along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, + PatchableAppliance parameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Updates an Appliance. + * + * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. + * @param parameters The updatable fields of an existing Appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return appliances definition on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String resourceName, - ApplianceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, resourceName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono updateAsync(String resourceGroupName, String resourceName, + PatchableAppliance parameters) { + return updateWithResponseAsync(resourceGroupName, resourceName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates or updates an Appliance. + * Updates an Appliance. * - * Creates or updates an Appliance in the specified Subscription and Resource Group. + * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @param parameters Parameters supplied to create or update an Appliance. + * @param parameters The updatable fields of an existing Appliance. + * @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 appliances definition. + * @return appliances definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplianceInner createOrUpdate(String resourceGroupName, String resourceName, ApplianceInner parameters) { - return createOrUpdateAsync(resourceGroupName, resourceName, parameters).block(); + public Response updateWithResponse(String resourceGroupName, String resourceName, + PatchableAppliance parameters, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); } /** - * Creates or updates an Appliance. + * Updates an Appliance. * - * Creates or updates an Appliance in the specified Subscription and Resource Group. + * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @param parameters Parameters supplied to create or update an Appliance. - * @param context The context to associate with this operation. + * @param parameters The updatable fields of an existing Appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return appliances definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplianceInner createOrUpdate(String resourceGroupName, String resourceName, ApplianceInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, resourceName, parameters, context).block(); + public ApplianceInner update(String resourceGroupName, String resourceName, PatchableAppliance parameters) { + return updateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); } /** @@ -1054,25 +702,9 @@ public ApplianceInner createOrUpdate(String resourceGroupName, String resourceNa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1083,34 +715,15 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, accept, context); + private Response deleteWithResponse(String resourceGroupName, String resourceName) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, Context.NONE); } /** @@ -1120,16 +733,16 @@ private Mono>> deleteWithResponseAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context); } /** @@ -1139,19 +752,16 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** @@ -1168,7 +778,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) { - return this.beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, resourceName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** @@ -1187,7 +798,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context) { - return this.beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, resourceName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** @@ -1214,16 +826,13 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) { - return beginDeleteAsync(resourceGroupName, resourceName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String resourceName) { + beginDelete(resourceGroupName, resourceName).getFinalResult(); } /** @@ -1233,213 +842,268 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, Co * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName) { - deleteAsync(resourceGroupName, resourceName).block(); + public void delete(String resourceGroupName, String resourceName, Context context) { + beginDelete(resourceGroupName, resourceName, context).getFinalResult(); } /** - * Deletes an Appliance. + * Gets a list of Appliances in the specified subscription and resource group. * - * Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, Context context) { - deleteAsync(resourceGroupName, resourceName, context).block(); + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an Appliance. + * Gets a list of Appliances in the specified subscription and resource group. * - * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param parameters The updatable fields of an existing Appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return appliances definition along with {@link Response} on successful completion of {@link Mono}. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - PatchableAppliance parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Updates an Appliance. + * Gets a list of Appliances in the specified subscription and resource group. * - * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param parameters The updatable fields of an existing Appliance. * @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 appliances definition along with {@link Response} on successful completion of {@link Mono}. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - PatchableAppliance parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, parameters, accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Updates an Appliance. + * Gets a list of Appliances in the specified subscription and resource group. * - * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param parameters The updatable fields of an existing Appliance. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return appliances definition on successful completion of {@link Mono}. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String resourceName, - PatchableAppliance parameters) { - return updateWithResponseAsync(resourceGroupName, resourceName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Updates an Appliance. + * Gets a list of Appliances in the specified subscription and resource group. * - * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * Gets a list of Appliances in the specified subscription and resource group. The operation returns properties of + * each Appliance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param parameters The updatable fields of an existing Appliance. * @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 appliances definition along with {@link Response}. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); + } + + /** + * Gets a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String resourceName, - PatchableAppliance parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + private Mono> listSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates an Appliance. + * Gets a list of Appliances in a subscription. * - * Updates an Appliance with the specified Resource Name in the specified Resource Group and Subscription. + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param parameters The updatable fields of an existing Appliance. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return appliances definition. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Gets a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplianceInner update(String resourceGroupName, String resourceName, PatchableAppliance parameters) { - return updateWithResponse(resourceGroupName, resourceName, parameters, Context.NONE).getValue(); + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns the cluster user credential. + * Gets a list of Appliances in a subscription. * - * Returns the cluster user credentials for the dedicated appliance. + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster User Credential appliance along with {@link Response} on successful completion of - * {@link Mono}. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listClusterUserCredentialWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + private PagedResponse listSinglePage(Context context) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listClusterUserCredential(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink)); + } + + /** + * Gets a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), + nextLink -> listBySubscriptionNextSinglePage(nextLink, context)); } /** @@ -1449,7 +1113,6 @@ public ApplianceInner update(String resourceGroupName, String resourceName, Patc * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @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. @@ -1458,26 +1121,13 @@ public ApplianceInner update(String resourceGroupName, String resourceName, Patc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> - listClusterUserCredentialWithResponseAsync(String resourceGroupName, String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } + listClusterUserCredentialWithResponseAsync(String resourceGroupName, String resourceName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listClusterUserCredential(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return FluxUtil + .withContext( + context -> service.listClusterUserCredential(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1515,7 +1165,9 @@ private Mono listClusterUserCredentialAsync @ServiceMethod(returns = ReturnType.SINGLE) public Response listClusterUserCredentialWithResponse(String resourceGroupName, String resourceName, Context context) { - return listClusterUserCredentialWithResponseAsync(resourceGroupName, resourceName, context).block(); + final String accept = "application/json"; + return service.listClusterUserCredentialSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); } /** @@ -1547,27 +1199,14 @@ public ApplianceListCredentialResultsInner listClusterUserCredential(String reso * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance along with {@link Response} on successful completion of - * {@link Mono}. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync(String resourceGroupName, String resourceName, String artifactType) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1582,49 +1221,12 @@ private Mono> listKeysWithResponseAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. - * @param artifactType This sets the type of artifact being returned, when empty no artifact endpoint is returned. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync(String resourceGroupName, - String resourceName, String artifactType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listKeys(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, resourceName, artifactType, accept, context); - } - - /** - * Gets the management config. - * - * Returns the cluster customer credentials for the dedicated appliance. + * @return the management config. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances 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 List Cluster Keys Results appliance on successful completion of {@link Mono}. + * Returns the cluster customer credentials for the dedicated appliance on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listKeysAsync(String resourceGroupName, String resourceName) { @@ -1645,12 +1247,16 @@ private Mono listKeysAsync(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 List Cluster Keys Results appliance along with {@link Response}. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse(String resourceGroupName, String resourceName, String artifactType, Context context) { - return listKeysWithResponseAsync(resourceGroupName, resourceName, artifactType, context).block(); + final String accept = "application/json"; + return service.listKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, artifactType, accept, context); } /** @@ -1663,7 +1269,9 @@ public Response listKeysWithResponse(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance. */ @ServiceMethod(returns = ReturnType.SINGLE) public ApplianceListKeysResultsInner listKeys(String resourceGroupName, String resourceName) { @@ -1682,30 +1290,14 @@ public ApplianceListKeysResultsInner listKeys(String resourceGroupName, String r * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade graph of an Appliance with a specified resource group and name and specific release train - * along with {@link Response} on successful completion of {@link Mono}. + * @return an Appliance upgrade graph. + * + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train along + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getUpgradeGraphWithResponseAsync(String resourceGroupName, String resourceName, String upgradeGraph) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (upgradeGraph == null) { - return Mono.error(new IllegalArgumentException("Parameter upgradeGraph is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.getUpgradeGraph(this.client.getEndpoint(), this.client.getApiVersion(), @@ -1721,52 +1313,12 @@ private Mono> getUpgradeGraphWithResponseAsync(Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName Appliances name. * @param upgradeGraph Upgrade graph version, ex - stable. - * @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 upgrade graph of an Appliance with a specified resource group and name and specific release train - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getUpgradeGraphWithResponseAsync(String resourceGroupName, - String resourceName, String upgradeGraph, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (upgradeGraph == null) { - return Mono.error(new IllegalArgumentException("Parameter upgradeGraph is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getUpgradeGraph(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, resourceName, upgradeGraph, accept, context); - } - - /** - * Gets an Appliance upgrade graph. + * @return an Appliance upgrade graph. * - * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param upgradeGraph Upgrade graph version, ex - stable. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade graph of an Appliance with a specified resource group and name and specific release train on + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train on * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1788,13 +1340,17 @@ private Mono getUpgradeGraphAsync(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade graph of an Appliance with a specified resource group and name and specific release train - * along with {@link Response}. + * @return an Appliance upgrade graph. + * + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getUpgradeGraphWithResponse(String resourceGroupName, String resourceName, String upgradeGraph, Context context) { - return getUpgradeGraphWithResponseAsync(resourceGroupName, resourceName, upgradeGraph, context).block(); + final String accept = "application/json"; + return service.getUpgradeGraphSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, upgradeGraph, accept, context); } /** @@ -1808,7 +1364,9 @@ public Response getUpgradeGraphWithResponse(String resourceGr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the upgrade graph of an Appliance with a specified resource group and name and specific release train. + * @return an Appliance upgrade graph. + * + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. */ @ServiceMethod(returns = ReturnType.SINGLE) public UpgradeGraphInner getUpgradeGraph(String resourceGroupName, String resourceName, String upgradeGraph) { @@ -1816,32 +1374,204 @@ public UpgradeGraphInner getUpgradeGraph(String resourceGroupName, String resour } /** + * Lists all available Appliances operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsSinglePageAsync() { + final String accept = "application/json"; + return FluxUtil.withContext( + context -> service.listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists all available Appliances operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOperationsAsync() { + return new PagedFlux<>(() -> listOperationsSinglePageAsync(), + nextLink -> listOperationsNextSinglePageAsync(nextLink)); + } + + /** + * Lists all available Appliances operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOperationsSinglePage() { + final String accept = "application/json"; + Response res + = service.listOperationsSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all available Appliances operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOperationsSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listOperationsSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all available Appliances operations. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations() { + return new PagedIterable<>(() -> listOperationsSinglePage(), + nextLink -> listOperationsNextSinglePage(nextLink)); + } + + /** + * Lists all available Appliances operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations(Context context) { + return new PagedIterable<>(() -> listOperationsSinglePage(context), + nextLink -> listOperationsNextSinglePage(nextLink, context)); + } + + /** + * Gets the telemetry config. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the telemetry config along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTelemetryConfigWithResponseAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getTelemetryConfig(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the telemetry config. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the telemetry config on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTelemetryConfigAsync() { + return getTelemetryConfigWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the telemetry config. + * + * @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 telemetry config along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTelemetryConfigWithResponse(Context context) { + final String accept = "application/json"; + return service.getTelemetryConfigSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + } + + /** + * Gets the telemetry config. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the telemetry config. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplianceGetTelemetryConfigResultInner getTelemetryConfig() { + return getTelemetryConfigWithResponse(Context.NONE).getValue(); + } + + /** + * Gets a list of Appliances in the specified subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOperationsNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listOperationsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** + * Gets a list of Appliances in the specified subscription and resource group. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Appliances in the specified subscription and resource group. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1849,44 +1579,35 @@ private Mono> listOperationsNextSinglePag * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations along with {@link PagedResponse} on successful completion of {@link Mono}. + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOperationsNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listOperationsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** + * Gets a list of Appliances in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Appliances operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription along with {@link PagedResponse} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1897,6 +1618,30 @@ private Mono> listBySubscriptionNextSinglePageAsyn } /** + * Gets a list of Appliances in a subscription. + * + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listBySubscriptionNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Gets a list of Appliances in a subscription. + * * Get the next page of items. * * @param nextLink The URL to get the next list of items. @@ -1904,24 +1649,17 @@ private Mono> listBySubscriptionNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Appliances operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1931,27 +1669,37 @@ private Mono> listBySubscriptionNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Appliances operation response along with {@link PagedResponse} on successful completion of + * @return paged collection of ApplianceOperation items along with {@link PagedResponse} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private Mono> listOperationsNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.listOperationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOperationsNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listOperationsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1960,23 +1708,14 @@ private Mono> listByResourceGroupNextSinglePageAsy * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Appliances operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return paged collection of ApplianceOperation items along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listOperationsNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listOperationsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesImpl.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesImpl.java index 8ba2f4c14f96..564a0fee98d4 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesImpl.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; @@ -37,56 +37,6 @@ public AppliancesImpl(AppliancesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listOperations() { - PagedIterable inner = this.serviceClient().listOperations(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceOperationImpl(inner1, this.manager())); - } - - public PagedIterable listOperations(Context context) { - PagedIterable inner = this.serviceClient().listOperations(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceOperationImpl(inner1, this.manager())); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); - } - - public Response getTelemetryConfigWithResponse(Context context) { - Response inner - = this.serviceClient().getTelemetryConfigWithResponse(context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ApplianceGetTelemetryConfigResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ApplianceGetTelemetryConfigResult getTelemetryConfig() { - ApplianceGetTelemetryConfigResultInner inner = this.serviceClient().getTelemetryConfig(); - if (inner != null) { - return new ApplianceGetTelemetryConfigResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context) { Response inner @@ -116,6 +66,26 @@ public void delete(String resourceGroupName, String resourceName, Context contex this.serviceClient().delete(resourceGroupName, resourceName, context); } + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceImpl(inner1, this.manager())); + } + public Response listClusterUserCredentialWithResponse(String resourceGroupName, String resourceName, Context context) { Response inner @@ -180,6 +150,36 @@ public UpgradeGraph getUpgradeGraph(String resourceGroupName, String resourceNam } } + public PagedIterable listOperations() { + PagedIterable inner = this.serviceClient().listOperations(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceOperationImpl(inner1, this.manager())); + } + + public PagedIterable listOperations(Context context) { + PagedIterable inner = this.serviceClient().listOperations(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplianceOperationImpl(inner1, this.manager())); + } + + public Response getTelemetryConfigWithResponse(Context context) { + Response inner + = this.serviceClient().getTelemetryConfigWithResponse(context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ApplianceGetTelemetryConfigResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ApplianceGetTelemetryConfigResult getTelemetryConfig() { + ApplianceGetTelemetryConfigResultInner inner = this.serviceClient().getTelemetryConfig(); + if (inner != null) { + return new ApplianceGetTelemetryConfigResultImpl(inner, this.manager()); + } else { + return null; + } + } + public Appliance getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorBuilder.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientBuilder.java similarity index 62% rename from sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorBuilder.java rename to sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientBuilder.java index 5c7ddd83e8f5..0d68ed894f33 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorBuilder.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the ResourceConnectorImpl type. + * A builder for creating a new instance of the ResourceConnectorManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { ResourceConnectorImpl.class }) -public final class ResourceConnectorBuilder { +@ServiceClientBuilder(serviceClients = { ResourceConnectorManagementClientImpl.class }) +public final class ResourceConnectorManagementClientBuilder { /* - * The ID of the target subscription. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The ID of the target subscription. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the ResourceConnectorBuilder. + * @param endpoint the endpoint value. + * @return the ResourceConnectorManagementClientBuilder. */ - public ResourceConnectorBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public ResourceConnectorManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the ResourceConnectorBuilder. + * @param subscriptionId the subscriptionId value. + * @return the ResourceConnectorManagementClientBuilder. */ - public ResourceConnectorBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public ResourceConnectorManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public ResourceConnectorBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the ResourceConnectorBuilder. + * @return the ResourceConnectorManagementClientBuilder. */ - public ResourceConnectorBuilder environment(AzureEnvironment environment) { + public ResourceConnectorManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public ResourceConnectorBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the ResourceConnectorBuilder. + * @return the ResourceConnectorManagementClientBuilder. */ - public ResourceConnectorBuilder pipeline(HttpPipeline pipeline) { + public ResourceConnectorManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public ResourceConnectorBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the ResourceConnectorBuilder. + * @return the ResourceConnectorManagementClientBuilder. */ - public ResourceConnectorBuilder defaultPollInterval(Duration defaultPollInterval) { + public ResourceConnectorManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public ResourceConnectorBuilder defaultPollInterval(Duration defaultPollInterval * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the ResourceConnectorBuilder. + * @return the ResourceConnectorManagementClientBuilder. */ - public ResourceConnectorBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public ResourceConnectorManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of ResourceConnectorImpl with the provided parameters. + * Builds an instance of ResourceConnectorManagementClientImpl with the provided parameters. * - * @return an instance of ResourceConnectorImpl. + * @return an instance of ResourceConnectorManagementClientImpl. */ - public ResourceConnectorImpl buildClient() { + public ResourceConnectorManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,8 +131,8 @@ public ResourceConnectorImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - ResourceConnectorImpl client = new ResourceConnectorImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + ResourceConnectorManagementClientImpl client = new ResourceConnectorManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorImpl.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientImpl.java similarity index 81% rename from sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorImpl.java rename to sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientImpl.java index 6a0c6a6e6bce..d5d322601c4f 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorImpl.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; @@ -15,16 +15,19 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient; -import com.azure.resourcemanager.resourceconnector.fluent.ResourceConnector; +import com.azure.resourcemanager.resourceconnector.fluent.ResourceConnectorManagementClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -35,31 +38,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the ResourceConnectorImpl type. + * Initializes a new instance of the ResourceConnectorManagementClientImpl type. */ -@ServiceClient(builder = ResourceConnectorBuilder.class) -public final class ResourceConnectorImpl implements ResourceConnector { +@ServiceClient(builder = ResourceConnectorManagementClientBuilder.class) +public final class ResourceConnectorManagementClientImpl implements ResourceConnectorManagementClient { /** - * The ID of the target subscription. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -68,12 +57,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -81,6 +70,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -138,23 +141,23 @@ public AppliancesClient getAppliances() { } /** - * Initializes an instance of ResourceConnector client. + * Initializes an instance of ResourceConnectorManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - ResourceConnectorImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, - AzureEnvironment environment, String subscriptionId, String endpoint) { + ResourceConnectorManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-10-27"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-03-01-preview"; this.appliances = new AppliancesClientImpl(this); } @@ -195,6 +198,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -284,5 +304,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(ResourceConnectorImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceConnectorManagementClientImpl.class); } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceManagerUtils.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceManagerUtils.java index 304d2735a1d2..bae483461a10 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceManagerUtils.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/UpgradeGraphImpl.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/UpgradeGraphImpl.java index 9c7a16083355..fec62651d485 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/UpgradeGraphImpl.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/UpgradeGraphImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.implementation; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceListResult.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceListResult.java similarity index 75% rename from sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceListResult.java rename to sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceListResult.java index edd138f1501c..d808aa1c9256 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceListResult.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceListResult.java @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.resourceconnector.models; +package com.azure.resourcemanager.resourceconnector.implementation.models; import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; @@ -14,37 +14,28 @@ import java.util.List; /** - * The List Appliances operation response. + * Paged collection of Appliance items. */ @Immutable public final class ApplianceListResult implements JsonSerializable { /* - * The URL to use for getting the next set of results. + * The Appliance items on this page */ - private String nextLink; + private List value; /* - * The list of Appliances. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ApplianceListResult class. */ - public ApplianceListResult() { + private ApplianceListResult() { } /** - * Get the nextLink property: The URL to use for getting the next set of results. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Get the value property: The list of Appliances. + * Get the value property: The Appliance items on this page. * * @return the value value. */ @@ -53,14 +44,12 @@ public List value() { } /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -69,6 +58,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -78,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ApplianceListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ApplianceListResult. */ public static ApplianceListResult fromJson(JsonReader jsonReader) throws IOException { @@ -87,11 +78,11 @@ public static ApplianceListResult fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedApplianceListResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ApplianceInner.fromJson(reader1)); deserializedApplianceListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedApplianceListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceOperationsList.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceOperationsList.java similarity index 63% rename from sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceOperationsList.java rename to sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceOperationsList.java index 06f8dafc9215..eec31e8d5e85 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceOperationsList.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceOperationsList.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.resourceconnector.models; +package com.azure.resourcemanager.resourceconnector.implementation.models; -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,48 +14,28 @@ import java.util.List; /** - * Lists of Appliances operations. + * Paged collection of ApplianceOperation items. */ -@Fluent +@Immutable public final class ApplianceOperationsList implements JsonSerializable { /* - * Next page of operations. + * The ApplianceOperation items on this page */ - private String nextLink; + private List value; /* - * Array of applianceOperation + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ApplianceOperationsList class. */ - public ApplianceOperationsList() { - } - - /** - * Get the nextLink property: Next page of operations. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: Next page of operations. - * - * @param nextLink the nextLink value to set. - * @return the ApplianceOperationsList object itself. - */ - public ApplianceOperationsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; + private ApplianceOperationsList() { } /** - * Get the value property: Array of applianceOperation. + * Get the value property: The ApplianceOperation items on this page. * * @return the value value. */ @@ -65,32 +44,14 @@ public List value() { } /** - * Set the value property: Array of applianceOperation. + * Get the nextLink property: The link to the next page of items. * - * @param value the value value to set. - * @return the ApplianceOperationsList object itself. - */ - public ApplianceOperationsList withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model ApplianceOperationsList")); - } else { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } - private static final ClientLogger LOGGER = new ClientLogger(ApplianceOperationsList.class); - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/package-info.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/package-info.java index 19cee81038a4..67aff7bd72d7 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/package-info.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/implementation/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the implementations for ResourceConnector. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/AccessProfileType.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/AccessProfileType.java index cdbfb97af250..1103da566c4b 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/AccessProfileType.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/AccessProfileType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Appliance.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Appliance.java index 0a26be2704cb..f9b3f53bae26 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Appliance.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Appliance.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceInner; +import java.util.List; import java.util.Map; /** @@ -94,7 +95,8 @@ public interface Appliance { String publicKey(); /** - * Gets the status property: Appliance’s health and state of connection to on-prem. + * Gets the status property: Appliance’s health and state of connection to on-prem. This list of values is not + * exhaustive. * * @return the status value. */ @@ -107,6 +109,20 @@ public interface Appliance { */ String version(); + /** + * Gets the events property: A list of events that occurred on the Appliance to relay information to the user. + * + * @return the events value. + */ + List events(); + + /** + * Gets the networkProfile property: Contains network information about the Appliance. + * + * @return the networkProfile value. + */ + NetworkProfile networkProfile(); + /** * Gets the region of the resource. * @@ -190,9 +206,9 @@ interface WithResourceGroup { * The stage of the Appliance definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithDistro, - DefinitionStages.WithInfrastructureConfig, DefinitionStages.WithPublicKey, DefinitionStages.WithVersion { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithDistro, DefinitionStages.WithInfrastructureConfig, DefinitionStages.WithPublicKey, + DefinitionStages.WithVersion, DefinitionStages.WithNetworkProfile { /** * Executes the create request. * @@ -287,6 +303,19 @@ interface WithVersion { */ WithCreate withVersion(String version); } + + /** + * The stage of the Appliance definition allowing to specify networkProfile. + */ + interface WithNetworkProfile { + /** + * Specifies the networkProfile property: Contains network information about the Appliance. + * + * @param networkProfile Contains network information about the Appliance. + * @return the next definition stage. + */ + WithCreate withNetworkProfile(NetworkProfile networkProfile); + } } /** @@ -383,7 +412,9 @@ interface WithTags { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance along with {@link Response}. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance along with {@link Response}. */ Response listKeysWithResponse(String artifactType, Context context); @@ -394,7 +425,9 @@ interface WithTags { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance. */ ApplianceListKeysResults listKeys(); } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceCredentialKubeconfig.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceCredentialKubeconfig.java index 63c8e3071e4d..ef0eaf96dbc9 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceCredentialKubeconfig.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceCredentialKubeconfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -29,7 +29,7 @@ public final class ApplianceCredentialKubeconfig implements JsonSerializable listOperations(); - - /** - * Lists all available Appliances operations. + * Gets the details of an Appliance with a specified resource group and name. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return lists of Appliances operations as paginated response with {@link PagedIterable}. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name along with {@link Response}. */ - PagedIterable listOperations(Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Gets a list of Appliances in a subscription. + * Gets an Appliance. * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * Gets the details of an Appliance with a specified resource group and name. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name. */ - PagedIterable list(); + Appliance getByResourceGroup(String resourceGroupName, String resourceName); /** - * Gets a list of Appliances in a subscription. + * Deletes an Appliance. * - * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. + * Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. * - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. */ - PagedIterable list(Context context); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** - * Gets the telemetry config. + * Deletes an Appliance. * + * Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName Appliances name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the telemetry config along with {@link Response}. - */ - Response getTelemetryConfigWithResponse(Context context); - - /** - * Gets the telemetry config. - * - * @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 telemetry config. */ - ApplianceGetTelemetryConfigResult getTelemetryConfig(); + void delete(String resourceGroupName, String resourceName, Context context); /** * Gets a list of Appliances in the specified subscription and resource group. @@ -86,7 +82,9 @@ public interface Appliances { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group as paginated response with * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -102,66 +100,40 @@ public interface Appliances { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of Appliances in the specified subscription and resource group as paginated response with + * @return a list of Appliances in the specified subscription and resource group. + * + * Gets a list of Appliances in the specified subscription and resource group as paginated response with * {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Gets an Appliance. + * Gets a list of Appliances in a subscription. * - * Gets the details of an Appliance with a specified resource group and name. + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Appliance with a specified resource group and name along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); - - /** - * Gets an Appliance. + * @return a list of Appliances in a subscription. * - * Gets the details of an Appliance with a specified resource group and name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details of an Appliance with a specified resource group and name. - */ - Appliance getByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Deletes an Appliance. - * - * Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * Gets a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + PagedIterable list(); /** - * Deletes an Appliance. + * Gets a list of Appliances in a subscription. * - * Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. + * Gets a list of Appliances in the specified subscription. The operation returns properties of each Appliance. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName Appliances name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of Appliances in a subscription. + * + * Gets a list of Appliances in the specified subscription as paginated response with {@link PagedIterable}. */ - void delete(String resourceGroupName, String resourceName, Context context); + PagedIterable list(Context context); /** * Returns the cluster user credential. @@ -205,7 +177,9 @@ Response listClusterUserCredentialWithResponse(S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance along with {@link Response}. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance along with {@link Response}. */ Response listKeysWithResponse(String resourceGroupName, String resourceName, String artifactType, Context context); @@ -220,7 +194,9 @@ Response listKeysWithResponse(String resourceGroupName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Cluster Keys Results appliance. + * @return the management config. + * + * Returns the cluster customer credentials for the dedicated appliance. */ ApplianceListKeysResults listKeys(String resourceGroupName, String resourceName); @@ -236,8 +212,10 @@ Response listKeysWithResponse(String resourceGroupName * @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 upgrade graph of an Appliance with a specified resource group and name and specific release train - * along with {@link Response}. + * @return an Appliance upgrade graph. + * + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train along + * with {@link Response}. */ Response getUpgradeGraphWithResponse(String resourceGroupName, String resourceName, String upgradeGraph, Context context); @@ -253,10 +231,52 @@ Response getUpgradeGraphWithResponse(String resourceGroupName, Str * @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 upgrade graph of an Appliance with a specified resource group and name and specific release train. + * @return an Appliance upgrade graph. + * + * Gets the upgrade graph of an Appliance with a specified resource group and name and specific release train. */ UpgradeGraph getUpgradeGraph(String resourceGroupName, String resourceName, String upgradeGraph); + /** + * Lists all available Appliances operations. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items as paginated response with {@link PagedIterable}. + */ + PagedIterable listOperations(); + + /** + * Lists all available Appliances operations. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return paged collection of ApplianceOperation items as paginated response with {@link PagedIterable}. + */ + PagedIterable listOperations(Context context); + + /** + * Gets the telemetry config. + * + * @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 telemetry config along with {@link Response}. + */ + Response getTelemetryConfigWithResponse(Context context); + + /** + * Gets the telemetry config. + * + * @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 telemetry config. + */ + ApplianceGetTelemetryConfigResult getTelemetryConfig(); + /** * Gets an Appliance. * @@ -266,7 +286,9 @@ Response getUpgradeGraphWithResponse(String resourceGroupName, Str * @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 details of an Appliance with a specified resource group and name along with {@link Response}. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name along with {@link Response}. */ Appliance getById(String id); @@ -280,7 +302,9 @@ Response getUpgradeGraphWithResponse(String resourceGroupName, Str * @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 details of an Appliance with a specified resource group and name along with {@link Response}. + * @return an Appliance. + * + * Gets the details of an Appliance with a specified resource group and name along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ArtifactProfile.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ArtifactProfile.java index 02134316d803..c0026edadb8b 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ArtifactProfile.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ArtifactProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -24,7 +24,7 @@ public final class ArtifactProfile implements JsonSerializable /** * Creates an instance of ArtifactProfile class. */ - public ArtifactProfile() { + private ArtifactProfile() { } /** @@ -36,14 +36,6 @@ public String endpoint() { return this.endpoint; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Distro.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Distro.java index adea53742536..143720792641 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Distro.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Distro.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/DnsConfiguration.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/DnsConfiguration.java new file mode 100644 index 000000000000..bc281f209232 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/DnsConfiguration.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains DNS information about the Appliance. + */ +@Fluent +public final class DnsConfiguration implements JsonSerializable { + /* + * Version of the DNS configuration. + */ + private String version; + + /** + * Creates an instance of DnsConfiguration class. + */ + public DnsConfiguration() { + } + + /** + * Get the version property: Version of the DNS configuration. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the DNS configuration. + * + * @param version the version value to set. + * @return the DnsConfiguration object itself. + */ + public DnsConfiguration withVersion(String version) { + this.version = version; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DnsConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DnsConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the DnsConfiguration. + */ + public static DnsConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DnsConfiguration deserializedDnsConfiguration = new DnsConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedDnsConfiguration.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDnsConfiguration; + }); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Event.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Event.java new file mode 100644 index 000000000000..63c37137dec3 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Event.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + +/** + * Event contains information about customer driven, platform driven, or unplanned events that occurred on the + * Appliance. + */ +@Immutable +public final class Event implements JsonSerializable { + /* + * The type of event is used to classify how the event was initiated. + */ + private String type; + + /* + * Code is used to break down the event further to identify why it occurred. + */ + private String code; + + /* + * Status is used to represent the outcome of the event. + */ + private String status; + + /* + * Message is intended to be actionable and should be used to inform the user of the event. + */ + private String message; + + /* + * Severity is the classification of the event to relay the importance of the event. + */ + private String severity; + + /* + * Timestamp is the time the event occurred. + */ + private OffsetDateTime timestamp; + + /** + * Creates an instance of Event class. + */ + private Event() { + } + + /** + * Get the type property: The type of event is used to classify how the event was initiated. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the code property: Code is used to break down the event further to identify why it occurred. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the status property: Status is used to represent the outcome of the event. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Get the message property: Message is intended to be actionable and should be used to inform the user of the + * event. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the severity property: Severity is the classification of the event to relay the importance of the event. + * + * @return the severity value. + */ + public String severity() { + return this.severity; + } + + /** + * Get the timestamp property: Timestamp is the time the event occurred. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("type", this.type); + jsonWriter.writeStringField("code", this.code); + jsonWriter.writeStringField("status", this.status); + jsonWriter.writeStringField("message", this.message); + jsonWriter.writeStringField("severity", this.severity); + jsonWriter.writeStringField("timestamp", + this.timestamp == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.timestamp)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Event from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Event if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Event. + */ + public static Event fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Event deserializedEvent = new Event(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("type".equals(fieldName)) { + deserializedEvent.type = reader.getString(); + } else if ("code".equals(fieldName)) { + deserializedEvent.code = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedEvent.status = reader.getString(); + } else if ("message".equals(fieldName)) { + deserializedEvent.message = reader.getString(); + } else if ("severity".equals(fieldName)) { + deserializedEvent.severity = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + deserializedEvent.timestamp = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedEvent; + }); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/GatewayConfiguration.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/GatewayConfiguration.java new file mode 100644 index 000000000000..3f615685caee --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/GatewayConfiguration.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains Arc Gateway information about the Appliance. + */ +@Fluent +public final class GatewayConfiguration implements JsonSerializable { + /* + * Version of the Arc Gateway configuration. + */ + private String version; + + /** + * Creates an instance of GatewayConfiguration class. + */ + public GatewayConfiguration() { + } + + /** + * Get the version property: Version of the Arc Gateway configuration. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the Arc Gateway configuration. + * + * @param version the version value to set. + * @return the GatewayConfiguration object itself. + */ + public GatewayConfiguration withVersion(String version) { + this.version = version; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of GatewayConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of GatewayConfiguration if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the GatewayConfiguration. + */ + public static GatewayConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + GatewayConfiguration deserializedGatewayConfiguration = new GatewayConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedGatewayConfiguration.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedGatewayConfiguration; + }); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/HybridConnectionConfig.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/HybridConnectionConfig.java index ed7e055edbb5..af81bf632f0f 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/HybridConnectionConfig.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/HybridConnectionConfig.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -39,7 +39,7 @@ public final class HybridConnectionConfig implements JsonSerializable { + /* + * Contains proxy information about the Appliance + */ + private ProxyConfiguration proxyConfiguration; + + /* + * Contains DNS information about the Appliance + */ + private DnsConfiguration dnsConfiguration; + + /* + * Contains Arc Gateway information about the Appliance + */ + private GatewayConfiguration gatewayConfiguration; + + /** + * Creates an instance of NetworkProfile class. + */ + public NetworkProfile() { + } + + /** + * Get the proxyConfiguration property: Contains proxy information about the Appliance. + * + * @return the proxyConfiguration value. + */ + public ProxyConfiguration proxyConfiguration() { + return this.proxyConfiguration; + } + + /** + * Set the proxyConfiguration property: Contains proxy information about the Appliance. + * + * @param proxyConfiguration the proxyConfiguration value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withProxyConfiguration(ProxyConfiguration proxyConfiguration) { + this.proxyConfiguration = proxyConfiguration; + return this; + } + + /** + * Get the dnsConfiguration property: Contains DNS information about the Appliance. + * + * @return the dnsConfiguration value. + */ + public DnsConfiguration dnsConfiguration() { + return this.dnsConfiguration; + } + + /** + * Set the dnsConfiguration property: Contains DNS information about the Appliance. + * + * @param dnsConfiguration the dnsConfiguration value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withDnsConfiguration(DnsConfiguration dnsConfiguration) { + this.dnsConfiguration = dnsConfiguration; + return this; + } + + /** + * Get the gatewayConfiguration property: Contains Arc Gateway information about the Appliance. + * + * @return the gatewayConfiguration value. + */ + public GatewayConfiguration gatewayConfiguration() { + return this.gatewayConfiguration; + } + + /** + * Set the gatewayConfiguration property: Contains Arc Gateway information about the Appliance. + * + * @param gatewayConfiguration the gatewayConfiguration value to set. + * @return the NetworkProfile object itself. + */ + public NetworkProfile withGatewayConfiguration(GatewayConfiguration gatewayConfiguration) { + this.gatewayConfiguration = gatewayConfiguration; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("proxyConfiguration", this.proxyConfiguration); + jsonWriter.writeJsonField("dnsConfiguration", this.dnsConfiguration); + jsonWriter.writeJsonField("gatewayConfiguration", this.gatewayConfiguration); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkProfile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkProfile if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkProfile. + */ + public static NetworkProfile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkProfile deserializedNetworkProfile = new NetworkProfile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("proxyConfiguration".equals(fieldName)) { + deserializedNetworkProfile.proxyConfiguration = ProxyConfiguration.fromJson(reader); + } else if ("dnsConfiguration".equals(fieldName)) { + deserializedNetworkProfile.dnsConfiguration = DnsConfiguration.fromJson(reader); + } else if ("gatewayConfiguration".equals(fieldName)) { + deserializedNetworkProfile.gatewayConfiguration = GatewayConfiguration.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkProfile; + }); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/PatchableAppliance.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/PatchableAppliance.java index 9a153e026c9f..5b607204fc19 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/PatchableAppliance.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/PatchableAppliance.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -48,14 +48,6 @@ public PatchableAppliance withTags(Map tags) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Provider.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Provider.java index 7ebc5e92ec6c..58b85deb07df 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Provider.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Provider.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ProxyConfiguration.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ProxyConfiguration.java new file mode 100644 index 000000000000..01aadbf43e09 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ProxyConfiguration.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Contains proxy information about the Appliance. + */ +@Fluent +public final class ProxyConfiguration implements JsonSerializable { + /* + * Version of the proxy configuration. + */ + private String version; + + /** + * Creates an instance of ProxyConfiguration class. + */ + public ProxyConfiguration() { + } + + /** + * Get the version property: Version of the proxy configuration. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the proxy configuration. + * + * @param version the version value to set. + * @return the ProxyConfiguration object itself. + */ + public ProxyConfiguration withVersion(String version) { + this.version = version; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("version", this.version); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProxyConfiguration from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProxyConfiguration if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ProxyConfiguration. + */ + public static ProxyConfiguration fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProxyConfiguration deserializedProxyConfiguration = new ProxyConfiguration(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("version".equals(fieldName)) { + deserializedProxyConfiguration.version = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedProxyConfiguration; + }); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ResourceIdentityType.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ResourceIdentityType.java index 1ac5f689604e..0d3598c49126 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ResourceIdentityType.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/ResourceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SshKey.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SshKey.java index 78d404d3d730..8ce5f73bc0f1 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SshKey.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SshKey.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -44,7 +44,7 @@ public final class SshKey implements JsonSerializable { /** * Creates an instance of SshKey class. */ - public SshKey() { + private SshKey() { } /** @@ -92,14 +92,6 @@ public String publicKey() { return this.publicKey; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Status.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Status.java index 1f377d01d651..09cf91db07f9 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Status.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/Status.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -8,7 +8,7 @@ import java.util.Collection; /** - * Appliance’s health and state of connection to on-prem. + * Appliance’s health and state of connection to on-prem. This list of values is not exhaustive. */ public final class Status extends ExpandableStringEnum { /** @@ -172,6 +172,66 @@ public final class Status extends ExpandableStringEnum { */ public static final Status NONE = fromString("None"); + /** + * Static value NetworkProxyUpdatePreparing for Status. + */ + public static final Status NETWORK_PROXY_UPDATE_PREPARING = fromString("NetworkProxyUpdatePreparing"); + + /** + * Static value NetworkProxyUpdating for Status. + */ + public static final Status NETWORK_PROXY_UPDATING = fromString("NetworkProxyUpdating"); + + /** + * Static value NetworkProxyUpdateComplete for Status. + */ + public static final Status NETWORK_PROXY_UPDATE_COMPLETE = fromString("NetworkProxyUpdateComplete"); + + /** + * Static value NetworkProxyUpdateFailed for Status. + */ + public static final Status NETWORK_PROXY_UPDATE_FAILED = fromString("NetworkProxyUpdateFailed"); + + /** + * Static value NetworkDNSUpdatePreparing for Status. + */ + public static final Status NETWORK_DNSUPDATE_PREPARING = fromString("NetworkDNSUpdatePreparing"); + + /** + * Static value NetworkDNSUpdating for Status. + */ + public static final Status NETWORK_DNSUPDATING = fromString("NetworkDNSUpdating"); + + /** + * Static value NetworkDNSUpdateComplete for Status. + */ + public static final Status NETWORK_DNSUPDATE_COMPLETE = fromString("NetworkDNSUpdateComplete"); + + /** + * Static value NetworkDNSUpdateFailed for Status. + */ + public static final Status NETWORK_DNSUPDATE_FAILED = fromString("NetworkDNSUpdateFailed"); + + /** + * Static value ArcGatewayUpdatePreparing for Status. + */ + public static final Status ARC_GATEWAY_UPDATE_PREPARING = fromString("ArcGatewayUpdatePreparing"); + + /** + * Static value ArcGatewayUpdating for Status. + */ + public static final Status ARC_GATEWAY_UPDATING = fromString("ArcGatewayUpdating"); + + /** + * Static value ArcGatewayUpdateComplete for Status. + */ + public static final Status ARC_GATEWAY_UPDATE_COMPLETE = fromString("ArcGatewayUpdateComplete"); + + /** + * Static value ArcGatewayUpdateFailed for Status. + */ + public static final Status ARC_GATEWAY_UPDATE_FAILED = fromString("ArcGatewayUpdateFailed"); + /** * Creates a new instance of Status value. * diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersion.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersion.java index fc7ab37c39ee..618543ebe1e4 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersion.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersion.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.models; @@ -29,7 +29,7 @@ public final class SupportedVersion implements JsonSerializable supportedVersions() { return this.supportedVersions; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportedVersions() != null) { - supportedVersions().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/package-info.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/package-info.java index 835a02d87b6e..f289dd04ade1 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/package-info.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/models/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the data models for ResourceConnector. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/package-info.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/package-info.java index 3b82f77a2bbb..114f03be6514 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/package-info.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/com/azure/resourcemanager/resourceconnector/package-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** * Package containing the classes for ResourceConnector. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/module-info.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/module-info.java index c5a2d3503099..93d4a75a0bdf 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/module-info.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.resourceconnector { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.resourceconnector.fluent.models to com.azure.core; opens com.azure.resourcemanager.resourceconnector.models to com.azure.core; + opens com.azure.resourcemanager.resourceconnector.implementation.models to com.azure.core; } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/META-INF/azure-resourcemanager-resourceconnector_apiview_properties.json b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/META-INF/azure-resourcemanager-resourceconnector_apiview_properties.json new file mode 100644 index 000000000000..719a283edc05 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/META-INF/azure-resourcemanager-resourceconnector_apiview_properties.json @@ -0,0 +1,59 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient": "Microsoft.ResourceConnector.Appliances", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.beginCreateOrUpdate": "Microsoft.ResourceConnector.Appliances.createOrUpdate", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.beginDelete": "Microsoft.ResourceConnector.Appliances.delete", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.createOrUpdate": "Microsoft.ResourceConnector.Appliances.createOrUpdate", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.delete": "Microsoft.ResourceConnector.Appliances.delete", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getByResourceGroup": "Microsoft.ResourceConnector.Appliances.get", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getByResourceGroupWithResponse": "Microsoft.ResourceConnector.Appliances.get", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getTelemetryConfig": "Microsoft.ResourceConnector.AppliancesOperationGroup.getTelemetryConfig", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getTelemetryConfigWithResponse": "Microsoft.ResourceConnector.AppliancesOperationGroup.getTelemetryConfig", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getUpgradeGraph": "Microsoft.ResourceConnector.Appliances.getUpgradeGraph", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getUpgradeGraphWithResponse": "Microsoft.ResourceConnector.Appliances.getUpgradeGraph", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.list": "Microsoft.ResourceConnector.Appliances.listBySubscription", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listByResourceGroup": "Microsoft.ResourceConnector.Appliances.listByResourceGroup", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listClusterUserCredential": "Microsoft.ResourceConnector.Appliances.listClusterUserCredential", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listClusterUserCredentialWithResponse": "Microsoft.ResourceConnector.Appliances.listClusterUserCredential", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listKeys": "Microsoft.ResourceConnector.Appliances.listKeys", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listKeysWithResponse": "Microsoft.ResourceConnector.Appliances.listKeys", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listOperations": "Azure.ResourceManager.Legacy.Operations.list", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.update": "Microsoft.ResourceConnector.Appliances.update", + "com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.updateWithResponse": "Microsoft.ResourceConnector.Appliances.update", + "com.azure.resourcemanager.resourceconnector.fluent.ResourceConnectorManagementClient": "Microsoft.ResourceConnector", + "com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceGetTelemetryConfigResultInner": "Microsoft.ResourceConnector.ApplianceGetTelemetryConfigResult", + "com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceInner": "Microsoft.ResourceConnector.Appliance", + "com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceListCredentialResultsInner": "Microsoft.ResourceConnector.ApplianceListCredentialResults", + "com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceListKeysResultsInner": "Microsoft.ResourceConnector.ApplianceListKeysResults", + "com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceOperationInner": "Microsoft.ResourceConnector.ApplianceOperation", + "com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceOperationValueDisplay": "Microsoft.ResourceConnector.ApplianceOperationValueDisplay", + "com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceProperties": "Microsoft.ResourceConnector.ApplianceProperties", + "com.azure.resourcemanager.resourceconnector.fluent.models.UpgradeGraphInner": "Microsoft.ResourceConnector.UpgradeGraph", + "com.azure.resourcemanager.resourceconnector.implementation.ResourceConnectorManagementClientBuilder": "Microsoft.ResourceConnector", + "com.azure.resourcemanager.resourceconnector.implementation.models.ApplianceListResult": "Microsoft.ResourceConnector.ApplianceListResult", + "com.azure.resourcemanager.resourceconnector.implementation.models.ApplianceOperationsList": "Microsoft.ResourceConnector.ApplianceOperationsList", + "com.azure.resourcemanager.resourceconnector.models.AccessProfileType": "Microsoft.ResourceConnector.AccessProfileType", + "com.azure.resourcemanager.resourceconnector.models.ApplianceCredentialKubeconfig": "Microsoft.ResourceConnector.ApplianceCredentialKubeconfig", + "com.azure.resourcemanager.resourceconnector.models.AppliancePropertiesInfrastructureConfig": "Microsoft.ResourceConnector.AppliancePropertiesInfrastructureConfig", + "com.azure.resourcemanager.resourceconnector.models.ArtifactProfile": "Microsoft.ResourceConnector.ArtifactProfile", + "com.azure.resourcemanager.resourceconnector.models.Distro": "Microsoft.ResourceConnector.Distro", + "com.azure.resourcemanager.resourceconnector.models.DnsConfiguration": "Microsoft.ResourceConnector.DnsConfiguration", + "com.azure.resourcemanager.resourceconnector.models.Event": "Microsoft.ResourceConnector.Event", + "com.azure.resourcemanager.resourceconnector.models.GatewayConfiguration": "Microsoft.ResourceConnector.GatewayConfiguration", + "com.azure.resourcemanager.resourceconnector.models.HybridConnectionConfig": "Microsoft.ResourceConnector.HybridConnectionConfig", + "com.azure.resourcemanager.resourceconnector.models.Identity": "Microsoft.ResourceConnector.Identity", + "com.azure.resourcemanager.resourceconnector.models.NetworkProfile": "Microsoft.ResourceConnector.NetworkProfile", + "com.azure.resourcemanager.resourceconnector.models.PatchableAppliance": "Microsoft.ResourceConnector.PatchableAppliance", + "com.azure.resourcemanager.resourceconnector.models.Provider": "Microsoft.ResourceConnector.Provider", + "com.azure.resourcemanager.resourceconnector.models.ProxyConfiguration": "Microsoft.ResourceConnector.ProxyConfiguration", + "com.azure.resourcemanager.resourceconnector.models.ResourceIdentityType": "Microsoft.ResourceConnector.ResourceIdentityType", + "com.azure.resourcemanager.resourceconnector.models.SshKey": "Microsoft.ResourceConnector.SSHKey", + "com.azure.resourcemanager.resourceconnector.models.Status": "Microsoft.ResourceConnector.Status", + "com.azure.resourcemanager.resourceconnector.models.SupportedVersion": "Microsoft.ResourceConnector.SupportedVersion", + "com.azure.resourcemanager.resourceconnector.models.SupportedVersionCatalogVersion": "Microsoft.ResourceConnector.SupportedVersionCatalogVersion", + "com.azure.resourcemanager.resourceconnector.models.SupportedVersionCatalogVersionData": "Microsoft.ResourceConnector.SupportedVersionCatalogVersionData", + "com.azure.resourcemanager.resourceconnector.models.SupportedVersionMetadata": "Microsoft.ResourceConnector.SupportedVersionMetadata", + "com.azure.resourcemanager.resourceconnector.models.UpgradeGraphProperties": "Microsoft.ResourceConnector.UpgradeGraphProperties" + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/META-INF/azure-resourcemanager-resourceconnector_metadata.json b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/META-INF/azure-resourcemanager-resourceconnector_metadata.json new file mode 100644 index 000000000000..0e534bcf3045 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/META-INF/azure-resourcemanager-resourceconnector_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-03-01-preview","crossLanguageDefinitions":{"com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient":"Microsoft.ResourceConnector.Appliances","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.beginCreateOrUpdate":"Microsoft.ResourceConnector.Appliances.createOrUpdate","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.beginDelete":"Microsoft.ResourceConnector.Appliances.delete","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.createOrUpdate":"Microsoft.ResourceConnector.Appliances.createOrUpdate","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.delete":"Microsoft.ResourceConnector.Appliances.delete","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getByResourceGroup":"Microsoft.ResourceConnector.Appliances.get","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getByResourceGroupWithResponse":"Microsoft.ResourceConnector.Appliances.get","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getTelemetryConfig":"Microsoft.ResourceConnector.AppliancesOperationGroup.getTelemetryConfig","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getTelemetryConfigWithResponse":"Microsoft.ResourceConnector.AppliancesOperationGroup.getTelemetryConfig","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getUpgradeGraph":"Microsoft.ResourceConnector.Appliances.getUpgradeGraph","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.getUpgradeGraphWithResponse":"Microsoft.ResourceConnector.Appliances.getUpgradeGraph","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.list":"Microsoft.ResourceConnector.Appliances.listBySubscription","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listByResourceGroup":"Microsoft.ResourceConnector.Appliances.listByResourceGroup","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listClusterUserCredential":"Microsoft.ResourceConnector.Appliances.listClusterUserCredential","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listClusterUserCredentialWithResponse":"Microsoft.ResourceConnector.Appliances.listClusterUserCredential","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listKeys":"Microsoft.ResourceConnector.Appliances.listKeys","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listKeysWithResponse":"Microsoft.ResourceConnector.Appliances.listKeys","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.listOperations":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.update":"Microsoft.ResourceConnector.Appliances.update","com.azure.resourcemanager.resourceconnector.fluent.AppliancesClient.updateWithResponse":"Microsoft.ResourceConnector.Appliances.update","com.azure.resourcemanager.resourceconnector.fluent.ResourceConnectorManagementClient":"Microsoft.ResourceConnector","com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceGetTelemetryConfigResultInner":"Microsoft.ResourceConnector.ApplianceGetTelemetryConfigResult","com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceInner":"Microsoft.ResourceConnector.Appliance","com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceListCredentialResultsInner":"Microsoft.ResourceConnector.ApplianceListCredentialResults","com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceListKeysResultsInner":"Microsoft.ResourceConnector.ApplianceListKeysResults","com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceOperationInner":"Microsoft.ResourceConnector.ApplianceOperation","com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceOperationValueDisplay":"Microsoft.ResourceConnector.ApplianceOperationValueDisplay","com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceProperties":"Microsoft.ResourceConnector.ApplianceProperties","com.azure.resourcemanager.resourceconnector.fluent.models.UpgradeGraphInner":"Microsoft.ResourceConnector.UpgradeGraph","com.azure.resourcemanager.resourceconnector.implementation.ResourceConnectorManagementClientBuilder":"Microsoft.ResourceConnector","com.azure.resourcemanager.resourceconnector.implementation.models.ApplianceListResult":"Microsoft.ResourceConnector.ApplianceListResult","com.azure.resourcemanager.resourceconnector.implementation.models.ApplianceOperationsList":"Microsoft.ResourceConnector.ApplianceOperationsList","com.azure.resourcemanager.resourceconnector.models.AccessProfileType":"Microsoft.ResourceConnector.AccessProfileType","com.azure.resourcemanager.resourceconnector.models.ApplianceCredentialKubeconfig":"Microsoft.ResourceConnector.ApplianceCredentialKubeconfig","com.azure.resourcemanager.resourceconnector.models.AppliancePropertiesInfrastructureConfig":"Microsoft.ResourceConnector.AppliancePropertiesInfrastructureConfig","com.azure.resourcemanager.resourceconnector.models.ArtifactProfile":"Microsoft.ResourceConnector.ArtifactProfile","com.azure.resourcemanager.resourceconnector.models.Distro":"Microsoft.ResourceConnector.Distro","com.azure.resourcemanager.resourceconnector.models.DnsConfiguration":"Microsoft.ResourceConnector.DnsConfiguration","com.azure.resourcemanager.resourceconnector.models.Event":"Microsoft.ResourceConnector.Event","com.azure.resourcemanager.resourceconnector.models.GatewayConfiguration":"Microsoft.ResourceConnector.GatewayConfiguration","com.azure.resourcemanager.resourceconnector.models.HybridConnectionConfig":"Microsoft.ResourceConnector.HybridConnectionConfig","com.azure.resourcemanager.resourceconnector.models.Identity":"Microsoft.ResourceConnector.Identity","com.azure.resourcemanager.resourceconnector.models.NetworkProfile":"Microsoft.ResourceConnector.NetworkProfile","com.azure.resourcemanager.resourceconnector.models.PatchableAppliance":"Microsoft.ResourceConnector.PatchableAppliance","com.azure.resourcemanager.resourceconnector.models.Provider":"Microsoft.ResourceConnector.Provider","com.azure.resourcemanager.resourceconnector.models.ProxyConfiguration":"Microsoft.ResourceConnector.ProxyConfiguration","com.azure.resourcemanager.resourceconnector.models.ResourceIdentityType":"Microsoft.ResourceConnector.ResourceIdentityType","com.azure.resourcemanager.resourceconnector.models.SshKey":"Microsoft.ResourceConnector.SSHKey","com.azure.resourcemanager.resourceconnector.models.Status":"Microsoft.ResourceConnector.Status","com.azure.resourcemanager.resourceconnector.models.SupportedVersion":"Microsoft.ResourceConnector.SupportedVersion","com.azure.resourcemanager.resourceconnector.models.SupportedVersionCatalogVersion":"Microsoft.ResourceConnector.SupportedVersionCatalogVersion","com.azure.resourcemanager.resourceconnector.models.SupportedVersionCatalogVersionData":"Microsoft.ResourceConnector.SupportedVersionCatalogVersionData","com.azure.resourcemanager.resourceconnector.models.SupportedVersionMetadata":"Microsoft.ResourceConnector.SupportedVersionMetadata","com.azure.resourcemanager.resourceconnector.models.UpgradeGraphProperties":"Microsoft.ResourceConnector.UpgradeGraphProperties"},"generatedFiles":["src/main/java/com/azure/resourcemanager/resourceconnector/ResourceConnectorManager.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/AppliancesClient.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/ResourceConnectorManagementClient.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceGetTelemetryConfigResultInner.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceInner.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListCredentialResultsInner.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceListKeysResultsInner.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceOperationInner.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceOperationValueDisplay.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/ApplianceProperties.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/UpgradeGraphInner.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/resourceconnector/fluent/package-info.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceGetTelemetryConfigResultImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListCredentialResultsImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceListKeysResultsImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ApplianceOperationImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesClientImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/AppliancesImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceConnectorManagementClientImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/UpgradeGraphImpl.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceListResult.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/models/ApplianceOperationsList.java","src/main/java/com/azure/resourcemanager/resourceconnector/implementation/package-info.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/AccessProfileType.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/Appliance.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceCredentialKubeconfig.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceGetTelemetryConfigResult.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceListCredentialResults.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceListKeysResults.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ApplianceOperation.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/AppliancePropertiesInfrastructureConfig.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/Appliances.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ArtifactProfile.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/Distro.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/DnsConfiguration.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/Event.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/GatewayConfiguration.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/HybridConnectionConfig.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/Identity.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/PatchableAppliance.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/Provider.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ProxyConfiguration.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/SshKey.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/Status.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersion.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersionCatalogVersion.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersionCatalogVersionData.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/SupportedVersionMetadata.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/UpgradeGraph.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/UpgradeGraphProperties.java","src/main/java/com/azure/resourcemanager/resourceconnector/models/package-info.java","src/main/java/com/azure/resourcemanager/resourceconnector/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/azure-resourcemanager-resourceconnector.properties b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/azure-resourcemanager-resourceconnector.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/main/resources/azure-resourcemanager-resourceconnector.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesCreateOrUpdateSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesCreateOrUpdateSamples.java index 222d0d98a8ad..093e96b96e48 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesCreateOrUpdateSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesCreateOrUpdateSamples.java @@ -1,21 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; import com.azure.resourcemanager.resourceconnector.models.AppliancePropertiesInfrastructureConfig; import com.azure.resourcemanager.resourceconnector.models.Distro; +import com.azure.resourcemanager.resourceconnector.models.NetworkProfile; import com.azure.resourcemanager.resourceconnector.models.Provider; +import com.azure.resourcemanager.resourceconnector.models.ProxyConfiguration; /** * Samples for Appliances CreateOrUpdate. */ public final class AppliancesCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesCreate_Update.json + * x-ms-original-file: 2025-03-01-preview/AppliancesCreate_Update.json */ /** * Sample code: Create/Update Appliance. @@ -32,4 +32,26 @@ public final class AppliancesCreateOrUpdateSamples { .withInfrastructureConfig(new AppliancePropertiesInfrastructureConfig().withProvider(Provider.VMWARE)) .create(); } + + /* + * x-ms-original-file: 2025-03-01-preview/AppliancesUpdateProxy.json + */ + /** + * Sample code: Update Appliance Proxy Configuration. + * + * @param manager Entry point to ResourceConnectorManager. + */ + public static void updateApplianceProxyConfiguration( + com.azure.resourcemanager.resourceconnector.ResourceConnectorManager manager) { + manager.appliances() + .define("appliance01") + .withRegion("West US") + .withExistingResourceGroup("testresourcegroup") + .withDistro(Distro.AKSEDGE) + .withInfrastructureConfig(new AppliancePropertiesInfrastructureConfig().withProvider(Provider.VMWARE)) + .withPublicKey("xxxxxxxx") + .withNetworkProfile( + new NetworkProfile().withProxyConfiguration(new ProxyConfiguration().withVersion("latest"))) + .create(); + } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesDeleteSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesDeleteSamples.java index 786888f3d539..061ed7341a88 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesDeleteSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesDeleteSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesDelete.json + * x-ms-original-file: 2025-03-01-preview/AppliancesDelete.json */ /** * Sample code: Delete Appliance. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetByResourceGroupSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetByResourceGroupSamples.java index 7362a3ea5377..25b984168ec6 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetByResourceGroupSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesGet.json + * x-ms-original-file: 2025-03-01-preview/AppliancesGet.json */ /** * Sample code: Get Appliance. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetTelemetryConfigSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetTelemetryConfigSamples.java index 7a4f9c250beb..59b3c8eb88e6 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetTelemetryConfigSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetTelemetryConfigSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesGetTelemetryConfigSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * TelemetryConfig.json + * x-ms-original-file: 2025-03-01-preview/TelemetryConfig.json */ /** * Sample code: GetTelemetryConfig Appliance. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphSamples.java index 7eedcd4db7fb..95a15a3a77a4 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesGetUpgradeGraphSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * UpgradeGraph.json + * x-ms-original-file: 2025-03-01-preview/UpgradeGraph.json */ /** * Sample code: Get Appliance Upgrade Graph. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListByResourceGroupSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListByResourceGroupSamples.java index 7e3ad4caedf6..4751ef18c0ac 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListByResourceGroupSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListByResourceGroup.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListByResourceGroup.json */ /** * Sample code: List Appliances by resource group. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListClusterUserCredentialSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListClusterUserCredentialSamples.java index 4703a797a965..83f48bcb5931 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListClusterUserCredentialSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListClusterUserCredentialSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesListClusterUserCredentialSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListClusterUserCredential.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListClusterUserCredential.json */ /** * Sample code: ListClusterUserCredentialAppliance. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListKeysSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListKeysSamples.java index ef0517936dce..8644d0048a26 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListKeysSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesListKeysSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListKeys.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListKeys.json */ /** * Sample code: ListKeys Appliance. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsSamples.java index a8170f8fded6..f25bc7bc293c 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesListOperationsSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListOperations.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListOperations.json */ /** * Sample code: List Appliances operations. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListSamples.java index 7170456d305b..f3184998a1fd 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -9,9 +9,7 @@ */ public final class AppliancesListSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesListBySubscription.json + * x-ms-original-file: 2025-03-01-preview/AppliancesListBySubscription.json */ /** * Sample code: List Appliances by subscription. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesUpdateSamples.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesUpdateSamples.java index 5ecd2205e09a..65b29fbbedb7 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesUpdateSamples.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/samples/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -13,9 +13,7 @@ */ public final class AppliancesUpdateSamples { /* - * x-ms-original-file: - * specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/stable/2022-10-27/examples/ - * AppliancesPatch.json + * x-ms-original-file: 2025-03-01-preview/AppliancesPatch.json */ /** * Sample code: Update Appliance. diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceCredentialKubeconfigTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceCredentialKubeconfigTests.java index 891e42c3ad3a..4b0fe7ea2c78 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceCredentialKubeconfigTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceCredentialKubeconfigTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -11,13 +11,7 @@ public final class ApplianceCredentialKubeconfigTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplianceCredentialKubeconfig model - = BinaryData.fromString("{\"name\":\"clusterCustomerUser\",\"value\":\"xinpmqnjaq\"}") + = BinaryData.fromString("{\"name\":\"clusterCustomerUser\",\"value\":\"yzkohdbihanuf\"}") .toObject(ApplianceCredentialKubeconfig.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceCredentialKubeconfig model = new ApplianceCredentialKubeconfig(); - model = BinaryData.fromObject(model).toObject(ApplianceCredentialKubeconfig.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationInnerTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationInnerTests.java index 407444e1ce43..dbf71b2cfe37 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationInnerTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -11,13 +11,7 @@ public final class ApplianceOperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplianceOperationInner model = BinaryData.fromString( - "{\"display\":{\"description\":\"gdf\",\"operation\":\"lzl\",\"provider\":\"xrifkwmrvkts\",\"resource\":\"nt\"},\"isDataAction\":false,\"name\":\"a\",\"origin\":\"ajpsquc\"}") + "{\"display\":{\"description\":\"yqrimzin\",\"operation\":\"swjdkirso\",\"provider\":\"qxhcrmn\",\"resource\":\"jtckwhdso\"},\"isDataAction\":false,\"name\":\"i\",\"origin\":\"xsqwpgrjbznorc\"}") .toObject(ApplianceOperationInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceOperationInner model = new ApplianceOperationInner(); - model = BinaryData.fromObject(model).toObject(ApplianceOperationInner.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationValueDisplayTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationValueDisplayTests.java index a64047a42c9e..b2e519d7359b 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationValueDisplayTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationValueDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -12,13 +12,7 @@ public final class ApplianceOperationValueDisplayTests { public void testDeserialize() throws Exception { ApplianceOperationValueDisplay model = BinaryData .fromString( - "{\"description\":\"o\",\"operation\":\"dkfo\",\"provider\":\"nygj\",\"resource\":\"jddeqsrdeupewnw\"}") + "{\"description\":\"vsnb\",\"operation\":\"qabnmoc\",\"provider\":\"ysh\",\"resource\":\"zafb\"}") .toObject(ApplianceOperationValueDisplay.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceOperationValueDisplay model = new ApplianceOperationValueDisplay(); - model = BinaryData.fromObject(model).toObject(ApplianceOperationValueDisplay.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationsListTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationsListTests.java index 0e6ce3fd3a81..3249707bd58a 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationsListTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ApplianceOperationsListTests.java @@ -1,29 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.resourceconnector.fluent.models.ApplianceOperationInner; -import com.azure.resourcemanager.resourceconnector.models.ApplianceOperationsList; -import java.util.Arrays; +import com.azure.resourcemanager.resourceconnector.implementation.models.ApplianceOperationsList; import org.junit.jupiter.api.Assertions; public final class ApplianceOperationsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplianceOperationsList model = BinaryData.fromString( - "{\"nextLink\":\"mhquvgjxp\",\"value\":[{\"display\":{\"description\":\"m\",\"operation\":\"mtz\",\"provider\":\"bsphrupidgsybbe\",\"resource\":\"ph\"},\"isDataAction\":true,\"name\":\"sx\",\"origin\":\"bhdxbm\"},{\"display\":{\"description\":\"oqjzehtbmufpowno\",\"operation\":\"hwlrx\",\"provider\":\"qsoqijgkd\",\"resource\":\"pazlobcufpdz\"},\"isDataAction\":false,\"name\":\"cqqjnqglhqgn\",\"origin\":\"ooojywifsqe\"}]}") + "{\"value\":[{\"display\":{\"description\":\"lgbquxig\",\"operation\":\"jgzjaoyfhrtx\",\"provider\":\"n\",\"resource\":\"kujysvlejuvfq\"},\"isDataAction\":true,\"name\":\"yxwjkcp\",\"origin\":\"nwbxgjvtbvpyssz\"},{\"display\":{\"description\":\"uj\",\"operation\":\"uhmuouqfprwzwbn\",\"provider\":\"itnwuizgazxufi\",\"resource\":\"ckyfih\"},\"isDataAction\":false,\"name\":\"fvzwdzuhty\",\"origin\":\"isdkfthwxmnteiw\"},{\"display\":{\"description\":\"vkmijcmmxdcuf\",\"operation\":\"srp\",\"provider\":\"zidnsezcxtbzsgfy\",\"resource\":\"sne\"},\"isDataAction\":true,\"name\":\"z\",\"origin\":\"iachbo\"}],\"nextLink\":\"flnrosfqpteehzz\"}") .toObject(ApplianceOperationsList.class); - Assertions.assertEquals("mhquvgjxp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ApplianceOperationsList model = new ApplianceOperationsList().withNextLink("mhquvgjxp") - .withValue(Arrays.asList(new ApplianceOperationInner(), new ApplianceOperationInner())); - model = BinaryData.fromObject(model).toObject(ApplianceOperationsList.class); - Assertions.assertEquals("mhquvgjxp", model.nextLink()); + Assertions.assertEquals("flnrosfqpteehzz", model.nextLink()); } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancePropertiesInfrastructureConfigTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancePropertiesInfrastructureConfigTests.java index 70069d3ee650..a22c384950b4 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancePropertiesInfrastructureConfigTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancePropertiesInfrastructureConfigTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphWithResponseMockTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphWithResponseMockTests.java index 62beb52e0c8e..a17862f851bd 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphWithResponseMockTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesGetUpgradeGraphWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.resourceconnector.ResourceConnectorManager; import com.azure.resourcemanager.resourceconnector.models.UpgradeGraph; @@ -27,7 +27,7 @@ public void testGetUpgradeGraphWithResponse() throws Exception { ResourceConnectorManager manager = ResourceConnectorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); UpgradeGraph response = manager.appliances() .getUpgradeGraphWithResponse("m", "uhrzayvvt", "gvdfgiotkftutq", com.azure.core.util.Context.NONE) diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsMockTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsMockTests.java index 3631fb123b6c..f64cf373087d 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsMockTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/AppliancesListOperationsMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.resourceconnector.ResourceConnectorManager; import com.azure.resourcemanager.resourceconnector.models.ApplianceOperation; @@ -21,14 +21,14 @@ public final class AppliancesListOperationsMockTests { @Test public void testListOperations() throws Exception { String responseStr - = "{\"value\":[{\"display\":{\"description\":\"hwxmnteiwa\",\"operation\":\"vkmijcmmxdcuf\",\"provider\":\"srp\",\"resource\":\"zidnsezcxtbzsgfy\"},\"isDataAction\":false,\"name\":\"ewmdw\",\"origin\":\"eiachboosflnr\"}]}"; + = "{\"value\":[{\"display\":{\"description\":\"rvynhzgpph\",\"operation\":\"gyncocpecfvmmc\",\"provider\":\"fsxlzevgbmqjqa\",\"resource\":\"y\"},\"isDataAction\":true,\"name\":\"kwlzuvccfwnfn\",\"origin\":\"cfionl\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); ResourceConnectorManager manager = ResourceConnectorManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.appliances().listOperations(com.azure.core.util.Context.NONE); diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ArtifactProfileTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ArtifactProfileTests.java index 88dc11f772f5..f23a5167f55d 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ArtifactProfileTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ArtifactProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -11,12 +11,6 @@ public final class ArtifactProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ArtifactProfile model - = BinaryData.fromString("{\"endpoint\":\"ffdfdosygexpa\"}").toObject(ArtifactProfile.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ArtifactProfile model = new ArtifactProfile(); - model = BinaryData.fromObject(model).toObject(ArtifactProfile.class); + = BinaryData.fromString("{\"endpoint\":\"nyejhkryhtnap\"}").toObject(ArtifactProfile.class); } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/DnsConfigurationTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/DnsConfigurationTests.java new file mode 100644 index 000000000000..6194e9bca22b --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/DnsConfigurationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resourceconnector.models.DnsConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class DnsConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DnsConfiguration model + = BinaryData.fromString("{\"version\":\"qjnqglhqgnufoooj\"}").toObject(DnsConfiguration.class); + Assertions.assertEquals("qjnqglhqgnufoooj", model.version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DnsConfiguration model = new DnsConfiguration().withVersion("qjnqglhqgnufoooj"); + model = BinaryData.fromObject(model).toObject(DnsConfiguration.class); + Assertions.assertEquals("qjnqglhqgnufoooj", model.version()); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/GatewayConfigurationTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/GatewayConfigurationTests.java new file mode 100644 index 000000000000..1f06cedbd3d5 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/GatewayConfigurationTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resourceconnector.models.GatewayConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class GatewayConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + GatewayConfiguration model + = BinaryData.fromString("{\"version\":\"ifsqesaagdfmg\"}").toObject(GatewayConfiguration.class); + Assertions.assertEquals("ifsqesaagdfmg", model.version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + GatewayConfiguration model = new GatewayConfiguration().withVersion("ifsqesaagdfmg"); + model = BinaryData.fromObject(model).toObject(GatewayConfiguration.class); + Assertions.assertEquals("ifsqesaagdfmg", model.version()); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/IdentityTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/IdentityTests.java index a40dc2ae462b..5c7a3a7bfbcc 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/IdentityTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/IdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -12,16 +12,15 @@ public final class IdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Identity model - = BinaryData.fromString("{\"principalId\":\"bj\",\"tenantId\":\"a\",\"type\":\"SystemAssigned\"}") - .toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); + Identity model = BinaryData.fromString("{\"principalId\":\"lhjxr\",\"tenantId\":\"kwm\",\"type\":\"None\"}") + .toObject(Identity.class); + Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Identity model = new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED); + Identity model = new Identity().withType(ResourceIdentityType.NONE); model = BinaryData.fromObject(model).toObject(Identity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); + Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/NetworkProfileTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/NetworkProfileTests.java new file mode 100644 index 000000000000..c3d9ee4ce0e7 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/NetworkProfileTests.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resourceconnector.models.DnsConfiguration; +import com.azure.resourcemanager.resourceconnector.models.GatewayConfiguration; +import com.azure.resourcemanager.resourceconnector.models.NetworkProfile; +import com.azure.resourcemanager.resourceconnector.models.ProxyConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class NetworkProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkProfile model = BinaryData.fromString( + "{\"proxyConfiguration\":{\"version\":\"ownoizhw\"},\"dnsConfiguration\":{\"version\":\"ybqsoqijg\"},\"gatewayConfiguration\":{\"version\":\"bpazlobcufpdzn\"}}") + .toObject(NetworkProfile.class); + Assertions.assertEquals("ownoizhw", model.proxyConfiguration().version()); + Assertions.assertEquals("ybqsoqijg", model.dnsConfiguration().version()); + Assertions.assertEquals("bpazlobcufpdzn", model.gatewayConfiguration().version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + NetworkProfile model + = new NetworkProfile().withProxyConfiguration(new ProxyConfiguration().withVersion("ownoizhw")) + .withDnsConfiguration(new DnsConfiguration().withVersion("ybqsoqijg")) + .withGatewayConfiguration(new GatewayConfiguration().withVersion("bpazlobcufpdzn")); + model = BinaryData.fromObject(model).toObject(NetworkProfile.class); + Assertions.assertEquals("ownoizhw", model.proxyConfiguration().version()); + Assertions.assertEquals("ybqsoqijg", model.dnsConfiguration().version()); + Assertions.assertEquals("bpazlobcufpdzn", model.gatewayConfiguration().version()); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/PatchableApplianceTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/PatchableApplianceTests.java index 3d8a733aa18d..cb6edb74f6be 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/PatchableApplianceTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/PatchableApplianceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -14,15 +14,17 @@ public final class PatchableApplianceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PatchableAppliance model - = BinaryData.fromString("{\"tags\":{\"vd\":\"ybrk\"}}").toObject(PatchableAppliance.class); - Assertions.assertEquals("ybrk", model.tags().get("vd")); + = BinaryData.fromString("{\"tags\":{\"ajpsquc\":\"izntocipao\",\"gjofjd\":\"poyfdkfogkn\"}}") + .toObject(PatchableAppliance.class); + Assertions.assertEquals("izntocipao", model.tags().get("ajpsquc")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PatchableAppliance model = new PatchableAppliance().withTags(mapOf("vd", "ybrk")); + PatchableAppliance model + = new PatchableAppliance().withTags(mapOf("ajpsquc", "izntocipao", "gjofjd", "poyfdkfogkn")); model = BinaryData.fromObject(model).toObject(PatchableAppliance.class); - Assertions.assertEquals("ybrk", model.tags().get("vd")); + Assertions.assertEquals("izntocipao", model.tags().get("ajpsquc")); } // Use "Map.of" if available diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ProxyConfigurationTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ProxyConfigurationTests.java new file mode 100644 index 000000000000..06bfc0e212ba --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/ProxyConfigurationTests.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.resourceconnector.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.resourceconnector.models.ProxyConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class ProxyConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProxyConfiguration model = BinaryData.fromString("{\"version\":\"t\"}").toObject(ProxyConfiguration.class); + Assertions.assertEquals("t", model.version()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProxyConfiguration model = new ProxyConfiguration().withVersion("t"); + model = BinaryData.fromObject(model).toObject(ProxyConfiguration.class); + Assertions.assertEquals("t", model.version()); + } +} diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionDataTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionDataTests.java index f85692206130..232b74fc28a0 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionDataTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionDataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -10,14 +10,9 @@ public final class SupportedVersionCatalogVersionDataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SupportedVersionCatalogVersionData model = BinaryData.fromString( - "{\"audience\":\"itnwuizgazxufi\",\"catalog\":\"ckyfih\",\"offer\":\"idf\",\"version\":\"wdzuhtymwisd\"}") + SupportedVersionCatalogVersionData model = BinaryData + .fromString( + "{\"audience\":\"qw\",\"catalog\":\"mdgbbjfdd\",\"offer\":\"bmbexppbhtqqro\",\"version\":\"p\"}") .toObject(SupportedVersionCatalogVersionData.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedVersionCatalogVersionData model = new SupportedVersionCatalogVersionData(); - model = BinaryData.fromObject(model).toObject(SupportedVersionCatalogVersionData.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionTests.java index ba88cdc2bf3e..8a384bc5a343 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionCatalogVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -11,13 +11,7 @@ public final class SupportedVersionCatalogVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedVersionCatalogVersion model = BinaryData.fromString( - "{\"data\":{\"audience\":\"juvf\",\"catalog\":\"wrlyxwjkcprb\",\"offer\":\"b\",\"version\":\"jvtbvpyss\"},\"name\":\"nruj\",\"namespace\":\"uhmuouqfprwzwbn\"}") + "{\"data\":{\"audience\":\"zqqedq\",\"catalog\":\"bciqfouflm\",\"offer\":\"kzsmodm\",\"version\":\"ougpbkwt\"},\"name\":\"tduqktapspwgcuer\",\"namespace\":\"mkdo\"}") .toObject(SupportedVersionCatalogVersion.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedVersionCatalogVersion model = new SupportedVersionCatalogVersion(); - model = BinaryData.fromObject(model).toObject(SupportedVersionCatalogVersion.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionMetadataTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionMetadataTests.java index b171e30e9e99..46514154e6af 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionMetadataTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionMetadataTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -11,13 +11,7 @@ public final class SupportedVersionMetadataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedVersionMetadata model = BinaryData.fromString( - "{\"catalogVersion\":{\"data\":{\"audience\":\"bexppb\",\"catalog\":\"q\",\"offer\":\"ol\",\"version\":\"fpsalgbqu\"},\"name\":\"gjyjgzjaoyfhrtxi\",\"namespace\":\"erkujys\"}}") + "{\"catalogVersion\":{\"data\":{\"audience\":\"kbasyypn\",\"catalog\":\"hsgcbacphejkot\",\"offer\":\"qgoulznd\",\"version\":\"kwy\"},\"name\":\"gfgibm\",\"namespace\":\"gakeqsr\"}}") .toObject(SupportedVersionMetadata.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedVersionMetadata model = new SupportedVersionMetadata(); - model = BinaryData.fromObject(model).toObject(SupportedVersionMetadata.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionTests.java index 5595c8c22444..68ded7e8df20 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/SupportedVersionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -11,13 +11,7 @@ public final class SupportedVersionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedVersion model = BinaryData.fromString( - "{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"qedqytbciqfoufl\",\"catalog\":\"nkzsmodmglou\",\"offer\":\"b\",\"version\":\"tmut\"},\"name\":\"qktapspwgcuert\",\"namespace\":\"kdosvqw\"}},\"version\":\"mdgbbjfdd\"}") + "{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"tjelt\",\"catalog\":\"ldhugjzzdatqxh\",\"offer\":\"dgeablgphu\",\"version\":\"cndvkaozwyiftyhx\"},\"name\":\"rokft\",\"namespace\":\"olniwpwcukjf\"}},\"version\":\"iawxklry\"}") .toObject(SupportedVersion.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedVersion model = new SupportedVersion(); - model = BinaryData.fromObject(model).toObject(SupportedVersion.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphInnerTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphInnerTests.java index 9b1764bdb0f9..08f454ca3e98 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphInnerTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphInnerTests.java @@ -1,24 +1,17 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.resourceconnector.fluent.models.UpgradeGraphInner; -import com.azure.resourcemanager.resourceconnector.models.UpgradeGraphProperties; public final class UpgradeGraphInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpgradeGraphInner model = BinaryData.fromString( - "{\"id\":\"fsinzgvfcjrwzoxx\",\"name\":\"felluwfzitonpe\",\"properties\":{\"applianceVersion\":\"jkjlxofpdvhpfx\",\"supportedVersions\":[{\"metadata\":{\"catalogVersion\":{\"data\":{},\"name\":\"mayhuybbkpodepoo\",\"namespace\":\"nuvamiheogna\"}},\"version\":\"zxtheotusivyevcc\"}]}}") + "{\"id\":\"dmailzydehojw\",\"name\":\"huxinpmqnj\",\"properties\":{\"applianceVersion\":\"ixjsprozvcputeg\",\"supportedVersions\":[{\"metadata\":{\"catalogVersion\":{\"data\":{},\"name\":\"t\",\"namespace\":\"mdvpjhulsu\"}},\"version\":\"mkjozkrwf\"},{\"metadata\":{\"catalogVersion\":{\"data\":{},\"name\":\"jpslwejd\",\"namespace\":\"wryoqpsoacc\"}},\"version\":\"zakljlahbc\"},{\"metadata\":{\"catalogVersion\":{\"data\":{},\"name\":\"fdosyg\",\"namespace\":\"paojakhmsbzjh\"}},\"version\":\"zevdphlx\"},{\"metadata\":{\"catalogVersion\":{\"data\":{},\"name\":\"qtrgqjbpfzfsinzg\",\"namespace\":\"cjrwzoxxjtfellu\"}},\"version\":\"zitonpeqfpjkjl\"}]}}") .toObject(UpgradeGraphInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpgradeGraphInner model = new UpgradeGraphInner().withProperties(new UpgradeGraphProperties()); - model = BinaryData.fromObject(model).toObject(UpgradeGraphInner.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphPropertiesTests.java b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphPropertiesTests.java index 4227f6ed8ce3..e523ae3f9950 100644 --- a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphPropertiesTests.java +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/src/test/java/com/azure/resourcemanager/resourceconnector/generated/UpgradeGraphPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.resourceconnector.generated; @@ -11,13 +11,7 @@ public final class UpgradeGraphPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpgradeGraphProperties model = BinaryData.fromString( - "{\"applianceVersion\":\"ihnhun\",\"supportedVersions\":[{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"fygxgispemvtzfk\",\"catalog\":\"ubljofxqe\",\"offer\":\"jaeq\",\"version\":\"qjbasvms\"},\"name\":\"qulngsntnbybkzgc\",\"namespace\":\"wclxxwrl\"}},\"version\":\"ouskcqvkocrc\"},{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"nh\",\"catalog\":\"njbiksqrglssain\",\"offer\":\"jwnzlljfmp\",\"version\":\"ebvmgxsabkyqd\"},\"name\":\"jitcjczdzevn\",\"namespace\":\"krwpdap\"}},\"version\":\"sbdkvwr\"},{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"snhu\",\"catalog\":\"eltmrldhugjzzdat\",\"offer\":\"hocdgeab\",\"version\":\"phut\"},\"name\":\"ndv\",\"namespace\":\"ozwyiftyhxhuro\"}},\"version\":\"tyxolniwpwc\"},{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"giawx\",\"catalog\":\"ryplwckbasyypn\",\"offer\":\"hsgcbacphejkot\",\"version\":\"qgoulznd\"},\"name\":\"kwy\",\"namespace\":\"gfgibm\"}},\"version\":\"gakeqsr\"}]}") + "{\"applianceVersion\":\"fpdvhpfxxypi\",\"supportedVersions\":[{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"uybbkpodep\",\"catalog\":\"ginuvamih\",\"offer\":\"gnarxzxtheo\",\"version\":\"si\"},\"name\":\"evcciqihnhun\",\"namespace\":\"wjzrnfygxgisp\"}},\"version\":\"vtz\"},{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"bljofxqeof\",\"catalog\":\"e\",\"offer\":\"hqjbasvmsmj\",\"version\":\"lngsntnbybkzgcwr\"},\"name\":\"lxxwrljdouskc\",\"namespace\":\"kocrcjdkwtnhx\"}},\"version\":\"jbiksqrglssai\"},{\"metadata\":{\"catalogVersion\":{\"data\":{\"audience\":\"nzl\",\"catalog\":\"fmppe\",\"offer\":\"vmgxsab\",\"version\":\"qduujitcjczdz\"},\"name\":\"ndhkrw\",\"namespace\":\"appd\"}},\"version\":\"dkvwrwjfe\"}]}") .toObject(UpgradeGraphProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpgradeGraphProperties model = new UpgradeGraphProperties(); - model = BinaryData.fromObject(model).toObject(UpgradeGraphProperties.class); - } } diff --git a/sdk/resourceconnector/azure-resourcemanager-resourceconnector/tsp-location.yaml b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/tsp-location.yaml new file mode 100644 index 000000000000..40dd365b6497 --- /dev/null +++ b/sdk/resourceconnector/azure-resourcemanager-resourceconnector/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/resourceconnector/resource-manager/Microsoft.ResourceConnector/ResourceConnector +commit: c2d959beecc6e4fe6337792990c762988478aa97 +repo: Azure/azure-rest-api-specs +additionalDirectories: