diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/CHANGELOG.md b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/CHANGELOG.md index a49d74db2374..de0aa664addd 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/CHANGELOG.md +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/CHANGELOG.md @@ -1,14 +1,48 @@ # Release History -## 1.2.0-beta.2 (Unreleased) +## 1.2.0-beta.2 (2025-04-03) -### Features Added +- Azure Resource Manager Hybrid Connectivity client library for Java. This package contains Microsoft Azure SDK for Hybrid Connectivity Management SDK. REST API for public clouds. 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.PostResponse` was removed + +#### `models.SolutionConfiguration$Update` was modified + +* `withProperties(models.SolutionConfigurationProperties)` was removed + +#### `models.PublicCloudConnector$Update` was modified + +* `withProperties(models.PublicCloudConnectorProperties)` was removed + +#### `models.GenerateAwsTemplates` was modified + +* `models.PostResponse post(models.GenerateAwsTemplateRequest)` -> `models.GenerateAwsTemplateResponse post(models.GenerateAwsTemplateRequest)` + +### Features Added + +* `models.SolutionConfigurationUpdate` was added + +* `models.PublicCloudConnectorUpdate` was added + +* `models.GenerateAwsTemplateResponse` was added + +* `models.TrackedResourceUpdate` was added + +* `models.SolutionConfigurationPropertiesUpdate` was added + +* `models.AwsCloudProfileUpdate` was added + +* `models.PublicCloudConnectorPropertiesUpdate` was added + +#### `models.SolutionConfiguration$Update` was modified + +* `withProperties(models.SolutionConfigurationPropertiesUpdate)` was added + +#### `models.PublicCloudConnector$Update` was modified -### Other Changes +* `withProperties(models.PublicCloudConnectorPropertiesUpdate)` was added ## 1.2.0-beta.1 (2025-02-26) diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md index e11ba7bbfe98..6bd5fd237605 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md @@ -60,49 +60,45 @@ ### Endpoints_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridconnectivity.models.EndpointProperties; -import com.azure.resourcemanager.hybridconnectivity.models.Type; +import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeSettings; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** - * Samples for Endpoints CreateOrUpdate. + * Samples for GenerateAwsTemplate Post. */ -public final class EndpointsCreateOrUpdateSamples { +public final class GenerateAwsTemplatePostSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsPutCustom.json + * x-ms-original-file: 2024-12-01/GenerateAwsTemplate_Post.json */ /** - * Sample code: HybridConnectivityEndpointsPutCustom. + * Sample code: GenerateAwsTemplate_Post. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityEndpointsPutCustom( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .define("custom") - .withExistingResourceUri( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine") - .withProperties(new EndpointProperties().withType(Type.CUSTOM) - .withResourceId( - "/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace")) - .create(); + public static void + generateAwsTemplatePost(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.generateAwsTemplates() + .postWithResponse( + new GenerateAwsTemplateRequest().withConnectorId("pnxcfjidglabnwxit") + .withSolutionTypes(Arrays.asList(new SolutionTypeSettings().withSolutionType("hjyownzpfxwiufmd") + .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())))), + com.azure.core.util.Context.NONE); } - /* - * x-ms-original-file: 2024-12-01/EndpointsPutDefault.json - */ - /** - * Sample code: HybridConnectivityEndpointsPutDefault. - * - * @param manager Entry point to HybridConnectivityManager. - */ - public static void hybridConnectivityEndpointsPutDefault( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .define("default") - .withExistingResourceUri( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine") - .withProperties(new EndpointProperties().withType(Type.DEFAULT)) - .create(); + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -111,23 +107,20 @@ public final class EndpointsCreateOrUpdateSamples { ```java /** - * Samples for Endpoints Delete. + * Samples for SolutionConfigurations Get. */ -public final class EndpointsDeleteSamples { +public final class SolutionConfigurationsGetSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsDeleteDefault.json + * x-ms-original-file: 2024-12-01/SolutionConfigurations_Get.json */ /** - * Sample code: HybridConnectivityEndpointsDeleteDefault. + * Sample code: SolutionConfigurations_Get. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityEndpointsDeleteDefault( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .deleteByResourceGroupWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", - "default", com.azure.core.util.Context.NONE); + public static void + solutionConfigurationsGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.solutionConfigurations().getWithResponse("ymuj", "tks", com.azure.core.util.Context.NONE); } } ``` @@ -136,39 +129,23 @@ public final class EndpointsDeleteSamples { ```java /** - * Samples for Endpoints Get. + * Samples for Endpoints List. */ -public final class EndpointsGetSamples { - /* - * x-ms-original-file: 2024-12-01/EndpointsGetDefault.json - */ - /** - * Sample code: HybridConnectivityEndpointsGetDefault. - * - * @param manager Entry point to HybridConnectivityManager. - */ - public static void hybridConnectivityEndpointsGetDefault( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .getWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", - "default", com.azure.core.util.Context.NONE); - } - +public final class EndpointsListSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsGetCustom.json + * x-ms-original-file: 2024-12-01/EndpointsList.json */ /** - * Sample code: HybridConnectivityEndpointsGetCustom. + * Sample code: HybridConnectivityEndpointsGet. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityEndpointsGetCustom( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + public static void + hybridConnectivityEndpointsGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { manager.endpoints() - .getWithResponse( + .list( "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", - "custom", com.azure.core.util.Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -177,23 +154,20 @@ public final class EndpointsGetSamples { ```java /** - * Samples for Endpoints List. + * Samples for SolutionTypes ListByResourceGroup. */ -public final class EndpointsListSamples { +public final class SolutionTypesListByResourceGroupSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsList.json + * x-ms-original-file: 2024-12-01/SolutionTypes_ListByResourceGroup.json */ /** - * Sample code: HybridConnectivityEndpointsGet. + * Sample code: SolutionTypes_ListByResourceGroup. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - hybridConnectivityEndpointsGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .list( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", - com.azure.core.util.Context.NONE); + public static void solutionTypesListByResourceGroup( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.solutionTypes().listByResourceGroup("rgpublicCloud", com.azure.core.util.Context.NONE); } } ``` @@ -201,28 +175,43 @@ public final class EndpointsListSamples { ### Endpoints_ListCredentials ```java -import com.azure.resourcemanager.hybridconnectivity.models.ListCredentialsRequest; -import com.azure.resourcemanager.hybridconnectivity.models.ServiceName; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationProperties; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; +import java.util.HashMap; +import java.util.Map; /** - * Samples for Endpoints ListCredentials. + * Samples for SolutionConfigurations CreateOrUpdate. */ -public final class EndpointsListCredentialsSamples { +public final class SolutionConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsPostListCredentials.json + * x-ms-original-file: 2024-12-01/SolutionConfigurations_CreateOrUpdate.json */ /** - * Sample code: HybridConnectivityEndpointsPostListCredentials. + * Sample code: SolutionConfigurations_CreateOrUpdate. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityEndpointsPostListCredentials( + public static void solutionConfigurationsCreateOrUpdate( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .listCredentialsWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", - "default", 10800L, new ListCredentialsRequest().withServiceName(ServiceName.SSH), - com.azure.core.util.Context.NONE); + manager.solutionConfigurations() + .define("keebwujt") + .withExistingResourceUri("ymuj") + .withProperties(new SolutionConfigurationProperties().withSolutionType("nmtqllkyohwtsthxaimsye") + .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` @@ -230,25 +219,21 @@ public final class EndpointsListCredentialsSamples { ### Endpoints_ListIngressGatewayCredentials ```java - /** - * Samples for Endpoints ListIngressGatewayCredentials. + * Samples for SolutionTypes List. */ -public final class EndpointsListIngressGatewayCredentialsSamples { +public final class SolutionTypesListSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsPostListIngressGatewayCredentials.json + * x-ms-original-file: 2024-12-01/SolutionTypes_ListBySubscription.json */ /** - * Sample code: HybridConnectivityEndpointsPostListIngressGatewayCredentials. + * Sample code: SolutionTypes_ListBySubscription. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityEndpointsPostListIngressGatewayCredentials( + public static void solutionTypesListBySubscription( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .listIngressGatewayCredentialsWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/arcGroup/providers/Microsoft.ArcPlaceHolder/ProvisionedClusters/cluster0", - "default", 10800L, null, com.azure.core.util.Context.NONE); + manager.solutionTypes().list(com.azure.core.util.Context.NONE); } } ``` @@ -256,31 +241,21 @@ public final class EndpointsListIngressGatewayCredentialsSamples { ### Endpoints_ListManagedProxyDetails ```java -import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest; -import com.azure.resourcemanager.hybridconnectivity.models.ServiceName; - /** - * Samples for Endpoints ListManagedProxyDetails. + * Samples for Inventory ListBySolutionConfiguration. */ -public final class EndpointsListManagedProxyDetailsSamples { +public final class InventoryListBySolutionConfigurationSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsPostListManagedProxyDetails.json + * x-ms-original-file: 2024-12-01/Inventory_ListBySolutionConfiguration.json */ /** - * Sample code: HybridConnectivityEndpointsPostListManagedProxyDetails. + * Sample code: Inventory_ListBySolutionConfiguration. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityEndpointsPostListManagedProxyDetails( + public static void inventoryListBySolutionConfiguration( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.endpoints() - .listManagedProxyDetailsWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/arcGroup/providers/Microsoft.Compute/virtualMachines/vm00006", - "default", - new ManagedProxyRequest().withService("127.0.0.1:65035") - .withHostname("r.proxy.arc.com") - .withServiceName(ServiceName.WAC), - com.azure.core.util.Context.NONE); + manager.inventories().listBySolutionConfiguration("ymuj", "wsxt", com.azure.core.util.Context.NONE); } } ``` @@ -288,30 +263,23 @@ public final class EndpointsListManagedProxyDetailsSamples { ### Endpoints_Update ```java -import com.azure.resourcemanager.hybridconnectivity.models.EndpointProperties; -import com.azure.resourcemanager.hybridconnectivity.models.EndpointResource; -import com.azure.resourcemanager.hybridconnectivity.models.Type; - /** - * Samples for Endpoints Update. + * Samples for PublicCloudConnectors Delete. */ -public final class EndpointsUpdateSamples { +public final class PublicCloudConnectorsDeleteSamples { /* - * x-ms-original-file: 2024-12-01/EndpointsPatchDefault.json + * x-ms-original-file: 2024-12-01/PublicCloudConnectors_Delete.json */ /** - * Sample code: HybridConnectivityEndpointsPatchDefault. + * Sample code: PublicCloudConnectors_Delete. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityEndpointsPatchDefault( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - EndpointResource resource = manager.endpoints() - .getWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", - "default", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withProperties(new EndpointProperties().withType(Type.DEFAULT)).apply(); + public static void + publicCloudConnectorsDelete(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.publicCloudConnectors() + .deleteByResourceGroupWithResponse("rgpublicCloud", "skcfyjvflkhibdywjay", + com.azure.core.util.Context.NONE); } } ``` @@ -319,45 +287,50 @@ public final class EndpointsUpdateSamples { ### GenerateAwsTemplate_Post ```java -import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest; -import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; -import com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.hybridconnectivity.models.ServiceName; /** - * Samples for GenerateAwsTemplate Post. + * Samples for ServiceConfigurations CreateOrupdate. */ -public final class GenerateAwsTemplatePostSamples { +public final class ServiceConfigurationsCreateOrupdateSamples { /* - * x-ms-original-file: 2024-12-01/GenerateAwsTemplate_Post.json + * x-ms-original-file: 2024-12-01/ServiceConfigurationsPutWAC.json */ /** - * Sample code: GenerateAwsTemplate_Post. + * Sample code: ServiceConfigurationsPutWAC. * * @param manager Entry point to HybridConnectivityManager. */ public static void - generateAwsTemplatePost(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.generateAwsTemplates() - .postWithResponse( - new GenerateAwsTemplateRequest().withConnectorId("pnxcfjidglabnwxit") - .withSolutionTypes(Arrays.asList(new SolutionTypeSettings().withSolutionType("hjyownzpfxwiufmd") - .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())))), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + serviceConfigurationsPutWAC(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.serviceConfigurations() + .define("WAC") + .withExistingEndpoint( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", + "default") + .withServiceName(ServiceName.WAC) + .withPort(6516L) + .create(); + } + + /* + * x-ms-original-file: 2024-12-01/ServiceConfigurationsPutSSH.json + */ + /** + * Sample code: ServiceConfigurationsPutSSH. + * + * @param manager Entry point to HybridConnectivityManager. + */ + public static void + serviceConfigurationsPutSSH(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.serviceConfigurations() + .define("SSH") + .withExistingEndpoint( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", + "default") + .withServiceName(ServiceName.SSH) + .withPort(22L) + .create(); } } ``` @@ -366,20 +339,23 @@ public final class GenerateAwsTemplatePostSamples { ```java /** - * Samples for Inventory Get. + * Samples for Endpoints Delete. */ -public final class InventoryGetSamples { +public final class EndpointsDeleteSamples { /* - * x-ms-original-file: 2024-12-01/Inventory_Get.json + * x-ms-original-file: 2024-12-01/EndpointsDeleteDefault.json */ /** - * Sample code: Inventory_Get. + * Sample code: HybridConnectivityEndpointsDeleteDefault. * * @param manager Entry point to HybridConnectivityManager. */ - public static void inventoryGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.inventories() - .getWithResponse("ymuj", "zarfsraogroxlaqjjnwixtn", "xofprmcboosrbd", com.azure.core.util.Context.NONE); + public static void hybridConnectivityEndpointsDeleteDefault( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.endpoints() + .deleteByResourceGroupWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", + "default", com.azure.core.util.Context.NONE); } } ``` @@ -387,21 +363,25 @@ public final class InventoryGetSamples { ### Inventory_ListBySolutionConfiguration ```java + /** - * Samples for Inventory ListBySolutionConfiguration. + * Samples for Endpoints ListIngressGatewayCredentials. */ -public final class InventoryListBySolutionConfigurationSamples { +public final class EndpointsListIngressGatewayCredentialsSamples { /* - * x-ms-original-file: 2024-12-01/Inventory_ListBySolutionConfiguration.json + * x-ms-original-file: 2024-12-01/EndpointsPostListIngressGatewayCredentials.json */ /** - * Sample code: Inventory_ListBySolutionConfiguration. + * Sample code: HybridConnectivityEndpointsPostListIngressGatewayCredentials. * * @param manager Entry point to HybridConnectivityManager. */ - public static void inventoryListBySolutionConfiguration( + public static void hybridConnectivityEndpointsPostListIngressGatewayCredentials( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.inventories().listBySolutionConfiguration("ymuj", "wsxt", com.azure.core.util.Context.NONE); + manager.endpoints() + .listIngressGatewayCredentialsWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/arcGroup/providers/Microsoft.ArcPlaceHolder/ProvisionedClusters/cluster0", + "default", 10800L, null, com.azure.core.util.Context.NONE); } } ``` @@ -410,20 +390,21 @@ public final class InventoryListBySolutionConfigurationSamples { ```java /** - * Samples for Operations List. + * Samples for PublicCloudConnectors TestPermissions. */ -public final class OperationsListSamples { +public final class PublicCloudConnectorsTestPermissionsSamples { /* - * x-ms-original-file: 2024-12-01/OperationsList.json + * x-ms-original-file: 2024-12-01/PublicCloudConnectors_TestPermissions.json */ /** - * Sample code: HybridConnectivityOperationsList. + * Sample code: PublicCloudConnectors_TestPermissions. * * @param manager Entry point to HybridConnectivityManager. */ - public static void hybridConnectivityOperationsList( + public static void publicCloudConnectorsTestPermissions( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); + manager.publicCloudConnectors() + .testPermissions("rgpublicCloud", "rzygvnpsnrdylwzdbsscjazvamyxmh", com.azure.core.util.Context.NONE); } } ``` @@ -431,38 +412,74 @@ public final class OperationsListSamples { ### PublicCloudConnectors_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfile; -import com.azure.resourcemanager.hybridconnectivity.models.HostType; -import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorProperties; -import java.util.Arrays; +/** + * Samples for ServiceConfigurations Get. + */ +public final class ServiceConfigurationsGetSamples { + /* + * x-ms-original-file: 2024-12-01/ServiceConfigurationsGetWAC.json + */ + /** + * Sample code: HybridConnectivityEndpointsServiceconfigurationsGetWAC. + * + * @param manager Entry point to HybridConnectivityManager. + */ + public static void hybridConnectivityEndpointsServiceconfigurationsGetWAC( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.serviceConfigurations() + .getWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", + "default", "WAC", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2024-12-01/ServiceConfigurationsGetSSH.json + */ + /** + * Sample code: HybridConnectivityEndpointsServiceconfigurationsGetSSH. + * + * @param manager Entry point to HybridConnectivityManager. + */ + public static void hybridConnectivityEndpointsServiceconfigurationsGetSSH( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.serviceConfigurations() + .getWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", + "default", "SSH", com.azure.core.util.Context.NONE); + } +} +``` + +### PublicCloudConnectors_Delete + +```java +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfiguration; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationPropertiesUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; import java.util.HashMap; import java.util.Map; /** - * Samples for PublicCloudConnectors CreateOrUpdate. + * Samples for SolutionConfigurations Update. */ -public final class PublicCloudConnectorsCreateOrUpdateSamples { +public final class SolutionConfigurationsUpdateSamples { /* - * x-ms-original-file: 2024-12-01/PublicCloudConnectors_CreateOrUpdate.json + * x-ms-original-file: 2024-12-01/SolutionConfigurations_Update.json */ /** - * Sample code: PublicCloudConnectors_CreateOrUpdate. + * Sample code: SolutionConfigurations_Update. * * @param manager Entry point to HybridConnectivityManager. */ - public static void publicCloudConnectorsCreateOrUpdate( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.publicCloudConnectors() - .define("advjwoakdusalamomg") - .withRegion("jpiglusfxynfcewcjwvvnn") - .withExistingResourceGroup("rgpublicCloud") - .withTags(mapOf()) - .withProperties(new PublicCloudConnectorProperties() - .withAwsCloudProfile(new AwsCloudProfile().withAccountId("snbnuxckevyqpm") - .withExcludedAccounts(Arrays.asList("rwgqpukglvbqmogqcliqolucp")) - .withIsOrganizationalAccount(true)) - .withHostType(HostType.AWS)) - .create(); + public static void + solutionConfigurationsUpdate(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + SolutionConfiguration resource = manager.solutionConfigurations() + .getWithResponse("ymuj", "dxt", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withProperties(new SolutionConfigurationPropertiesUpdate().withSolutionType("myzljlstvmgkp") + .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))) + .apply(); } // Use "Map.of" if available @@ -479,368 +496,384 @@ public final class PublicCloudConnectorsCreateOrUpdateSamples { } ``` -### PublicCloudConnectors_Delete +### PublicCloudConnectors_GetByResourceGroup ```java /** - * Samples for PublicCloudConnectors Delete. + * Samples for ServiceConfigurations ListByEndpointResource. */ -public final class PublicCloudConnectorsDeleteSamples { +public final class ServiceConfigurationsListByEndpointResourceSamples { /* - * x-ms-original-file: 2024-12-01/PublicCloudConnectors_Delete.json + * x-ms-original-file: 2024-12-01/ServiceConfigurationsList.json */ /** - * Sample code: PublicCloudConnectors_Delete. + * Sample code: GetClustersExample. * * @param manager Entry point to HybridConnectivityManager. */ public static void - publicCloudConnectorsDelete(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.publicCloudConnectors() - .deleteByResourceGroupWithResponse("rgpublicCloud", "skcfyjvflkhibdywjay", - com.azure.core.util.Context.NONE); + getClustersExample(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.serviceConfigurations() + .listByEndpointResource( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", + "default", com.azure.core.util.Context.NONE); } } ``` -### PublicCloudConnectors_GetByResourceGroup +### PublicCloudConnectors_List ```java /** - * Samples for PublicCloudConnectors GetByResourceGroup. + * Samples for SolutionConfigurations List. */ -public final class PublicCloudConnectorsGetByResourceGroupSamples { +public final class SolutionConfigurationsListSamples { /* - * x-ms-original-file: 2024-12-01/PublicCloudConnectors_Get.json + * x-ms-original-file: 2024-12-01/SolutionConfigurations_List.json */ /** - * Sample code: PublicCloudConnectors_Get. + * Sample code: SolutionConfigurations_List. * * @param manager Entry point to HybridConnectivityManager. */ public static void - publicCloudConnectorsGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.publicCloudConnectors() - .getByResourceGroupWithResponse("rgpublicCloud", "rzygvnpsnrdylwzdbsscjazvamyxmh", - com.azure.core.util.Context.NONE); + solutionConfigurationsList(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.solutionConfigurations().list("ymuj", com.azure.core.util.Context.NONE); } } ``` -### PublicCloudConnectors_List +### PublicCloudConnectors_ListByResourceGroup ```java +import com.azure.resourcemanager.hybridconnectivity.models.ManagedProxyRequest; +import com.azure.resourcemanager.hybridconnectivity.models.ServiceName; + /** - * Samples for PublicCloudConnectors List. + * Samples for Endpoints ListManagedProxyDetails. */ -public final class PublicCloudConnectorsListSamples { +public final class EndpointsListManagedProxyDetailsSamples { /* - * x-ms-original-file: 2024-12-01/PublicCloudConnectors_ListBySubscription.json + * x-ms-original-file: 2024-12-01/EndpointsPostListManagedProxyDetails.json */ /** - * Sample code: PublicCloudConnectors_ListBySubscription. + * Sample code: HybridConnectivityEndpointsPostListManagedProxyDetails. * * @param manager Entry point to HybridConnectivityManager. */ - public static void publicCloudConnectorsListBySubscription( + public static void hybridConnectivityEndpointsPostListManagedProxyDetails( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.publicCloudConnectors().list(com.azure.core.util.Context.NONE); + manager.endpoints() + .listManagedProxyDetailsWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/arcGroup/providers/Microsoft.Compute/virtualMachines/vm00006", + "default", + new ManagedProxyRequest().withService("127.0.0.1:65035") + .withHostname("r.proxy.arc.com") + .withServiceName(ServiceName.WAC), + com.azure.core.util.Context.NONE); } } ``` -### PublicCloudConnectors_ListByResourceGroup +### PublicCloudConnectors_TestPermissions ```java +import com.azure.resourcemanager.hybridconnectivity.models.ServiceConfigurationResource; + /** - * Samples for PublicCloudConnectors ListByResourceGroup. + * Samples for ServiceConfigurations Update. */ -public final class PublicCloudConnectorsListByResourceGroupSamples { +public final class ServiceConfigurationsUpdateSamples { /* - * x-ms-original-file: 2024-12-01/PublicCloudConnectors_ListByResourceGroup.json + * x-ms-original-file: 2024-12-01/ServiceConfigurationsPatchSSH.json */ /** - * Sample code: PublicCloudConnectors_ListByResourceGroup. + * Sample code: ServiceConfigurationsPatchSSH. * * @param manager Entry point to HybridConnectivityManager. */ - public static void publicCloudConnectorsListByResourceGroup( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.publicCloudConnectors().listByResourceGroup("rgpublicCloud", com.azure.core.util.Context.NONE); + public static void + serviceConfigurationsPatchSSH(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + ServiceConfigurationResource resource = manager.serviceConfigurations() + .getWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", + "default", "SSH", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withPort(22L).apply(); } } ``` -### PublicCloudConnectors_TestPermissions +### PublicCloudConnectors_Update ```java /** - * Samples for PublicCloudConnectors TestPermissions. + * Samples for Endpoints Get. */ -public final class PublicCloudConnectorsTestPermissionsSamples { +public final class EndpointsGetSamples { /* - * x-ms-original-file: 2024-12-01/PublicCloudConnectors_TestPermissions.json + * x-ms-original-file: 2024-12-01/EndpointsGetDefault.json */ /** - * Sample code: PublicCloudConnectors_TestPermissions. + * Sample code: HybridConnectivityEndpointsGetDefault. * * @param manager Entry point to HybridConnectivityManager. */ - public static void publicCloudConnectorsTestPermissions( + public static void hybridConnectivityEndpointsGetDefault( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.publicCloudConnectors() - .testPermissions("rgpublicCloud", "rzygvnpsnrdylwzdbsscjazvamyxmh", com.azure.core.util.Context.NONE); + manager.endpoints() + .getWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", + "default", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: 2024-12-01/EndpointsGetCustom.json + */ + /** + * Sample code: HybridConnectivityEndpointsGetCustom. + * + * @param manager Entry point to HybridConnectivityManager. + */ + public static void hybridConnectivityEndpointsGetCustom( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.endpoints() + .getWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", + "custom", com.azure.core.util.Context.NONE); } } ``` -### PublicCloudConnectors_Update +### ServiceConfigurations_CreateOrupdate ```java -import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfile; -import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnector; -import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for PublicCloudConnectors Update. + * Samples for PublicCloudConnectors ListByResourceGroup. */ -public final class PublicCloudConnectorsUpdateSamples { +public final class PublicCloudConnectorsListByResourceGroupSamples { /* - * x-ms-original-file: 2024-12-01/PublicCloudConnectors_Update.json + * x-ms-original-file: 2024-12-01/PublicCloudConnectors_ListByResourceGroup.json */ /** - * Sample code: PublicCloudConnectors_Update. + * Sample code: PublicCloudConnectors_ListByResourceGroup. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - publicCloudConnectorsUpdate(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - PublicCloudConnector resource = manager.publicCloudConnectors() - .getByResourceGroupWithResponse("rgpublicCloud", "svtirlbyqpepbzyessjenlueeznhg", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withProperties(new PublicCloudConnectorProperties() - .withAwsCloudProfile(new AwsCloudProfile().withExcludedAccounts(Arrays.asList("zrbtd")))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void publicCloudConnectorsListByResourceGroup( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.publicCloudConnectors().listByResourceGroup("rgpublicCloud", com.azure.core.util.Context.NONE); } } ``` -### ServiceConfigurations_CreateOrupdate +### ServiceConfigurations_Delete ```java -import com.azure.resourcemanager.hybridconnectivity.models.ServiceName; +import com.azure.resourcemanager.hybridconnectivity.models.EndpointProperties; +import com.azure.resourcemanager.hybridconnectivity.models.Type; /** - * Samples for ServiceConfigurations CreateOrupdate. + * Samples for Endpoints CreateOrUpdate. */ -public final class ServiceConfigurationsCreateOrupdateSamples { +public final class EndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-12-01/ServiceConfigurationsPutWAC.json + * x-ms-original-file: 2024-12-01/EndpointsPutCustom.json */ /** - * Sample code: ServiceConfigurationsPutWAC. + * Sample code: HybridConnectivityEndpointsPutCustom. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - serviceConfigurationsPutWAC(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.serviceConfigurations() - .define("WAC") - .withExistingEndpoint( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", - "default") - .withServiceName(ServiceName.WAC) - .withPort(6516L) + public static void hybridConnectivityEndpointsPutCustom( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.endpoints() + .define("custom") + .withExistingResourceUri( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine") + .withProperties(new EndpointProperties().withType(Type.CUSTOM) + .withResourceId( + "/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace")) .create(); } /* - * x-ms-original-file: 2024-12-01/ServiceConfigurationsPutSSH.json + * x-ms-original-file: 2024-12-01/EndpointsPutDefault.json */ /** - * Sample code: ServiceConfigurationsPutSSH. + * Sample code: HybridConnectivityEndpointsPutDefault. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - serviceConfigurationsPutSSH(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.serviceConfigurations() - .define("SSH") - .withExistingEndpoint( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", - "default") - .withServiceName(ServiceName.SSH) - .withPort(22L) + public static void hybridConnectivityEndpointsPutDefault( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.endpoints() + .define("default") + .withExistingResourceUri( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine") + .withProperties(new EndpointProperties().withType(Type.DEFAULT)) .create(); } } ``` -### ServiceConfigurations_Delete +### ServiceConfigurations_Get ```java /** - * Samples for ServiceConfigurations Delete. + * Samples for SolutionTypes GetByResourceGroup. */ -public final class ServiceConfigurationsDeleteSamples { +public final class SolutionTypesGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-12-01/ServiceConfigurationsDeleteSSH.json + * x-ms-original-file: 2024-12-01/SolutionTypes_Get.json */ /** - * Sample code: ServiceConfigurationsDeleteSSH. + * Sample code: SolutionTypes_Get. * * @param manager Entry point to HybridConnectivityManager. */ public static void - serviceConfigurationsDeleteSSH(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.serviceConfigurations() - .deleteWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", - "default", "SSH", com.azure.core.util.Context.NONE); + solutionTypesGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.solutionTypes() + .getByResourceGroupWithResponse("rgpublicCloud", "lulzqllpu", com.azure.core.util.Context.NONE); } } ``` -### ServiceConfigurations_Get +### ServiceConfigurations_ListByEndpointResource ```java +import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfileUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnector; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorPropertiesUpdate; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + /** - * Samples for ServiceConfigurations Get. + * Samples for PublicCloudConnectors Update. */ -public final class ServiceConfigurationsGetSamples { - /* - * x-ms-original-file: 2024-12-01/ServiceConfigurationsGetWAC.json - */ - /** - * Sample code: HybridConnectivityEndpointsServiceconfigurationsGetWAC. - * - * @param manager Entry point to HybridConnectivityManager. - */ - public static void hybridConnectivityEndpointsServiceconfigurationsGetWAC( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.serviceConfigurations() - .getWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", - "default", "WAC", com.azure.core.util.Context.NONE); - } - +public final class PublicCloudConnectorsUpdateSamples { /* - * x-ms-original-file: 2024-12-01/ServiceConfigurationsGetSSH.json + * x-ms-original-file: 2024-12-01/PublicCloudConnectors_Update.json */ /** - * Sample code: HybridConnectivityEndpointsServiceconfigurationsGetSSH. + * Sample code: PublicCloudConnectors_Update. * * @param manager Entry point to HybridConnectivityManager. - */ - public static void hybridConnectivityEndpointsServiceconfigurationsGetSSH( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.serviceConfigurations() - .getWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", - "default", "SSH", com.azure.core.util.Context.NONE); + */ + public static void + publicCloudConnectorsUpdate(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + PublicCloudConnector resource = manager.publicCloudConnectors() + .getByResourceGroupWithResponse("rgpublicCloud", "svtirlbyqpepbzyessjenlueeznhg", + com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf()) + .withProperties(new PublicCloudConnectorPropertiesUpdate() + .withAwsCloudProfile(new AwsCloudProfileUpdate().withExcludedAccounts(Arrays.asList("zrbtd")))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### ServiceConfigurations_ListByEndpointResource +### ServiceConfigurations_Update ```java +import com.azure.resourcemanager.hybridconnectivity.models.ListCredentialsRequest; +import com.azure.resourcemanager.hybridconnectivity.models.ServiceName; + /** - * Samples for ServiceConfigurations ListByEndpointResource. + * Samples for Endpoints ListCredentials. */ -public final class ServiceConfigurationsListByEndpointResourceSamples { +public final class EndpointsListCredentialsSamples { /* - * x-ms-original-file: 2024-12-01/ServiceConfigurationsList.json + * x-ms-original-file: 2024-12-01/EndpointsPostListCredentials.json */ /** - * Sample code: GetClustersExample. + * Sample code: HybridConnectivityEndpointsPostListCredentials. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - getClustersExample(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.serviceConfigurations() - .listByEndpointResource( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", - "default", com.azure.core.util.Context.NONE); + public static void hybridConnectivityEndpointsPostListCredentials( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.endpoints() + .listCredentialsWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", + "default", 10800L, new ListCredentialsRequest().withServiceName(ServiceName.SSH), + com.azure.core.util.Context.NONE); } } ``` -### ServiceConfigurations_Update +### SolutionConfigurations_CreateOrUpdate ```java -import com.azure.resourcemanager.hybridconnectivity.models.ServiceConfigurationResource; - /** - * Samples for ServiceConfigurations Update. + * Samples for PublicCloudConnectors List. */ -public final class ServiceConfigurationsUpdateSamples { +public final class PublicCloudConnectorsListSamples { /* - * x-ms-original-file: 2024-12-01/ServiceConfigurationsPatchSSH.json + * x-ms-original-file: 2024-12-01/PublicCloudConnectors_ListBySubscription.json */ /** - * Sample code: ServiceConfigurationsPatchSSH. + * Sample code: PublicCloudConnectors_ListBySubscription. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - serviceConfigurationsPatchSSH(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - ServiceConfigurationResource resource = manager.serviceConfigurations() - .getWithResponse( - "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", - "default", "SSH", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withPort(22L).apply(); + public static void publicCloudConnectorsListBySubscription( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.publicCloudConnectors().list(com.azure.core.util.Context.NONE); } } ``` -### SolutionConfigurations_CreateOrUpdate +### SolutionConfigurations_Delete ```java -import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationProperties; -import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; +import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfile; +import com.azure.resourcemanager.hybridconnectivity.models.HostType; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorProperties; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; /** - * Samples for SolutionConfigurations CreateOrUpdate. + * Samples for PublicCloudConnectors CreateOrUpdate. */ -public final class SolutionConfigurationsCreateOrUpdateSamples { +public final class PublicCloudConnectorsCreateOrUpdateSamples { /* - * x-ms-original-file: 2024-12-01/SolutionConfigurations_CreateOrUpdate.json + * x-ms-original-file: 2024-12-01/PublicCloudConnectors_CreateOrUpdate.json */ /** - * Sample code: SolutionConfigurations_CreateOrUpdate. + * Sample code: PublicCloudConnectors_CreateOrUpdate. * * @param manager Entry point to HybridConnectivityManager. */ - public static void solutionConfigurationsCreateOrUpdate( + public static void publicCloudConnectorsCreateOrUpdate( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionConfigurations() - .define("keebwujt") - .withExistingResourceUri("ymuj") - .withProperties(new SolutionConfigurationProperties().withSolutionType("nmtqllkyohwtsthxaimsye") - .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))) + manager.publicCloudConnectors() + .define("advjwoakdusalamomg") + .withRegion("jpiglusfxynfcewcjwvvnn") + .withExistingResourceGroup("rgpublicCloud") + .withTags(mapOf()) + .withProperties(new PublicCloudConnectorProperties() + .withAwsCloudProfile(new AwsCloudProfile().withAccountId("snbnuxckevyqpm") + .withExcludedAccounts(Arrays.asList("rwgqpukglvbqmogqcliqolucp")) + .withIsOrganizationalAccount(true)) + .withHostType(HostType.AWS)) .create(); } @@ -858,47 +891,33 @@ public final class SolutionConfigurationsCreateOrUpdateSamples { } ``` -### SolutionConfigurations_Delete - -```java -/** - * Samples for SolutionConfigurations Delete. - */ -public final class SolutionConfigurationsDeleteSamples { - /* - * x-ms-original-file: 2024-12-01/SolutionConfigurations_Delete.json - */ - /** - * Sample code: SolutionConfigurations_Delete. - * - * @param manager Entry point to HybridConnectivityManager. - */ - public static void - solutionConfigurationsDelete(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionConfigurations() - .deleteByResourceGroupWithResponse("ymuj", "stu", com.azure.core.util.Context.NONE); - } -} -``` - ### SolutionConfigurations_Get ```java +import com.azure.resourcemanager.hybridconnectivity.models.EndpointProperties; +import com.azure.resourcemanager.hybridconnectivity.models.EndpointResource; +import com.azure.resourcemanager.hybridconnectivity.models.Type; + /** - * Samples for SolutionConfigurations Get. + * Samples for Endpoints Update. */ -public final class SolutionConfigurationsGetSamples { +public final class EndpointsUpdateSamples { /* - * x-ms-original-file: 2024-12-01/SolutionConfigurations_Get.json + * x-ms-original-file: 2024-12-01/EndpointsPatchDefault.json */ /** - * Sample code: SolutionConfigurations_Get. + * Sample code: HybridConnectivityEndpointsPatchDefault. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - solutionConfigurationsGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionConfigurations().getWithResponse("ymuj", "tks", com.azure.core.util.Context.NONE); + public static void hybridConnectivityEndpointsPatchDefault( + com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + EndpointResource resource = manager.endpoints() + .getWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine", + "default", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withProperties(new EndpointProperties().withType(Type.DEFAULT)).apply(); } } ``` @@ -907,20 +926,20 @@ public final class SolutionConfigurationsGetSamples { ```java /** - * Samples for SolutionConfigurations List. + * Samples for SolutionConfigurations SyncNow. */ -public final class SolutionConfigurationsListSamples { +public final class SolutionConfigurationsSyncNowSamples { /* - * x-ms-original-file: 2024-12-01/SolutionConfigurations_List.json + * x-ms-original-file: 2024-12-01/SolutionConfigurations_SyncNow.json */ /** - * Sample code: SolutionConfigurations_List. + * Sample code: SolutionConfigurations_SyncNow. * * @param manager Entry point to HybridConnectivityManager. */ public static void - solutionConfigurationsList(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionConfigurations().list("ymuj", com.azure.core.util.Context.NONE); + solutionConfigurationsSyncNow(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.solutionConfigurations().syncNow("ymuj", "tks", com.azure.core.util.Context.NONE); } } ``` @@ -929,20 +948,22 @@ public final class SolutionConfigurationsListSamples { ```java /** - * Samples for SolutionConfigurations SyncNow. + * Samples for PublicCloudConnectors GetByResourceGroup. */ -public final class SolutionConfigurationsSyncNowSamples { +public final class PublicCloudConnectorsGetByResourceGroupSamples { /* - * x-ms-original-file: 2024-12-01/SolutionConfigurations_SyncNow.json + * x-ms-original-file: 2024-12-01/PublicCloudConnectors_Get.json */ /** - * Sample code: SolutionConfigurations_SyncNow. + * Sample code: PublicCloudConnectors_Get. * * @param manager Entry point to HybridConnectivityManager. */ public static void - solutionConfigurationsSyncNow(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionConfigurations().syncNow("ymuj", "tks", com.azure.core.util.Context.NONE); + publicCloudConnectorsGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.publicCloudConnectors() + .getByResourceGroupWithResponse("rgpublicCloud", "rzygvnpsnrdylwzdbsscjazvamyxmh", + com.azure.core.util.Context.NONE); } } ``` @@ -950,45 +971,22 @@ public final class SolutionConfigurationsSyncNowSamples { ### SolutionConfigurations_Update ```java -import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfiguration; -import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationProperties; -import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; -import java.util.HashMap; -import java.util.Map; - /** - * Samples for SolutionConfigurations Update. + * Samples for SolutionConfigurations Delete. */ -public final class SolutionConfigurationsUpdateSamples { +public final class SolutionConfigurationsDeleteSamples { /* - * x-ms-original-file: 2024-12-01/SolutionConfigurations_Update.json + * x-ms-original-file: 2024-12-01/SolutionConfigurations_Delete.json */ /** - * Sample code: SolutionConfigurations_Update. + * Sample code: SolutionConfigurations_Delete. * * @param manager Entry point to HybridConnectivityManager. */ public static void - solutionConfigurationsUpdate(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - SolutionConfiguration resource = manager.solutionConfigurations() - .getWithResponse("ymuj", "dxt", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withProperties(new SolutionConfigurationProperties().withSolutionType("myzljlstvmgkp") - .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + solutionConfigurationsDelete(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.solutionConfigurations() + .deleteByResourceGroupWithResponse("ymuj", "stu", com.azure.core.util.Context.NONE); } } ``` @@ -997,21 +995,20 @@ public final class SolutionConfigurationsUpdateSamples { ```java /** - * Samples for SolutionTypes GetByResourceGroup. + * Samples for Inventory Get. */ -public final class SolutionTypesGetByResourceGroupSamples { +public final class InventoryGetSamples { /* - * x-ms-original-file: 2024-12-01/SolutionTypes_Get.json + * x-ms-original-file: 2024-12-01/Inventory_Get.json */ /** - * Sample code: SolutionTypes_Get. + * Sample code: Inventory_Get. * * @param manager Entry point to HybridConnectivityManager. */ - public static void - solutionTypesGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionTypes() - .getByResourceGroupWithResponse("rgpublicCloud", "lulzqllpu", com.azure.core.util.Context.NONE); + public static void inventoryGet(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.inventories() + .getWithResponse("ymuj", "zarfsraogroxlaqjjnwixtn", "xofprmcboosrbd", com.azure.core.util.Context.NONE); } } ``` @@ -1020,20 +1017,23 @@ public final class SolutionTypesGetByResourceGroupSamples { ```java /** - * Samples for SolutionTypes List. + * Samples for ServiceConfigurations Delete. */ -public final class SolutionTypesListSamples { +public final class ServiceConfigurationsDeleteSamples { /* - * x-ms-original-file: 2024-12-01/SolutionTypes_ListBySubscription.json + * x-ms-original-file: 2024-12-01/ServiceConfigurationsDeleteSSH.json */ /** - * Sample code: SolutionTypes_ListBySubscription. + * Sample code: ServiceConfigurationsDeleteSSH. * * @param manager Entry point to HybridConnectivityManager. */ - public static void solutionTypesListBySubscription( - com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionTypes().list(com.azure.core.util.Context.NONE); + public static void + serviceConfigurationsDeleteSSH(com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { + manager.serviceConfigurations() + .deleteWithResponse( + "subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine/providers/Microsoft.HybridConnectivity/endpoints/default", + "default", "SSH", com.azure.core.util.Context.NONE); } } ``` @@ -1042,20 +1042,20 @@ public final class SolutionTypesListSamples { ```java /** - * Samples for SolutionTypes ListByResourceGroup. + * Samples for Operations List. */ -public final class SolutionTypesListByResourceGroupSamples { +public final class OperationsListSamples { /* - * x-ms-original-file: 2024-12-01/SolutionTypes_ListByResourceGroup.json + * x-ms-original-file: 2024-12-01/OperationsList.json */ /** - * Sample code: SolutionTypes_ListByResourceGroup. + * Sample code: HybridConnectivityOperationsList. * * @param manager Entry point to HybridConnectivityManager. */ - public static void solutionTypesListByResourceGroup( + public static void hybridConnectivityOperationsList( com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) { - manager.solutionTypes().listByResourceGroup("rgpublicCloud", com.azure.core.util.Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/pom.xml b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/pom.xml index ef918478ccdd..d95b1c27ea0d 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/pom.xml +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/pom.xml @@ -46,7 +46,6 @@ 0 0 true - false diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/GenerateAwsTemplatesClient.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/GenerateAwsTemplatesClient.java index c78e8ad22d7e..0fd9a570361a 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/GenerateAwsTemplatesClient.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/GenerateAwsTemplatesClient.java @@ -8,7 +8,7 @@ import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.hybridconnectivity.fluent.models.PostResponseInner; +import com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner; import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest; /** @@ -24,10 +24,10 @@ public interface GenerateAwsTemplatesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the HybridConnectivity post operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, + Response postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, Context context); /** @@ -38,8 +38,8 @@ Response postWithResponse(GenerateAwsTemplateRequest generate * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the HybridConnectivity post operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - PostResponseInner post(GenerateAwsTemplateRequest generateAwsTemplateRequest); + GenerateAwsTemplateResponseInner post(GenerateAwsTemplateRequest generateAwsTemplateRequest); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/PublicCloudConnectorsClient.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/PublicCloudConnectorsClient.java index 83728ede6a4a..de28223e321b 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/PublicCloudConnectorsClient.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/PublicCloudConnectorsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.hybridconnectivity.fluent.models.PublicCloudConnectorInner; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorUpdate; /** * An instance of this class provides access to all the operations defined in PublicCloudConnectorsClient. @@ -122,7 +123,7 @@ PublicCloudConnectorInner createOrUpdate(String resourceGroupName, String public */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse(String resourceGroupName, String publicCloudConnector, - PublicCloudConnectorInner properties, Context context); + PublicCloudConnectorUpdate properties, Context context); /** * Update a PublicCloudConnector. @@ -137,7 +138,7 @@ Response updateWithResponse(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) PublicCloudConnectorInner update(String resourceGroupName, String publicCloudConnector, - PublicCloudConnectorInner properties); + PublicCloudConnectorUpdate properties); /** * Delete a PublicCloudConnector. diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionConfigurationsClient.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionConfigurationsClient.java index d94675e0a2bc..0f5b13b89318 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionConfigurationsClient.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/SolutionConfigurationsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.hybridconnectivity.fluent.models.SolutionConfigurationInner; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationUpdate; /** * An instance of this class provides access to all the operations defined in SolutionConfigurationsClient. @@ -91,7 +92,7 @@ SolutionConfigurationInner createOrUpdate(String resourceUri, String solutionCon */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse(String resourceUri, String solutionConfiguration, - SolutionConfigurationInner properties, Context context); + SolutionConfigurationUpdate properties, Context context); /** * Update a SolutionConfiguration. @@ -106,7 +107,7 @@ Response updateWithResponse(String resourceUri, Stri */ @ServiceMethod(returns = ReturnType.SINGLE) SolutionConfigurationInner update(String resourceUri, String solutionConfiguration, - SolutionConfigurationInner properties); + SolutionConfigurationUpdate properties); /** * Delete a SolutionConfiguration. diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/PostResponseInner.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/GenerateAwsTemplateResponseInner.java similarity index 59% rename from sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/PostResponseInner.java rename to sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/GenerateAwsTemplateResponseInner.java index d27c7840aa58..a028d273a813 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/PostResponseInner.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/fluent/models/GenerateAwsTemplateResponseInner.java @@ -12,14 +12,14 @@ import java.io.IOException; /** - * The PostResponse model. + * The HybridConnectivity post operation response. */ @Immutable -public final class PostResponseInner implements JsonSerializable { +public final class GenerateAwsTemplateResponseInner implements JsonSerializable { /** - * Creates an instance of PostResponseInner class. + * Creates an instance of GenerateAwsTemplateResponseInner class. */ - private PostResponseInner() { + private GenerateAwsTemplateResponseInner() { } /** @@ -40,16 +40,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of PostResponseInner from the JsonReader. + * Reads an instance of GenerateAwsTemplateResponseInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of PostResponseInner 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 PostResponseInner. + * @return An instance of GenerateAwsTemplateResponseInner 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 GenerateAwsTemplateResponseInner. */ - public static PostResponseInner fromJson(JsonReader jsonReader) throws IOException { + public static GenerateAwsTemplateResponseInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - PostResponseInner deserializedPostResponseInner = new PostResponseInner(); + GenerateAwsTemplateResponseInner deserializedGenerateAwsTemplateResponseInner + = new GenerateAwsTemplateResponseInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -57,7 +58,7 @@ public static PostResponseInner fromJson(JsonReader jsonReader) throws IOExcepti reader.skipChildren(); } - return deserializedPostResponseInner; + return deserializedGenerateAwsTemplateResponseInner; }); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PostResponseImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplateResponseImpl.java similarity index 64% rename from sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PostResponseImpl.java rename to sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplateResponseImpl.java index 73f74d0ef7e6..15112a48f945 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PostResponseImpl.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplateResponseImpl.java @@ -4,21 +4,21 @@ package com.azure.resourcemanager.hybridconnectivity.implementation; -import com.azure.resourcemanager.hybridconnectivity.fluent.models.PostResponseInner; -import com.azure.resourcemanager.hybridconnectivity.models.PostResponse; +import com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner; +import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateResponse; -public final class PostResponseImpl implements PostResponse { - private PostResponseInner innerObject; +public final class GenerateAwsTemplateResponseImpl implements GenerateAwsTemplateResponse { + private GenerateAwsTemplateResponseInner innerObject; private final com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager; - PostResponseImpl(PostResponseInner innerObject, + GenerateAwsTemplateResponseImpl(GenerateAwsTemplateResponseInner innerObject, com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } - public PostResponseInner innerModel() { + public GenerateAwsTemplateResponseInner innerModel() { return this.innerObject; } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesClientImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesClientImpl.java index ca8a9603de6d..80db2ef9267c 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesClientImpl.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesClientImpl.java @@ -22,7 +22,7 @@ import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient; -import com.azure.resourcemanager.hybridconnectivity.fluent.models.PostResponseInner; +import com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner; import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest; import reactor.core.publisher.Mono; @@ -61,7 +61,7 @@ public interface GenerateAwsTemplatesService { @Post("/subscriptions/{subscriptionId}/providers/Microsoft.HybridConnectivity/generateAwsTemplate") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> post(@HostParam("endpoint") String endpoint, + Mono> post(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, @BodyParam("application/json") GenerateAwsTemplateRequest generateAwsTemplateRequest, Context context); @@ -75,10 +75,11 @@ Mono> post(@HostParam("endpoint") String endpoint, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the HybridConnectivity post operation response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> + private Mono> postWithResponseAsync(GenerateAwsTemplateRequest generateAwsTemplateRequest) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -111,10 +112,11 @@ Mono> post(@HostParam("endpoint") String endpoint, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. + * @return the HybridConnectivity post operation response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> + private Mono> postWithResponseAsync(GenerateAwsTemplateRequest generateAwsTemplateRequest, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -145,10 +147,10 @@ Mono> post(@HostParam("endpoint") String endpoint, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. + * @return the HybridConnectivity post operation response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono postAsync(GenerateAwsTemplateRequest generateAwsTemplateRequest) { + private Mono postAsync(GenerateAwsTemplateRequest generateAwsTemplateRequest) { return postWithResponseAsync(generateAwsTemplateRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -161,11 +163,11 @@ private Mono postAsync(GenerateAwsTemplateRequest generateAws * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the HybridConnectivity post operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, - Context context) { + public Response + postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, Context context) { return postWithResponseAsync(generateAwsTemplateRequest, context).block(); } @@ -177,10 +179,10 @@ public Response postWithResponse(GenerateAwsTemplateRequest g * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the HybridConnectivity post operation response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public PostResponseInner post(GenerateAwsTemplateRequest generateAwsTemplateRequest) { + public GenerateAwsTemplateResponseInner post(GenerateAwsTemplateRequest generateAwsTemplateRequest) { return postWithResponse(generateAwsTemplateRequest, Context.NONE).getValue(); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesImpl.java index c06e80a63fd2..4d251c0cd5ce 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesImpl.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/GenerateAwsTemplatesImpl.java @@ -9,10 +9,10 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.hybridconnectivity.fluent.GenerateAwsTemplatesClient; -import com.azure.resourcemanager.hybridconnectivity.fluent.models.PostResponseInner; +import com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner; import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest; +import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateResponse; import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplates; -import com.azure.resourcemanager.hybridconnectivity.models.PostResponse; public final class GenerateAwsTemplatesImpl implements GenerateAwsTemplates { private static final ClientLogger LOGGER = new ClientLogger(GenerateAwsTemplatesImpl.class); @@ -27,21 +27,22 @@ public GenerateAwsTemplatesImpl(GenerateAwsTemplatesClient innerClient, this.serviceManager = serviceManager; } - public Response postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, + public Response postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, Context context) { - Response inner = this.serviceClient().postWithResponse(generateAwsTemplateRequest, context); + Response inner + = this.serviceClient().postWithResponse(generateAwsTemplateRequest, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new PostResponseImpl(inner.getValue(), this.manager())); + new GenerateAwsTemplateResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public PostResponse post(GenerateAwsTemplateRequest generateAwsTemplateRequest) { - PostResponseInner inner = this.serviceClient().post(generateAwsTemplateRequest); + public GenerateAwsTemplateResponse post(GenerateAwsTemplateRequest generateAwsTemplateRequest) { + GenerateAwsTemplateResponseInner inner = this.serviceClient().post(generateAwsTemplateRequest); if (inner != null) { - return new PostResponseImpl(inner, this.manager()); + return new GenerateAwsTemplateResponseImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorImpl.java index 60d2a6047738..0876ae95e60d 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorImpl.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorImpl.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.hybridconnectivity.models.OperationStatusResult; import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnector; import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorProperties; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorPropertiesUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorUpdate; import java.util.Collections; import java.util.Map; @@ -77,6 +79,8 @@ private com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager m private String publicCloudConnector; + private PublicCloudConnectorUpdate updateProperties; + public PublicCloudConnectorImpl withExistingResourceGroup(String resourceGroupName) { this.resourceGroupName = resourceGroupName; return this; @@ -104,13 +108,14 @@ public PublicCloudConnector create(Context context) { } public PublicCloudConnectorImpl update() { + this.updateProperties = new PublicCloudConnectorUpdate(); return this; } public PublicCloudConnector apply() { this.innerObject = serviceManager.serviceClient() .getPublicCloudConnectors() - .updateWithResponse(resourceGroupName, publicCloudConnector, this.innerModel(), Context.NONE) + .updateWithResponse(resourceGroupName, publicCloudConnector, updateProperties, Context.NONE) .getValue(); return this; } @@ -118,7 +123,7 @@ public PublicCloudConnector apply() { public PublicCloudConnector apply(Context context) { this.innerObject = serviceManager.serviceClient() .getPublicCloudConnectors() - .updateWithResponse(resourceGroupName, publicCloudConnector, this.innerModel(), context) + .updateWithResponse(resourceGroupName, publicCloudConnector, updateProperties, context) .getValue(); return this; } @@ -167,12 +172,26 @@ public PublicCloudConnectorImpl withRegion(String location) { } public PublicCloudConnectorImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateProperties.withTags(tags); + return this; + } } public PublicCloudConnectorImpl withProperties(PublicCloudConnectorProperties properties) { this.innerModel().withProperties(properties); return this; } + + public PublicCloudConnectorImpl withProperties(PublicCloudConnectorPropertiesUpdate properties) { + this.updateProperties.withProperties(properties); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsClientImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsClientImpl.java index ab25daa14f06..691120bc2bfb 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsClientImpl.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/PublicCloudConnectorsClientImpl.java @@ -37,6 +37,7 @@ import com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.hybridconnectivity.fluent.models.PublicCloudConnectorInner; import com.azure.resourcemanager.hybridconnectivity.implementation.models.PublicCloudConnectorListResult; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -101,7 +102,7 @@ Mono> update(@HostParam("endpoint") String e @PathParam("resourceGroupName") String resourceGroupName, @PathParam("publicCloudConnector") String publicCloudConnector, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") PublicCloudConnectorInner properties, Context context); + @BodyParam("application/json") PublicCloudConnectorUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridConnectivity/publicCloudConnectors/{publicCloudConnector}") @@ -530,7 +531,7 @@ public PublicCloudConnectorInner createOrUpdate(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, - String publicCloudConnector, PublicCloudConnectorInner properties) { + String publicCloudConnector, PublicCloudConnectorUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -575,7 +576,7 @@ private Mono> updateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, - String publicCloudConnector, PublicCloudConnectorInner properties, Context context) { + String publicCloudConnector, PublicCloudConnectorUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -617,7 +618,7 @@ private Mono> updateWithResponseAsync(String */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String publicCloudConnector, - PublicCloudConnectorInner properties) { + PublicCloudConnectorUpdate properties) { return updateWithResponseAsync(resourceGroupName, publicCloudConnector, properties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -636,7 +637,7 @@ private Mono updateAsync(String resourceGroupName, St */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String publicCloudConnector, - PublicCloudConnectorInner properties, Context context) { + PublicCloudConnectorUpdate properties, Context context) { return updateWithResponseAsync(resourceGroupName, publicCloudConnector, properties, context).block(); } @@ -653,7 +654,7 @@ public Response updateWithResponse(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) public PublicCloudConnectorInner update(String resourceGroupName, String publicCloudConnector, - PublicCloudConnectorInner properties) { + PublicCloudConnectorUpdate properties) { return updateWithResponse(resourceGroupName, publicCloudConnector, properties, Context.NONE).getValue(); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationImpl.java index 60f03dc607c6..5efb4b5e4bb9 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationImpl.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationImpl.java @@ -10,6 +10,8 @@ import com.azure.resourcemanager.hybridconnectivity.models.OperationStatusResult; import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfiguration; import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationProperties; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationPropertiesUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationUpdate; public final class SolutionConfigurationImpl implements SolutionConfiguration, SolutionConfiguration.Definition, SolutionConfiguration.Update { @@ -49,6 +51,8 @@ private com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager m private String solutionConfiguration; + private SolutionConfigurationUpdate updateProperties; + public SolutionConfigurationImpl withExistingResourceUri(String resourceUri) { this.resourceUri = resourceUri; return this; @@ -78,13 +82,14 @@ public SolutionConfiguration create(Context context) { } public SolutionConfigurationImpl update() { + this.updateProperties = new SolutionConfigurationUpdate(); return this; } public SolutionConfiguration apply() { this.innerObject = serviceManager.serviceClient() .getSolutionConfigurations() - .updateWithResponse(resourceUri, solutionConfiguration, this.innerModel(), Context.NONE) + .updateWithResponse(resourceUri, solutionConfiguration, updateProperties, Context.NONE) .getValue(); return this; } @@ -92,7 +97,7 @@ public SolutionConfiguration apply() { public SolutionConfiguration apply(Context context) { this.innerObject = serviceManager.serviceClient() .getSolutionConfigurations() - .updateWithResponse(resourceUri, solutionConfiguration, this.innerModel(), context) + .updateWithResponse(resourceUri, solutionConfiguration, updateProperties, context) .getValue(); return this; } @@ -137,4 +142,9 @@ public SolutionConfigurationImpl withProperties(SolutionConfigurationProperties this.innerModel().withProperties(properties); return this; } + + public SolutionConfigurationImpl withProperties(SolutionConfigurationPropertiesUpdate properties) { + this.updateProperties.withProperties(properties); + return this; + } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsClientImpl.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsClientImpl.java index 3f717acb8272..7065b2aab3f2 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsClientImpl.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/implementation/SolutionConfigurationsClientImpl.java @@ -37,6 +37,7 @@ import com.azure.resourcemanager.hybridconnectivity.fluent.models.OperationStatusResultInner; import com.azure.resourcemanager.hybridconnectivity.fluent.models.SolutionConfigurationInner; import com.azure.resourcemanager.hybridconnectivity.implementation.models.SolutionConfigurationListResult; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationUpdate; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -101,7 +102,7 @@ Mono> update(@HostParam("endpoint") String @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("solutionConfiguration") String solutionConfiguration, @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, - @BodyParam("application/json") SolutionConfigurationInner properties, Context context); + @BodyParam("application/json") SolutionConfigurationUpdate properties, Context context); @Headers({ "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.HybridConnectivity/solutionConfigurations/{solutionConfiguration}") @@ -393,7 +394,7 @@ public SolutionConfigurationInner createOrUpdate(String resourceUri, String solu */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceUri, - String solutionConfiguration, SolutionConfigurationInner properties) { + String solutionConfiguration, SolutionConfigurationUpdate properties) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -432,7 +433,7 @@ private Mono> updateWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceUri, - String solutionConfiguration, SolutionConfigurationInner properties, Context context) { + String solutionConfiguration, SolutionConfigurationUpdate properties, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -469,7 +470,7 @@ private Mono> updateWithResponseAsync(Strin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceUri, String solutionConfiguration, - SolutionConfigurationInner properties) { + SolutionConfigurationUpdate properties) { return updateWithResponseAsync(resourceUri, solutionConfiguration, properties) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -488,7 +489,7 @@ private Mono updateAsync(String resourceUri, String */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceUri, String solutionConfiguration, - SolutionConfigurationInner properties, Context context) { + SolutionConfigurationUpdate properties, Context context) { return updateWithResponseAsync(resourceUri, solutionConfiguration, properties, context).block(); } @@ -505,7 +506,7 @@ public Response updateWithResponse(String resourceUr */ @ServiceMethod(returns = ReturnType.SINGLE) public SolutionConfigurationInner update(String resourceUri, String solutionConfiguration, - SolutionConfigurationInner properties) { + SolutionConfigurationUpdate properties) { return updateWithResponse(resourceUri, solutionConfiguration, properties, Context.NONE).getValue(); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/AwsCloudProfileUpdate.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/AwsCloudProfileUpdate.java new file mode 100644 index 000000000000..db7ac46a8785 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/AwsCloudProfileUpdate.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.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; +import java.util.List; + +/** + * cloud profile for AWS. + */ +@Fluent +public final class AwsCloudProfileUpdate implements JsonSerializable { + /* + * List of AWS accounts which need to be excluded. + */ + private List excludedAccounts; + + /** + * Creates an instance of AwsCloudProfileUpdate class. + */ + public AwsCloudProfileUpdate() { + } + + /** + * Get the excludedAccounts property: List of AWS accounts which need to be excluded. + * + * @return the excludedAccounts value. + */ + public List excludedAccounts() { + return this.excludedAccounts; + } + + /** + * Set the excludedAccounts property: List of AWS accounts which need to be excluded. + * + * @param excludedAccounts the excludedAccounts value to set. + * @return the AwsCloudProfileUpdate object itself. + */ + public AwsCloudProfileUpdate withExcludedAccounts(List excludedAccounts) { + this.excludedAccounts = excludedAccounts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("excludedAccounts", this.excludedAccounts, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of AwsCloudProfileUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of AwsCloudProfileUpdate 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 AwsCloudProfileUpdate. + */ + public static AwsCloudProfileUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + AwsCloudProfileUpdate deserializedAwsCloudProfileUpdate = new AwsCloudProfileUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("excludedAccounts".equals(fieldName)) { + List excludedAccounts = reader.readArray(reader1 -> reader1.getString()); + deserializedAwsCloudProfileUpdate.excludedAccounts = excludedAccounts; + } else { + reader.skipChildren(); + } + } + + return deserializedAwsCloudProfileUpdate; + }); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PostResponse.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplateResponse.java similarity index 60% rename from sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PostResponse.java rename to sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplateResponse.java index 59d400102ccc..b44c339b68b0 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PostResponse.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplateResponse.java @@ -4,16 +4,17 @@ package com.azure.resourcemanager.hybridconnectivity.models; -import com.azure.resourcemanager.hybridconnectivity.fluent.models.PostResponseInner; +import com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner; /** - * An immutable client-side representation of PostResponse. + * An immutable client-side representation of GenerateAwsTemplateResponse. */ -public interface PostResponse { +public interface GenerateAwsTemplateResponse { /** - * Gets the inner com.azure.resourcemanager.hybridconnectivity.fluent.models.PostResponseInner object. + * Gets the inner com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner + * object. * * @return the inner object. */ - PostResponseInner innerModel(); + GenerateAwsTemplateResponseInner innerModel(); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplates.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplates.java index e06ad7fbd618..e8f633477a20 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplates.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/GenerateAwsTemplates.java @@ -20,9 +20,10 @@ public interface GenerateAwsTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. + * @return the HybridConnectivity post operation response along with {@link Response}. */ - Response postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, Context context); + Response postWithResponse(GenerateAwsTemplateRequest generateAwsTemplateRequest, + Context context); /** * Retrieve AWS Cloud Formation template. @@ -32,7 +33,7 @@ public interface GenerateAwsTemplates { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the HybridConnectivity post operation response. */ - PostResponse post(GenerateAwsTemplateRequest generateAwsTemplateRequest); + GenerateAwsTemplateResponse post(GenerateAwsTemplateRequest generateAwsTemplateRequest); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnector.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnector.java index db2895033391..fcf4f1328f13 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnector.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnector.java @@ -244,7 +244,7 @@ interface WithProperties { * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - Update withProperties(PublicCloudConnectorProperties properties); + Update withProperties(PublicCloudConnectorPropertiesUpdate properties); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorPropertiesUpdate.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorPropertiesUpdate.java new file mode 100644 index 000000000000..b2b9c7a19ac0 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorPropertiesUpdate.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.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; + +/** + * Properties of public cloud connectors. + */ +@Fluent +public final class PublicCloudConnectorPropertiesUpdate + implements JsonSerializable { + /* + * Cloud profile for AWS. + */ + private AwsCloudProfileUpdate awsCloudProfile; + + /** + * Creates an instance of PublicCloudConnectorPropertiesUpdate class. + */ + public PublicCloudConnectorPropertiesUpdate() { + } + + /** + * Get the awsCloudProfile property: Cloud profile for AWS. + * + * @return the awsCloudProfile value. + */ + public AwsCloudProfileUpdate awsCloudProfile() { + return this.awsCloudProfile; + } + + /** + * Set the awsCloudProfile property: Cloud profile for AWS. + * + * @param awsCloudProfile the awsCloudProfile value to set. + * @return the PublicCloudConnectorPropertiesUpdate object itself. + */ + public PublicCloudConnectorPropertiesUpdate withAwsCloudProfile(AwsCloudProfileUpdate awsCloudProfile) { + this.awsCloudProfile = awsCloudProfile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (awsCloudProfile() != null) { + awsCloudProfile().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("awsCloudProfile", this.awsCloudProfile); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicCloudConnectorPropertiesUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicCloudConnectorPropertiesUpdate 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 PublicCloudConnectorPropertiesUpdate. + */ + public static PublicCloudConnectorPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicCloudConnectorPropertiesUpdate deserializedPublicCloudConnectorPropertiesUpdate + = new PublicCloudConnectorPropertiesUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("awsCloudProfile".equals(fieldName)) { + deserializedPublicCloudConnectorPropertiesUpdate.awsCloudProfile + = AwsCloudProfileUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicCloudConnectorPropertiesUpdate; + }); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorUpdate.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorUpdate.java new file mode 100644 index 000000000000..f16cea70edac --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/PublicCloudConnectorUpdate.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * Public Cloud Connector. + */ +@Fluent +public final class PublicCloudConnectorUpdate extends TrackedResourceUpdate { + /* + * The resource-specific properties for this resource. + */ + private PublicCloudConnectorPropertiesUpdate properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PublicCloudConnectorUpdate class. + */ + public PublicCloudConnectorUpdate() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public PublicCloudConnectorPropertiesUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the PublicCloudConnectorUpdate object itself. + */ + public PublicCloudConnectorUpdate withProperties(PublicCloudConnectorPropertiesUpdate properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + @Override + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public PublicCloudConnectorUpdate withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PublicCloudConnectorUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PublicCloudConnectorUpdate 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 PublicCloudConnectorUpdate. + */ + public static PublicCloudConnectorUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PublicCloudConnectorUpdate deserializedPublicCloudConnectorUpdate = new PublicCloudConnectorUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPublicCloudConnectorUpdate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPublicCloudConnectorUpdate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPublicCloudConnectorUpdate.type = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPublicCloudConnectorUpdate.withTags(tags); + } else if ("systemData".equals(fieldName)) { + deserializedPublicCloudConnectorUpdate.systemData = SystemData.fromJson(reader); + } else if ("properties".equals(fieldName)) { + deserializedPublicCloudConnectorUpdate.properties + = PublicCloudConnectorPropertiesUpdate.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPublicCloudConnectorUpdate; + }); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfiguration.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfiguration.java index 751cdfb555e2..e5771665dc65 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfiguration.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfiguration.java @@ -159,7 +159,7 @@ interface WithProperties { * @param properties The resource-specific properties for this resource. * @return the next definition stage. */ - Update withProperties(SolutionConfigurationProperties properties); + Update withProperties(SolutionConfigurationPropertiesUpdate properties); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationPropertiesUpdate.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationPropertiesUpdate.java new file mode 100644 index 000000000000..229f5c639063 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationPropertiesUpdate.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.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; + +/** + * Solution configuration resource. + */ +@Fluent +public final class SolutionConfigurationPropertiesUpdate + implements JsonSerializable { + /* + * The type of the solution + */ + private String solutionType; + + /* + * Solution settings + */ + private SolutionSettings solutionSettings; + + /** + * Creates an instance of SolutionConfigurationPropertiesUpdate class. + */ + public SolutionConfigurationPropertiesUpdate() { + } + + /** + * Get the solutionType property: The type of the solution. + * + * @return the solutionType value. + */ + public String solutionType() { + return this.solutionType; + } + + /** + * Set the solutionType property: The type of the solution. + * + * @param solutionType the solutionType value to set. + * @return the SolutionConfigurationPropertiesUpdate object itself. + */ + public SolutionConfigurationPropertiesUpdate withSolutionType(String solutionType) { + this.solutionType = solutionType; + return this; + } + + /** + * Get the solutionSettings property: Solution settings. + * + * @return the solutionSettings value. + */ + public SolutionSettings solutionSettings() { + return this.solutionSettings; + } + + /** + * Set the solutionSettings property: Solution settings. + * + * @param solutionSettings the solutionSettings value to set. + * @return the SolutionConfigurationPropertiesUpdate object itself. + */ + public SolutionConfigurationPropertiesUpdate withSolutionSettings(SolutionSettings solutionSettings) { + this.solutionSettings = solutionSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (solutionSettings() != null) { + solutionSettings().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("solutionType", this.solutionType); + jsonWriter.writeJsonField("solutionSettings", this.solutionSettings); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SolutionConfigurationPropertiesUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SolutionConfigurationPropertiesUpdate 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 SolutionConfigurationPropertiesUpdate. + */ + public static SolutionConfigurationPropertiesUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SolutionConfigurationPropertiesUpdate deserializedSolutionConfigurationPropertiesUpdate + = new SolutionConfigurationPropertiesUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("solutionType".equals(fieldName)) { + deserializedSolutionConfigurationPropertiesUpdate.solutionType = reader.getString(); + } else if ("solutionSettings".equals(fieldName)) { + deserializedSolutionConfigurationPropertiesUpdate.solutionSettings + = SolutionSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSolutionConfigurationPropertiesUpdate; + }); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationUpdate.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationUpdate.java new file mode 100644 index 000000000000..28e0b00ce7f8 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/SolutionConfigurationUpdate.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.hybridconnectivity.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Solution Configuration. + */ +@Fluent +public final class SolutionConfigurationUpdate extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + private SolutionConfigurationPropertiesUpdate properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of SolutionConfigurationUpdate class. + */ + public SolutionConfigurationUpdate() { + } + + /** + * Get the properties property: The resource-specific properties for this resource. + * + * @return the properties value. + */ + public SolutionConfigurationPropertiesUpdate properties() { + return this.properties; + } + + /** + * Set the properties property: The resource-specific properties for this resource. + * + * @param properties the properties value to set. + * @return the SolutionConfigurationUpdate object itself. + */ + public SolutionConfigurationUpdate withProperties(SolutionConfigurationPropertiesUpdate properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of SolutionConfigurationUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of SolutionConfigurationUpdate 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 SolutionConfigurationUpdate. + */ + public static SolutionConfigurationUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + SolutionConfigurationUpdate deserializedSolutionConfigurationUpdate = new SolutionConfigurationUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedSolutionConfigurationUpdate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedSolutionConfigurationUpdate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedSolutionConfigurationUpdate.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedSolutionConfigurationUpdate.properties + = SolutionConfigurationPropertiesUpdate.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedSolutionConfigurationUpdate.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedSolutionConfigurationUpdate; + }); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/TrackedResourceUpdate.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/TrackedResourceUpdate.java new file mode 100644 index 000000000000..c34e22119073 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/main/java/com/azure/resourcemanager/hybridconnectivity/models/TrackedResourceUpdate.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.Map; + +/** + * The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a + * 'location'. + */ +@Fluent +public class TrackedResourceUpdate extends ProxyResource { + /* + * Resource tags. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of TrackedResourceUpdate class. + */ + public TrackedResourceUpdate() { + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the TrackedResourceUpdate object itself. + */ + public TrackedResourceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @param systemData the systemData value to set. + * @return the TrackedResourceUpdate object itself. + */ + TrackedResourceUpdate withSystemData(SystemData systemData) { + this.systemData = systemData; + return this; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of TrackedResourceUpdate from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of TrackedResourceUpdate 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 TrackedResourceUpdate. + */ + public static TrackedResourceUpdate fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + TrackedResourceUpdate deserializedTrackedResourceUpdate = new TrackedResourceUpdate(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedTrackedResourceUpdate.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedTrackedResourceUpdate.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedTrackedResourceUpdate.type = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedTrackedResourceUpdate.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedTrackedResourceUpdate.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedTrackedResourceUpdate; + }); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsUpdateSamples.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsUpdateSamples.java index 073c11dadca0..a67a94a5174a 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsUpdateSamples.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsUpdateSamples.java @@ -4,9 +4,9 @@ package com.azure.resourcemanager.hybridconnectivity.generated; -import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfile; +import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfileUpdate; import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnector; -import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorProperties; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorPropertiesUpdate; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -31,8 +31,8 @@ public final class PublicCloudConnectorsUpdateSamples { .getValue(); resource.update() .withTags(mapOf()) - .withProperties(new PublicCloudConnectorProperties() - .withAwsCloudProfile(new AwsCloudProfile().withExcludedAccounts(Arrays.asList("zrbtd")))) + .withProperties(new PublicCloudConnectorPropertiesUpdate() + .withAwsCloudProfile(new AwsCloudProfileUpdate().withExcludedAccounts(Arrays.asList("zrbtd")))) .apply(); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsUpdateSamples.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsUpdateSamples.java index 09d8cb028cc0..4449aa4df4d9 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsUpdateSamples.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/samples/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsUpdateSamples.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.hybridconnectivity.generated; import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfiguration; -import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationProperties; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationPropertiesUpdate; import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; import java.util.HashMap; import java.util.Map; @@ -28,7 +28,7 @@ public final class SolutionConfigurationsUpdateSamples { .getWithResponse("ymuj", "dxt", com.azure.core.util.Context.NONE) .getValue(); resource.update() - .withProperties(new SolutionConfigurationProperties().withSolutionType("myzljlstvmgkp") + .withProperties(new SolutionConfigurationPropertiesUpdate().withSolutionType("myzljlstvmgkp") .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))) .apply(); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AwsCloudProfileUpdateTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AwsCloudProfileUpdateTests.java new file mode 100644 index 000000000000..314eff40c9c5 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/AwsCloudProfileUpdateTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfileUpdate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class AwsCloudProfileUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AwsCloudProfileUpdate model = BinaryData.fromString("{\"excludedAccounts\":[\"exhd\",\"xibqeojnx\"]}") + .toObject(AwsCloudProfileUpdate.class); + Assertions.assertEquals("exhd", model.excludedAccounts().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + AwsCloudProfileUpdate model + = new AwsCloudProfileUpdate().withExcludedAccounts(Arrays.asList("exhd", "xibqeojnx")); + model = BinaryData.fromObject(model).toObject(AwsCloudProfileUpdate.class); + Assertions.assertEquals("exhd", model.excludedAccounts().get(0)); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsCreateOrUpdateWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsCreateOrUpdateWithResponseMockTests.java index 98713cc83b98..1b5951da2692 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsCreateOrUpdateWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class EndpointsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"custom\",\"resourceId\":\"dowwquuvxzxclvit\",\"provisioningState\":\"qzonosggbhcohf\"},\"id\":\"sjnkal\",\"name\":\"utiiswacf\",\"type\":\"gdkz\"}"; + = "{\"properties\":{\"type\":\"default\",\"resourceId\":\"mbes\",\"provisioningState\":\"nkww\"},\"id\":\"pjflcxogao\",\"name\":\"onz\",\"type\":\"nsikvmkqzeqqkdl\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); EndpointResource response = manager.endpoints() - .define("zxb") - .withExistingResourceUri("uwz") - .withProperties(new EndpointProperties().withType(Type.DEFAULT).withResourceId("jefuzmuvpbttdumo")) + .define("cers") + .withExistingResourceUri("ylpstdbhhxsrzdz") + .withProperties(new EndpointProperties().withType(Type.DEFAULT).withResourceId("nevf")) .create(); - Assertions.assertEquals(Type.CUSTOM, response.properties().type()); - Assertions.assertEquals("dowwquuvxzxclvit", response.properties().resourceId()); + Assertions.assertEquals(Type.DEFAULT, response.properties().type()); + Assertions.assertEquals("mbes", response.properties().resourceId()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsDeleteByResourceGroupWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsDeleteByResourceGroupWithResponseMockTests.java index 8be41c9a9812..247dd611e8f9 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsDeleteByResourceGroupWithResponseMockTests.java @@ -27,7 +27,8 @@ public void testDeleteWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.endpoints().deleteByResourceGroupWithResponse("lqlfm", "dnbbglzps", com.azure.core.util.Context.NONE); + manager.endpoints() + .deleteByResourceGroupWithResponse("mcbxvwvxysl", "bhsfxob", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsGetWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsGetWithResponseMockTests.java index 9d435d324443..604726a877cf 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsGetWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class EndpointsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"type\":\"default\",\"resourceId\":\"ndoygmifthnzdnd\",\"provisioningState\":\"gnayqigynduh\"},\"id\":\"hqlkthumaqo\",\"name\":\"bgycduiertgccym\",\"type\":\"aolps\"}"; + = "{\"properties\":{\"type\":\"default\",\"resourceId\":\"xxjyngudivkrtsw\",\"provisioningState\":\"qzvszjf\"},\"id\":\"vjfdx\",\"name\":\"ivetvtcq\",\"type\":\"qtdo\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,10 +31,11 @@ public void testGetWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - EndpointResource response - = manager.endpoints().getWithResponse("ewgdrjervn", "enq", com.azure.core.util.Context.NONE).getValue(); + EndpointResource response = manager.endpoints() + .getWithResponse("stmgrcfbunrmfqjh", "kxbpvj", com.azure.core.util.Context.NONE) + .getValue(); Assertions.assertEquals(Type.DEFAULT, response.properties().type()); - Assertions.assertEquals("ndoygmifthnzdnd", response.properties().resourceId()); + Assertions.assertEquals("xxjyngudivkrtsw", response.properties().resourceId()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListManagedProxyDetailsWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListManagedProxyDetailsWithResponseMockTests.java index bddc696233b3..748be42dc0cb 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListManagedProxyDetailsWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListManagedProxyDetailsWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class EndpointsListManagedProxyDetailsWithResponseMockTests { @Test public void testListManagedProxyDetailsWithResponse() throws Exception { - String responseStr = "{\"proxy\":\"otgqrlltmu\",\"expiresOn\":8105546637199671811}"; + String responseStr = "{\"proxy\":\"zbn\",\"expiresOn\":1564863042825261686}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,12 @@ public void testListManagedProxyDetailsWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ManagedProxyResource response = manager.endpoints() - .listManagedProxyDetailsWithResponse("dlkzgxhuri", "lbpodxunk", - new ManagedProxyRequest().withService("ebxmubyynt") - .withHostname("rbqtkoie") - .withServiceName(ServiceName.SSH), + .listManagedProxyDetailsWithResponse("mdnbbglzpswiy", "mcwyhzdxssadb", + new ManagedProxyRequest().withService("mnvdfzn").withHostname("ao").withServiceName(ServiceName.SSH), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("otgqrlltmu", response.proxy()); - Assertions.assertEquals(8105546637199671811L, response.expiresOn()); + Assertions.assertEquals("zbn", response.proxy()); + Assertions.assertEquals(1564863042825261686L, response.expiresOn()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListMockTests.java index 3b1632886f9e..69ff0ab2c2c8 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/EndpointsListMockTests.java @@ -23,7 +23,7 @@ public final class EndpointsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"type\":\"default\",\"resourceId\":\"zmnvdfznudaod\",\"provisioningState\":\"zbn\"},\"id\":\"lylpstdb\",\"name\":\"hxsrzdzucersc\",\"type\":\"ntnev\"}]}"; + = "{\"value\":[{\"properties\":{\"type\":\"custom\",\"resourceId\":\"krvrns\",\"provisioningState\":\"hqjohxcrsbfova\"},\"id\":\"ruvw\",\"name\":\"hsqfsubcgjbirxbp\",\"type\":\"bsrfbj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,9 +33,9 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.endpoints().list("iydmcwyhzdxs", com.azure.core.util.Context.NONE); + = manager.endpoints().list("ytkblmpew", com.azure.core.util.Context.NONE); - Assertions.assertEquals(Type.DEFAULT, response.iterator().next().properties().type()); - Assertions.assertEquals("zmnvdfznudaod", response.iterator().next().properties().resourceId()); + Assertions.assertEquals(Type.CUSTOM, response.iterator().next().properties().type()); + Assertions.assertEquals("krvrns", response.iterator().next().properties().resourceId()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplateRequestTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplateRequestTests.java index c2c2bc32b13b..c0ad8f77b6e4 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplateRequestTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplateRequestTests.java @@ -17,7 +17,7 @@ public final class GenerateAwsTemplateRequestTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { GenerateAwsTemplateRequest model = BinaryData.fromString( - "{\"connectorId\":\"dhkrwpdappdsbdk\",\"solutionTypes\":[{\"solutionType\":\"wjfeusnhutjel\",\"solutionSettings\":{\"tyxolniwpwc\":\"k\",\"eablg\":\"dhugjzzdatqxhocd\",\"wyiftyhxhur\":\"huticndvkao\",\"awxklr\":\"kjfkg\"}},{\"solutionType\":\"plwckbas\",\"solutionSettings\":{\"dgak\":\"wyqkgfgibm\",\"i\":\"qgoulznd\",\"koty\":\"ddhsgcbacphe\"}}]}") + "{\"connectorId\":\"dhkrwpdappdsbdk\",\"solutionTypes\":[{\"solutionType\":\"wjfeusnhutjel\",\"solutionSettings\":{\"\":{\"eablg\":\"dhugjzzdatqxhocd\",\"wyiftyhxhur\":\"huticndvkao\",\"tyxolniwpwc\":\"k\",\"awxklr\":\"kjfkg\"}}},{\"solutionType\":\"plwckbas\",\"solutionSettings\":{\"\":{\"koty\":\"ddhsgcbacphe\",\"i\":\"qgoulznd\",\"dgak\":\"wyqkgfgibm\"}}}]}") .toObject(GenerateAwsTemplateRequest.class); Assertions.assertEquals("dhkrwpdappdsbdk", model.connectorId()); Assertions.assertEquals("wjfeusnhutjel", model.solutionTypes().get(0).solutionType()); diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PostResponseInnerTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplateResponseInnerTests.java similarity index 64% rename from sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PostResponseInnerTests.java rename to sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplateResponseInnerTests.java index 5da017d32257..fabda522b88c 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PostResponseInnerTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplateResponseInnerTests.java @@ -5,11 +5,12 @@ package com.azure.resourcemanager.hybridconnectivity.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.hybridconnectivity.fluent.models.PostResponseInner; +import com.azure.resourcemanager.hybridconnectivity.fluent.models.GenerateAwsTemplateResponseInner; -public final class PostResponseInnerTests { +public final class GenerateAwsTemplateResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PostResponseInner model = BinaryData.fromString("{}").toObject(PostResponseInner.class); + GenerateAwsTemplateResponseInner model + = BinaryData.fromString("{}").toObject(GenerateAwsTemplateResponseInner.class); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplatesPostWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplatesPostWithResponseMockTests.java index 8a07985d12fd..50e4cb4b91ec 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplatesPostWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/GenerateAwsTemplatesPostWithResponseMockTests.java @@ -11,7 +11,7 @@ import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager; import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateRequest; -import com.azure.resourcemanager.hybridconnectivity.models.PostResponse; +import com.azure.resourcemanager.hybridconnectivity.models.GenerateAwsTemplateResponse; import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; import com.azure.resourcemanager.hybridconnectivity.models.SolutionTypeSettings; import java.nio.charset.StandardCharsets; @@ -34,14 +34,11 @@ public void testPostWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PostResponse response = manager.generateAwsTemplates() + GenerateAwsTemplateResponse response = manager.generateAwsTemplates() .postWithResponse( - new GenerateAwsTemplateRequest().withConnectorId("qyib") - .withSolutionTypes(Arrays.asList( - new SolutionTypeSettings().withSolutionType("fluszdtm") - .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())), - new SolutionTypeSettings().withSolutionType("dbutauvfbtkuwhh") - .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())))), + new GenerateAwsTemplateRequest().withConnectorId("ld") + .withSolutionTypes(Arrays.asList(new SolutionTypeSettings().withSolutionType("xcxrsl") + .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())))), com.azure.core.util.Context.NONE) .getValue(); diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesGetWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesGetWithResponseMockTests.java index a4856c144669..bbbfeaa5cec1 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesGetWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesGetWithResponseMockTests.java @@ -23,7 +23,7 @@ public final class InventoriesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"tqs\",\"azureResourceId\":\"qxujxukndxd\",\"status\":\"Failed\",\"statusDetails\":\"guufzd\",\"provisioningState\":\"Succeeded\"},\"id\":\"tfih\",\"name\":\"hbotzingamvppho\",\"type\":\"zqzudph\"}"; + = "{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"sdtclusiypbs\",\"azureResourceId\":\"ytguslf\",\"status\":\"Failed\",\"statusDetails\":\"ygqukyhejh\",\"provisioningState\":\"Failed\"},\"id\":\"gfpelolppvksrpqv\",\"name\":\"jzraehtwdwrf\",\"type\":\"swibyr\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,13 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); InventoryResource response = manager.inventories() - .getWithResponse("hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", "wws", com.azure.core.util.Context.NONE) + .getWithResponse("wmsweypqwd", "ggicccnxqhue", "mkttlstvlzywem", com.azure.core.util.Context.NONE) .getValue(); Assertions.assertEquals(CloudNativeType.EC2, response.properties().cloudNativeType()); - Assertions.assertEquals("tqs", response.properties().cloudNativeResourceId()); - Assertions.assertEquals("qxujxukndxd", response.properties().azureResourceId()); + Assertions.assertEquals("sdtclusiypbs", response.properties().cloudNativeResourceId()); + Assertions.assertEquals("ytguslf", response.properties().azureResourceId()); Assertions.assertEquals(SolutionConfigurationStatus.FAILED, response.properties().status()); - Assertions.assertEquals("guufzd", response.properties().statusDetails()); + Assertions.assertEquals("ygqukyhejh", response.properties().statusDetails()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesListBySolutionConfigurationMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesListBySolutionConfigurationMockTests.java index b819da5b8f28..e18cbe4952e7 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesListBySolutionConfigurationMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoriesListBySolutionConfigurationMockTests.java @@ -24,7 +24,7 @@ public final class InventoriesListBySolutionConfigurationMockTests { @Test public void testListBySolutionConfiguration() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"wzcjaesgvvsccy\",\"azureResourceId\":\"g\",\"status\":\"Failed\",\"statusDetails\":\"wygzlvdnkfxusem\",\"provisioningState\":\"Canceled\"},\"id\":\"muhapfcqdpsqxqv\",\"name\":\"svuo\",\"type\":\"mgccelvezrypq\"}]}"; + = "{\"value\":[{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"racstwity\",\"azureResourceId\":\"evxccedcp\",\"status\":\"Completed\",\"statusDetails\":\"odn\",\"provisioningState\":\"Failed\"},\"id\":\"tjc\",\"name\":\"nhltiugcxn\",\"type\":\"vvwxqi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,13 +33,14 @@ public void testListBySolutionConfiguration() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response = manager.inventories() - .listBySolutionConfiguration("amvdkfwynwcvtbv", "ayhmtnvyqiatkz", com.azure.core.util.Context.NONE); + PagedIterable response + = manager.inventories().listBySolutionConfiguration("dl", "h", com.azure.core.util.Context.NONE); Assertions.assertEquals(CloudNativeType.EC2, response.iterator().next().properties().cloudNativeType()); - Assertions.assertEquals("wzcjaesgvvsccy", response.iterator().next().properties().cloudNativeResourceId()); - Assertions.assertEquals("g", response.iterator().next().properties().azureResourceId()); - Assertions.assertEquals(SolutionConfigurationStatus.FAILED, response.iterator().next().properties().status()); - Assertions.assertEquals("wygzlvdnkfxusem", response.iterator().next().properties().statusDetails()); + Assertions.assertEquals("racstwity", response.iterator().next().properties().cloudNativeResourceId()); + Assertions.assertEquals("evxccedcp", response.iterator().next().properties().azureResourceId()); + Assertions.assertEquals(SolutionConfigurationStatus.COMPLETED, + response.iterator().next().properties().status()); + Assertions.assertEquals("odn", response.iterator().next().properties().statusDetails()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryPropertiesTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryPropertiesTests.java index 2250a3e4c95c..b0877833c2bf 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryPropertiesTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryPropertiesTests.java @@ -14,12 +14,12 @@ public final class InventoryPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InventoryProperties model = BinaryData.fromString( - "{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"jzicwifsjt\",\"azureResourceId\":\"zfbishcbkhaj\",\"status\":\"Failed\",\"statusDetails\":\"a\",\"provisioningState\":\"Failed\"}") + "{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"ocukoklyax\",\"azureResourceId\":\"onuq\",\"status\":\"InProgress\",\"statusDetails\":\"beypewrmjmw\",\"provisioningState\":\"Succeeded\"}") .toObject(InventoryProperties.class); Assertions.assertEquals(CloudNativeType.EC2, model.cloudNativeType()); - Assertions.assertEquals("jzicwifsjt", model.cloudNativeResourceId()); - Assertions.assertEquals("zfbishcbkhaj", model.azureResourceId()); - Assertions.assertEquals(SolutionConfigurationStatus.FAILED, model.status()); - Assertions.assertEquals("a", model.statusDetails()); + Assertions.assertEquals("ocukoklyax", model.cloudNativeResourceId()); + Assertions.assertEquals("onuq", model.azureResourceId()); + Assertions.assertEquals(SolutionConfigurationStatus.IN_PROGRESS, model.status()); + Assertions.assertEquals("beypewrmjmw", model.statusDetails()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceInnerTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceInnerTests.java index a0701f40dfcf..ad7e65c049ae 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceInnerTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceInnerTests.java @@ -14,12 +14,12 @@ public final class InventoryResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InventoryResourceInner model = BinaryData.fromString( - "{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"rvjx\",\"azureResourceId\":\"nspydptkoenkoukn\",\"status\":\"Failed\",\"statusDetails\":\"tiukbldngkpoci\",\"provisioningState\":\"Succeeded\"},\"id\":\"xoegukgjnpiucgy\",\"name\":\"evqzntypmrbp\",\"type\":\"zcdrqjsdpydnfyhx\"}") + "{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"whonowk\",\"azureResourceId\":\"hwankixzbinjepu\",\"status\":\"New\",\"statusDetails\":\"ywnuzoq\",\"provisioningState\":\"Succeeded\"},\"id\":\"qzrnkcqvyxlwhz\",\"name\":\"sicohoqqnwvlry\",\"type\":\"vwhheunmmqhgyx\"}") .toObject(InventoryResourceInner.class); Assertions.assertEquals(CloudNativeType.EC2, model.properties().cloudNativeType()); - Assertions.assertEquals("rvjx", model.properties().cloudNativeResourceId()); - Assertions.assertEquals("nspydptkoenkoukn", model.properties().azureResourceId()); - Assertions.assertEquals(SolutionConfigurationStatus.FAILED, model.properties().status()); - Assertions.assertEquals("tiukbldngkpoci", model.properties().statusDetails()); + Assertions.assertEquals("whonowk", model.properties().cloudNativeResourceId()); + Assertions.assertEquals("hwankixzbinjepu", model.properties().azureResourceId()); + Assertions.assertEquals(SolutionConfigurationStatus.NEW, model.properties().status()); + Assertions.assertEquals("ywnuzoq", model.properties().statusDetails()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceListResultTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceListResultTests.java index 5775e062360e..384e90c07380 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceListResultTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/InventoryResourceListResultTests.java @@ -14,13 +14,13 @@ public final class InventoryResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InventoryResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"pbuxwgipwhon\",\"azureResourceId\":\"kgshwa\",\"status\":\"Failed\",\"statusDetails\":\"zbinjeputtm\",\"provisioningState\":\"Succeeded\"},\"id\":\"uzoqft\",\"name\":\"yqzrnkcqvyxlw\",\"type\":\"zlsico\"},{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"wvl\",\"azureResourceId\":\"avwhheunm\",\"status\":\"Completed\",\"statusDetails\":\"yxzk\",\"provisioningState\":\"Failed\"},\"id\":\"uko\",\"name\":\"lyaxuc\",\"type\":\"nuqszfkbey\"},{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"jmwvvj\",\"azureResourceId\":\"tcxsenhwlrs\",\"status\":\"Failed\",\"statusDetails\":\"pwvlqdq\",\"provisioningState\":\"Failed\"},\"id\":\"ylihkaetckt\",\"name\":\"fcivfsnkym\",\"type\":\"ctq\"},{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"brjcxe\",\"azureResourceId\":\"uwutttxfvjrbi\",\"status\":\"Failed\",\"statusDetails\":\"epcyvahfnlj\",\"provisioningState\":\"Canceled\"},\"id\":\"j\",\"name\":\"uujqgidokgjljyo\",\"type\":\"gvcl\"}],\"nextLink\":\"gsncghkjeszz\"}") + "{\"value\":[{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"senhwlrs\",\"azureResourceId\":\"rzpwvlqdqgbiq\",\"status\":\"Completed\",\"statusDetails\":\"kaet\",\"provisioningState\":\"Failed\"},\"id\":\"fcivfsnkym\",\"name\":\"ctq\",\"type\":\"jf\"},{\"properties\":{\"cloudNativeType\":\"ec2\",\"cloudNativeResourceId\":\"cxerf\",\"azureResourceId\":\"utttxfvjrbirp\",\"status\":\"Completed\",\"statusDetails\":\"c\",\"provisioningState\":\"Succeeded\"},\"id\":\"fnljky\",\"name\":\"xjvuujqgidokg\",\"type\":\"ljyoxgvcltb\"}],\"nextLink\":\"ncghkje\"}") .toObject(InventoryResourceListResult.class); Assertions.assertEquals(CloudNativeType.EC2, model.value().get(0).properties().cloudNativeType()); - Assertions.assertEquals("pbuxwgipwhon", model.value().get(0).properties().cloudNativeResourceId()); - Assertions.assertEquals("kgshwa", model.value().get(0).properties().azureResourceId()); - Assertions.assertEquals(SolutionConfigurationStatus.FAILED, model.value().get(0).properties().status()); - Assertions.assertEquals("zbinjeputtm", model.value().get(0).properties().statusDetails()); - Assertions.assertEquals("gsncghkjeszz", model.nextLink()); + Assertions.assertEquals("senhwlrs", model.value().get(0).properties().cloudNativeResourceId()); + Assertions.assertEquals("rzpwvlqdqgbiq", model.value().get(0).properties().azureResourceId()); + Assertions.assertEquals(SolutionConfigurationStatus.COMPLETED, model.value().get(0).properties().status()); + Assertions.assertEquals("kaet", model.value().get(0).properties().statusDetails()); + Assertions.assertEquals("ncghkje", model.nextLink()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/OperationsListMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/OperationsListMockTests.java index 9991765683e6..fa0258c84a77 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/OperationsListMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"l\",\"isDataAction\":false,\"display\":{\"provider\":\"q\",\"resource\":\"wpmqt\",\"operation\":\"uoujmkcjhwqy\",\"description\":\"r\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; + = "{\"value\":[{\"name\":\"cwzzhxgktr\",\"isDataAction\":true,\"display\":{\"provider\":\"apkteoellwptfdyg\",\"resource\":\"qbuaceopzfqr\",\"operation\":\"uaopppcqeq\",\"description\":\"lzdahzxctobgbkdm\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorListResultTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorListResultTests.java index cf76ff22e7d4..93268d3ceaa2 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorListResultTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorListResultTests.java @@ -13,15 +13,15 @@ public final class PublicCloudConnectorListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PublicCloudConnectorListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"rcjxvsnbyxqabn\",\"excludedAccounts\":[\"pcyshu\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Canceled\",\"connectorPrimaryIdentifier\":\"j\"},\"location\":\"btoqcjmkljavbqid\",\"tags\":{\"dj\":\"jzyulpk\",\"xzlocxscp\":\"rlkhbzhfepgzgq\"},\"id\":\"ierhhbcsglummaj\",\"name\":\"j\",\"type\":\"odxobnbdxkqpxok\"},{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"ionpimexg\",\"excludedAccounts\":[\"gcpo\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Canceled\",\"connectorPrimaryIdentifier\":\"mvdjwzrlovmc\"},\"location\":\"hijco\",\"tags\":{\"ukdkexxppofmxa\":\"tbzaqsqsycbkbfk\",\"jpgd\":\"c\"},\"id\":\"toc\",\"name\":\"j\",\"type\":\"hvpmoue\"},{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"dzxibqeojnxqbzvd\",\"excludedAccounts\":[\"wndeicbtwnp\"],\"isOrganizationalAccount\":false},\"hostType\":\"AWS\",\"provisioningState\":\"Succeeded\",\"connectorPrimaryIdentifier\":\"rhcffcydd\"},\"location\":\"mjthjqkwp\",\"tags\":{\"igdtopbob\":\"cxmqciwqvhkhix\"},\"id\":\"og\",\"name\":\"m\",\"type\":\"w\"},{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"m\",\"excludedAccounts\":[\"rzayv\",\"t\",\"gvdfgiotkftutq\",\"ln\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Canceled\",\"connectorPrimaryIdentifier\":\"gnxkrxdqmidtth\"},\"location\":\"vqdra\",\"tags\":{\"gehoqfbowskany\":\"yb\",\"rvynhzgpph\":\"tzlcuiywgqywgn\"},\"id\":\"cgyncocpecf\",\"name\":\"m\",\"type\":\"coofsxlzev\"}],\"nextLink\":\"m\"}") + "{\"value\":[{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"vddntwn\",\"excludedAccounts\":[\"cbtwnpzaoqvuh\",\"hcffcyddglmjthjq\",\"wpyeicxmqciwqvh\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Succeeded\",\"connectorPrimaryIdentifier\":\"dtopbob\"},\"location\":\"ghmewuam\",\"tags\":{\"t\":\"rzayv\",\"ln\":\"gvdfgiotkftutq\",\"qmi\":\"xlefgugnxkrx\",\"abhjybi\":\"tthzrvqd\"},\"id\":\"ehoqfbowskan\",\"name\":\"ktzlcuiywg\",\"type\":\"ywgndrv\"}],\"nextLink\":\"hzgpphrcgyncocpe\"}") .toObject(PublicCloudConnectorListResult.class); - Assertions.assertEquals("btoqcjmkljavbqid", model.value().get(0).location()); - Assertions.assertEquals("jzyulpk", model.value().get(0).tags().get("dj")); - Assertions.assertEquals("rcjxvsnbyxqabn", model.value().get(0).properties().awsCloudProfile().accountId()); - Assertions.assertEquals("pcyshu", + Assertions.assertEquals("ghmewuam", model.value().get(0).location()); + Assertions.assertEquals("rzayv", model.value().get(0).tags().get("t")); + Assertions.assertEquals("vddntwn", model.value().get(0).properties().awsCloudProfile().accountId()); + Assertions.assertEquals("cbtwnpzaoqvuh", model.value().get(0).properties().awsCloudProfile().excludedAccounts().get(0)); Assertions.assertEquals(true, model.value().get(0).properties().awsCloudProfile().isOrganizationalAccount()); Assertions.assertEquals(HostType.AWS, model.value().get(0).properties().hostType()); - Assertions.assertEquals("m", model.nextLink()); + Assertions.assertEquals("hzgpphrcgyncocpe", model.nextLink()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorPropertiesUpdateTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorPropertiesUpdateTests.java new file mode 100644 index 000000000000..360caad903e4 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorPropertiesUpdateTests.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfileUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorPropertiesUpdate; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PublicCloudConnectorPropertiesUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicCloudConnectorPropertiesUpdate model + = BinaryData.fromString("{\"awsCloudProfile\":{\"excludedAccounts\":[\"fjpgddtocjjxhvp\"]}}") + .toObject(PublicCloudConnectorPropertiesUpdate.class); + Assertions.assertEquals("fjpgddtocjjxhvp", model.awsCloudProfile().excludedAccounts().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicCloudConnectorPropertiesUpdate model = new PublicCloudConnectorPropertiesUpdate() + .withAwsCloudProfile(new AwsCloudProfileUpdate().withExcludedAccounts(Arrays.asList("fjpgddtocjjxhvp"))); + model = BinaryData.fromObject(model).toObject(PublicCloudConnectorPropertiesUpdate.class); + Assertions.assertEquals("fjpgddtocjjxhvp", model.awsCloudProfile().excludedAccounts().get(0)); + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorUpdateTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorUpdateTests.java new file mode 100644 index 000000000000..1f079d23bc44 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorUpdateTests.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridconnectivity.models.AwsCloudProfileUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorPropertiesUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.PublicCloudConnectorUpdate; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class PublicCloudConnectorUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PublicCloudConnectorUpdate model = BinaryData.fromString( + "{\"properties\":{\"awsCloudProfile\":{\"excludedAccounts\":[\"jxvsnbyxqabn\",\"ocpcy\",\"hurzafblj\"]}},\"tags\":{\"qajzyulpkudjkr\":\"btoqcjmkljavbqid\",\"e\":\"khbzhfepgzg\",\"scpai\":\"zloc\"},\"id\":\"hhbcsglummajtjao\",\"name\":\"xobnbdxkqpxok\",\"type\":\"jionpimexgstxgc\"}") + .toObject(PublicCloudConnectorUpdate.class); + Assertions.assertEquals("btoqcjmkljavbqid", model.tags().get("qajzyulpkudjkr")); + Assertions.assertEquals("jxvsnbyxqabn", model.properties().awsCloudProfile().excludedAccounts().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PublicCloudConnectorUpdate model = new PublicCloudConnectorUpdate() + .withTags(mapOf("qajzyulpkudjkr", "btoqcjmkljavbqid", "e", "khbzhfepgzg", "scpai", "zloc")) + .withProperties(new PublicCloudConnectorPropertiesUpdate().withAwsCloudProfile( + new AwsCloudProfileUpdate().withExcludedAccounts(Arrays.asList("jxvsnbyxqabn", "ocpcy", "hurzafblj")))); + model = BinaryData.fromObject(model).toObject(PublicCloudConnectorUpdate.class); + Assertions.assertEquals("btoqcjmkljavbqid", model.tags().get("qajzyulpkudjkr")); + Assertions.assertEquals("jxvsnbyxqabn", model.properties().awsCloudProfile().excludedAccounts().get(0)); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsCreateOrUpdateMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsCreateOrUpdateMockTests.java index 3512a49f0e34..899260ae6155 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsCreateOrUpdateMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsCreateOrUpdateMockTests.java @@ -27,7 +27,7 @@ public final class PublicCloudConnectorsCreateOrUpdateMockTests { @Test public void testCreateOrUpdate() throws Exception { String responseStr - = "{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"twwaezkojvdcpzf\",\"excludedAccounts\":[\"uicybxarzgszuf\",\"x\",\"iqopidoamciod\",\"khazxkhnzbonlwn\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Succeeded\",\"connectorPrimaryIdentifier\":\"wbw\"},\"location\":\"szzcmrvexztv\",\"tags\":{\"lmnguxaw\":\"gsfraoyzkoow\",\"uximerqfobw\":\"aldsy\",\"r\":\"znkbykutwpfhpagm\",\"kkze\":\"kdsnfdsdoakgtdl\"},\"id\":\"dlhewp\",\"name\":\"sdsttwvog\",\"type\":\"bbejdcngqqm\"}"; + = "{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"rxcyjmoad\",\"excludedAccounts\":[\"arm\",\"wdmjsjqbjhhyx\",\"rw\"],\"isOrganizationalAccount\":false},\"hostType\":\"AWS\",\"provisioningState\":\"Succeeded\",\"connectorPrimaryIdentifier\":\"p\"},\"location\":\"kgymareqnajxqug\",\"tags\":{\"ofwq\":\"ycubeddgs\"},\"id\":\"zqalkrmnjijpx\",\"name\":\"cqqudf\",\"type\":\"byxbaaabjy\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -37,22 +37,21 @@ public void testCreateOrUpdate() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PublicCloudConnector response = manager.publicCloudConnectors() - .define("or") - .withRegion("f") - .withExistingResourceGroup("ppriol") - .withTags(mapOf("bgdknnqv", "gj", "sgsahmkycgr", "aznqntoru", "s", "uwjuetaeburuvdmo", "tpuqujmq", - "zlxwabmqoefkifr")) + .define("fatkld") + .withRegion("imjwosyt") + .withExistingResourceGroup("elpcirelsfeaenwa") + .withTags(mapOf("zzikhlyfjhdg", "cskfcktqumiekk")) .withProperties( - new PublicCloudConnectorProperties().withAwsCloudProfile(new AwsCloudProfile().withAccountId("lt") - .withExcludedAccounts(Arrays.asList("ncwsob", "wcsdbnwdcfhucq", "pfuvglsbjjca", "vxb")) + new PublicCloudConnectorProperties().withAwsCloudProfile(new AwsCloudProfile().withAccountId("bjhwuaan") + .withExcludedAccounts(Arrays.asList("osphyoul")) .withIsOrganizationalAccount(true)).withHostType(HostType.AWS)) .create(); - Assertions.assertEquals("szzcmrvexztv", response.location()); - Assertions.assertEquals("gsfraoyzkoow", response.tags().get("lmnguxaw")); - Assertions.assertEquals("twwaezkojvdcpzf", response.properties().awsCloudProfile().accountId()); - Assertions.assertEquals("uicybxarzgszuf", response.properties().awsCloudProfile().excludedAccounts().get(0)); - Assertions.assertEquals(true, response.properties().awsCloudProfile().isOrganizationalAccount()); + Assertions.assertEquals("kgymareqnajxqug", response.location()); + Assertions.assertEquals("ycubeddgs", response.tags().get("ofwq")); + Assertions.assertEquals("rxcyjmoad", response.properties().awsCloudProfile().accountId()); + Assertions.assertEquals("arm", response.properties().awsCloudProfile().excludedAccounts().get(0)); + Assertions.assertEquals(false, response.properties().awsCloudProfile().isOrganizationalAccount()); Assertions.assertEquals(HostType.AWS, response.properties().hostType()); } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsDeleteByResourceGroupWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsDeleteByResourceGroupWithResponseMockTests.java index 5d191c166fa8..fe5ccccf1d3a 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsDeleteByResourceGroupWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.publicCloudConnectors() - .deleteByResourceGroupWithResponse("rwyhqmibzyhwitsm", "pyy", com.azure.core.util.Context.NONE); + .deleteByResourceGroupWithResponse("yvoqa", "piexpbtgiw", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsGetByResourceGroupWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsGetByResourceGroupWithResponseMockTests.java index 1063091b4c33..6c197a91880b 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsGetByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsGetByResourceGroupWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class PublicCloudConnectorsGetByResourceGroupWithResponseMockTests @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"xywsuws\",\"excludedAccounts\":[\"ndsytgadg\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Succeeded\",\"connectorPrimaryIdentifier\":\"e\"},\"location\":\"zar\",\"tags\":{\"uijfqk\":\"q\",\"ibwwiftohqkv\":\"cewiipfpub\",\"ljphuopxodl\":\"uvksgplsaknynfsy\",\"sjswsrms\":\"iyntorzihle\"},\"id\":\"yzrpzbchckqqzq\",\"name\":\"ox\",\"type\":\"ysuiizynkedya\"}"; + = "{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"uxvypomgkopkwh\",\"excludedAccounts\":[\"pajqgxysm\"],\"isOrganizationalAccount\":false},\"hostType\":\"AWS\",\"provisioningState\":\"Canceled\",\"connectorPrimaryIdentifier\":\"vmkcx\"},\"location\":\"apvhelxprgly\",\"tags\":{\"ejrjxgciqibrho\":\"dckcbc\"},\"id\":\"xsdqrhzoymibmrqy\",\"name\":\"bahwfl\",\"type\":\"szdtmhrkwof\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,14 +32,14 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PublicCloudConnector response = manager.publicCloudConnectors() - .getByResourceGroupWithResponse("pkkpw", "reqnovvqfov", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("nubexk", "zksmondj", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("zar", response.location()); - Assertions.assertEquals("q", response.tags().get("uijfqk")); - Assertions.assertEquals("xywsuws", response.properties().awsCloudProfile().accountId()); - Assertions.assertEquals("ndsytgadg", response.properties().awsCloudProfile().excludedAccounts().get(0)); - Assertions.assertEquals(true, response.properties().awsCloudProfile().isOrganizationalAccount()); + Assertions.assertEquals("apvhelxprgly", response.location()); + Assertions.assertEquals("dckcbc", response.tags().get("ejrjxgciqibrho")); + Assertions.assertEquals("uxvypomgkopkwh", response.properties().awsCloudProfile().accountId()); + Assertions.assertEquals("pajqgxysm", response.properties().awsCloudProfile().excludedAccounts().get(0)); + Assertions.assertEquals(false, response.properties().awsCloudProfile().isOrganizationalAccount()); Assertions.assertEquals(HostType.AWS, response.properties().hostType()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListByResourceGroupMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListByResourceGroupMockTests.java index 7da1767258e8..d69eb0e3bdbe 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListByResourceGroupMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListByResourceGroupMockTests.java @@ -23,7 +23,7 @@ public final class PublicCloudConnectorsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"wznm\",\"excludedAccounts\":[\"knso\",\"gj\",\"xbldtlwwrlkdmtn\"],\"isOrganizationalAccount\":false},\"hostType\":\"AWS\",\"provisioningState\":\"Failed\",\"connectorPrimaryIdentifier\":\"lxdy\"},\"location\":\"syocogjltdtbnnha\",\"tags\":{\"amqgxqquezikyw\":\"crkvcikhnv\",\"lla\":\"gxk\",\"z\":\"melwuipiccjz\"},\"id\":\"v\",\"name\":\"vvcnayr\",\"type\":\"yrnxxmueedn\"}]}"; + = "{\"value\":[{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"washr\",\"excludedAccounts\":[\"kcnqxwbpo\",\"ulpiuj\"],\"isOrganizationalAccount\":false},\"hostType\":\"AWS\",\"provisioningState\":\"Failed\",\"connectorPrimaryIdentifier\":\"i\"},\"location\":\"byuqerpqlp\",\"tags\":{\"t\":\"ciuqgbdb\",\"mhykojoxafnndl\":\"uvfbtkuwh\",\"kkpwdreqnovvq\":\"ichkoymkcdyhb\",\"syrsndsytgadgvra\":\"ovljxywsu\"},\"id\":\"aeneqnzarrwl\",\"name\":\"uu\",\"type\":\"jfqka\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,12 +33,12 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.publicCloudConnectors().listByResourceGroup("pcdpumnz", com.azure.core.util.Context.NONE); + = manager.publicCloudConnectors().listByResourceGroup("wo", com.azure.core.util.Context.NONE); - Assertions.assertEquals("syocogjltdtbnnha", response.iterator().next().location()); - Assertions.assertEquals("crkvcikhnv", response.iterator().next().tags().get("amqgxqquezikyw")); - Assertions.assertEquals("wznm", response.iterator().next().properties().awsCloudProfile().accountId()); - Assertions.assertEquals("knso", + Assertions.assertEquals("byuqerpqlp", response.iterator().next().location()); + Assertions.assertEquals("ciuqgbdb", response.iterator().next().tags().get("t")); + Assertions.assertEquals("washr", response.iterator().next().properties().awsCloudProfile().accountId()); + Assertions.assertEquals("kcnqxwbpo", response.iterator().next().properties().awsCloudProfile().excludedAccounts().get(0)); Assertions.assertEquals(false, response.iterator().next().properties().awsCloudProfile().isOrganizationalAccount()); diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListMockTests.java index a5bc209d22eb..81ddd99060d9 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/PublicCloudConnectorsListMockTests.java @@ -23,7 +23,7 @@ public final class PublicCloudConnectorsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"dvstkw\",\"excludedAccounts\":[\"chea\",\"mfmtdaaygdvw\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Succeeded\",\"connectorPrimaryIdentifier\":\"wxrt\"},\"location\":\"dxepxgyq\",\"tags\":{\"wi\":\"rvmnpkukghimdblx\",\"rey\":\"fnjhfjxwmszkkfo\",\"elpcirelsfeaenwa\":\"kzikfjawneaivxwc\",\"xbjhwuaanozjosph\":\"fatkld\"},\"id\":\"oulpjrv\",\"name\":\"ag\",\"type\":\"rvimjwosytxitcsk\"}]}"; + = "{\"value\":[{\"properties\":{\"awsCloudProfile\":{\"accountId\":\"wiipfpub\",\"excludedAccounts\":[\"wwiftohqkvpuv\",\"sgplsakn\"],\"isOrganizationalAccount\":true},\"hostType\":\"AWS\",\"provisioningState\":\"Canceled\",\"connectorPrimaryIdentifier\":\"jphuopxodlqi\"},\"location\":\"torzih\",\"tags\":{\"yzrpzbchckqqzq\":\"sjswsrms\",\"ysuiizynkedya\":\"ox\"},\"id\":\"rwyhqmibzyhwitsm\",\"name\":\"pyy\",\"type\":\"pcdpumnz\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,10 +35,10 @@ public void testList() throws Exception { PagedIterable response = manager.publicCloudConnectors().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("dxepxgyq", response.iterator().next().location()); - Assertions.assertEquals("rvmnpkukghimdblx", response.iterator().next().tags().get("wi")); - Assertions.assertEquals("dvstkw", response.iterator().next().properties().awsCloudProfile().accountId()); - Assertions.assertEquals("chea", + Assertions.assertEquals("torzih", response.iterator().next().location()); + Assertions.assertEquals("sjswsrms", response.iterator().next().tags().get("yzrpzbchckqqzq")); + Assertions.assertEquals("wiipfpub", response.iterator().next().properties().awsCloudProfile().accountId()); + Assertions.assertEquals("wwiftohqkvpuv", response.iterator().next().properties().awsCloudProfile().excludedAccounts().get(0)); Assertions.assertEquals(true, response.iterator().next().properties().awsCloudProfile().isOrganizationalAccount()); diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsCreateOrupdateWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsCreateOrupdateWithResponseMockTests.java index 27b0c5a9c889..91db72cc7cf6 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsCreateOrupdateWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsCreateOrupdateWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ServiceConfigurationsCreateOrupdateWithResponseMockTests { @Test public void testCreateOrupdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"serviceName\":\"SSH\",\"resourceId\":\"kcbcue\",\"port\":1999500267063441667,\"provisioningState\":\"Succeeded\"},\"id\":\"qibrhosxsdqrhzoy\",\"name\":\"i\",\"type\":\"m\"}"; + = "{\"properties\":{\"serviceName\":\"SSH\",\"resourceId\":\"edgfbcvkcvq\",\"port\":6395460850482092633,\"provisioningState\":\"Updating\"},\"id\":\"vdrhvoo\",\"name\":\"sotbob\",\"type\":\"dopcjwvnh\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,15 +32,15 @@ public void testCreateOrupdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServiceConfigurationResource response = manager.serviceConfigurations() - .define("quxvypomgkop") - .withExistingEndpoint("nubexk", "zksmondj") - .withServiceName(ServiceName.WAC) - .withResourceId("jvp") - .withPort(4279032137659144852L) + .define("ljuti") + .withExistingEndpoint("lvithhqzonosgg", "hcohfwdsjnk") + .withServiceName(ServiceName.SSH) + .withResourceId("cffgdkzzewk") + .withPort(4567739994281506426L) .create(); Assertions.assertEquals(ServiceName.SSH, response.serviceName()); - Assertions.assertEquals("kcbcue", response.resourceId()); - Assertions.assertEquals(1999500267063441667L, response.port()); + Assertions.assertEquals("edgfbcvkcvq", response.resourceId()); + Assertions.assertEquals(6395460850482092633L, response.port()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsDeleteWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsDeleteWithResponseMockTests.java index e045a8428e4a..7a7468986fe4 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsDeleteWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsDeleteWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.serviceConfigurations() - .deleteWithResponse("pcjwv", "hdldwmgxcxrsl", "mutwuoe", com.azure.core.util.Context.NONE); + .deleteWithResponse("seotgqrllt", "u", "lauwzizxbmpgcjef", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsGetWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsGetWithResponseMockTests.java index 1b390842024a..3240115e80dd 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsGetWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsGetWithResponseMockTests.java @@ -22,7 +22,7 @@ public final class ServiceConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"serviceName\":\"SSH\",\"resourceId\":\"xyjrxsagafcnih\",\"port\":3130876298104392093,\"provisioningState\":\"Failed\"},\"id\":\"dgfbcvkcvqvpke\",\"name\":\"dcvd\",\"type\":\"hvoodsotbobzd\"}"; + = "{\"properties\":{\"serviceName\":\"WAC\",\"resourceId\":\"ogqxndlkzgxhuri\",\"port\":4682291687998834787,\"provisioningState\":\"Canceled\"},\"id\":\"unkbebx\",\"name\":\"ubyyntw\",\"type\":\"rbqtkoie\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,11 +32,11 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServiceConfigurationResource response = manager.serviceConfigurations() - .getWithResponse("ewkfvhqcrai", "vpnpp", "uflrwd", com.azure.core.util.Context.NONE) + .getWithResponse("fzxmhhvhgureodkw", "bdagxt", "bqdxbx", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals(ServiceName.SSH, response.serviceName()); - Assertions.assertEquals("xyjrxsagafcnih", response.resourceId()); - Assertions.assertEquals(3130876298104392093L, response.port()); + Assertions.assertEquals(ServiceName.WAC, response.serviceName()); + Assertions.assertEquals("ogqxndlkzgxhuri", response.resourceId()); + Assertions.assertEquals(4682291687998834787L, response.port()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsListByEndpointResourceMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsListByEndpointResourceMockTests.java index d883a2d846c1..23609f848a2f 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsListByEndpointResourceMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/ServiceConfigurationsListByEndpointResourceMockTests.java @@ -23,7 +23,7 @@ public final class ServiceConfigurationsListByEndpointResourceMockTests { @Test public void testListByEndpointResource() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"serviceName\":\"WAC\",\"resourceId\":\"kzzlvmbmpaxmodf\",\"port\":3624195401715068445,\"provisioningState\":\"Creating\"},\"id\":\"bpfvm\",\"name\":\"yhrfouyftaakcpw\",\"type\":\"yzvqt\"}]}"; + = "{\"value\":[{\"properties\":{\"serviceName\":\"WAC\",\"resourceId\":\"hdneuelfph\",\"port\":5814437001624716680,\"provisioningState\":\"Succeeded\"},\"id\":\"fikdowwqu\",\"name\":\"v\",\"type\":\"zx\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,10 +33,10 @@ public void testListByEndpointResource() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.serviceConfigurations() - .listByEndpointResource("rpkhjwn", "yqsluic", com.azure.core.util.Context.NONE); + .listByEndpointResource("zmuvpbttdumorppx", "bmnzbtbhjpgl", com.azure.core.util.Context.NONE); Assertions.assertEquals(ServiceName.WAC, response.iterator().next().serviceName()); - Assertions.assertEquals("kzzlvmbmpaxmodf", response.iterator().next().resourceId()); - Assertions.assertEquals(3624195401715068445L, response.iterator().next().port()); + Assertions.assertEquals("hdneuelfph", response.iterator().next().resourceId()); + Assertions.assertEquals(5814437001624716680L, response.iterator().next().port()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationInnerTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationInnerTests.java index 094e3d72127d..ddc3c6f7cdb1 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationInnerTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationInnerTests.java @@ -16,18 +16,18 @@ public final class SolutionConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SolutionConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"solutionType\":\"npwlbjnpg\",\"solutionSettings\":{\"\":{\"suesnzw\":\"adehxnltyfsopp\",\"avo\":\"ej\",\"vudwx\":\"xzdmohctb\",\"gujjugwdkcglh\":\"ndnvo\"}},\"status\":\"InProgress\",\"statusDetails\":\"jdyggdtji\",\"lastSyncTime\":\"2021-08-21T20:33:35Z\"},\"id\":\"uofqwe\",\"name\":\"kh\",\"type\":\"enevfyexfwhybci\"}") + "{\"properties\":{\"provisioningState\":\"Canceled\",\"solutionType\":\"jj\",\"solutionSettings\":{\"\":{\"wmc\":\"udgwdslfho\",\"cftadeh\":\"npwlbjnpg\",\"dejbavo\":\"nltyfsoppusuesnz\"}},\"status\":\"Completed\",\"statusDetails\":\"mohctb\",\"lastSyncTime\":\"2021-09-18T10:27:07Z\"},\"id\":\"wxdndnvowgujjug\",\"name\":\"dkcglhsl\",\"type\":\"zj\"}") .toObject(SolutionConfigurationInner.class); - Assertions.assertEquals("npwlbjnpg", model.properties().solutionType()); + Assertions.assertEquals("jj", model.properties().solutionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SolutionConfigurationInner model = new SolutionConfigurationInner() - .withProperties(new SolutionConfigurationProperties().withSolutionType("npwlbjnpg") + .withProperties(new SolutionConfigurationProperties().withSolutionType("jj") .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))); model = BinaryData.fromObject(model).toObject(SolutionConfigurationInner.class); - Assertions.assertEquals("npwlbjnpg", model.properties().solutionType()); + Assertions.assertEquals("jj", model.properties().solutionType()); } // Use "Map.of" if available diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationListResultTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationListResultTests.java index d9ec684fcf8a..f4f766e3cd9d 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationListResultTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationListResultTests.java @@ -12,9 +12,9 @@ public final class SolutionConfigurationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SolutionConfigurationListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"solutionType\":\"ysou\",\"solutionSettings\":{\"oaeupfhyhltrpmo\":\"a\",\"uaodsfcpk\":\"jmcmatuokthfu\",\"xbezyiuokktwh\":\"xodpuozmyzydagfu\"},\"status\":\"New\",\"statusDetails\":\"zywqsmbsu\",\"lastSyncTime\":\"2021-04-26T13:01:12Z\"},\"id\":\"moryocfsfksym\",\"name\":\"dystkiiuxhqyud\",\"type\":\"o\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"solutionType\":\"b\",\"solutionSettings\":{\"rm\":\"vyifqrvkdvjsl\",\"ulexxbczwtr\":\"vdfwatkpn\",\"acspkwl\":\"wiqzbqjvsovmyo\"},\"status\":\"Failed\",\"statusDetails\":\"bpxjmfl\",\"lastSyncTime\":\"2021-10-06T08:44:01Z\"},\"id\":\"chrkcciwwzjuqk\",\"name\":\"rsa\",\"type\":\"iwkuofos\"},{\"properties\":{\"provisioningState\":\"Canceled\",\"solutionType\":\"auu\",\"solutionSettings\":{\"rfbyaosvexcso\":\"vxieduugidyj\"},\"status\":\"Completed\",\"statusDetails\":\"hocohslkev\",\"lastSyncTime\":\"2021-07-27T15:45:18Z\"},\"id\":\"zfbuhf\",\"name\":\"vfaxkffeiith\",\"type\":\"vmezy\"}],\"nextLink\":\"hxmzsbbzoggig\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"solutionType\":\"pnpulexxbczwtru\",\"solutionSettings\":{\"\":{\"vsovmyokac\":\"bq\"}},\"status\":\"InProgress\",\"statusDetails\":\"lhzdobp\",\"lastSyncTime\":\"2021-10-04T03:33:51Z\"},\"id\":\"lb\",\"name\":\"vnchrkcci\",\"type\":\"wzjuqk\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"solutionType\":\"jiwkuofoskghsau\",\"solutionSettings\":{\"\":{\"duugidyjr\":\"mvxi\",\"y\":\"f\"}},\"status\":\"Failed\",\"statusDetails\":\"e\",\"lastSyncTime\":\"2021-10-23T12:01:36Z\"},\"id\":\"npc\",\"name\":\"hocohslkev\",\"type\":\"eggzfb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"solutionType\":\"vfaxkffeiith\",\"solutionSettings\":{\"\":{\"shxmzsbbzoggigrx\":\"zy\"}},\"status\":\"New\",\"statusDetails\":\"vjxxjnsp\",\"lastSyncTime\":\"2021-07-31T00:27:15Z\"},\"id\":\"koen\",\"name\":\"ou\",\"type\":\"nvudwtiukb\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"solutionType\":\"kpoc\",\"solutionSettings\":{\"\":{\"ucgygevqz\":\"yxoegukgjnp\"}},\"status\":\"New\",\"statusDetails\":\"mrbpizcdrqj\",\"lastSyncTime\":\"2021-09-28T20:18:05Z\"},\"id\":\"dnfyhxdeoejzicwi\",\"name\":\"sjttgzfbish\",\"type\":\"bkh\"}],\"nextLink\":\"deyeamdphagalpbu\"}") .toObject(SolutionConfigurationListResult.class); - Assertions.assertEquals("ysou", model.value().get(0).properties().solutionType()); - Assertions.assertEquals("hxmzsbbzoggig", model.nextLink()); + Assertions.assertEquals("pnpulexxbczwtru", model.value().get(0).properties().solutionType()); + Assertions.assertEquals("deyeamdphagalpbu", model.nextLink()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationPropertiesTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationPropertiesTests.java index e4512536bc66..e23d2e7f1781 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationPropertiesTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationPropertiesTests.java @@ -15,17 +15,18 @@ public final class SolutionConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SolutionConfigurationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Canceled\",\"solutionType\":\"vdcsitynn\",\"solutionSettings\":{\"\":{\"qsc\":\"ectehf\",\"hcjrefovgmk\":\"eypvhezrkg\",\"yvxyqjp\":\"sle\"}},\"status\":\"Failed\",\"statusDetails\":\"tpngjcrcczsqpjh\",\"lastSyncTime\":\"2021-11-23T05:20:04Z\"}") + "{\"provisioningState\":\"Canceled\",\"solutionType\":\"gdtjixhbkuofqwey\",\"solutionSettings\":{\"\":{\"vfyexfw\":\"n\",\"nnaamdectehfiqsc\":\"ybcibvyvdcsit\",\"hcjrefovgmk\":\"eypvhezrkg\",\"yvxyqjp\":\"sle\"}},\"status\":\"Failed\",\"statusDetails\":\"tpngjcrcczsqpjh\",\"lastSyncTime\":\"2021-11-23T05:20:04Z\"}") .toObject(SolutionConfigurationProperties.class); - Assertions.assertEquals("vdcsitynn", model.solutionType()); + Assertions.assertEquals("gdtjixhbkuofqwey", model.solutionType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SolutionConfigurationProperties model = new SolutionConfigurationProperties().withSolutionType("vdcsitynn") - .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())); + SolutionConfigurationProperties model + = new SolutionConfigurationProperties().withSolutionType("gdtjixhbkuofqwey") + .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())); model = BinaryData.fromObject(model).toObject(SolutionConfigurationProperties.class); - Assertions.assertEquals("vdcsitynn", model.solutionType()); + Assertions.assertEquals("gdtjixhbkuofqwey", model.solutionType()); } // Use "Map.of" if available diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationPropertiesUpdateTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationPropertiesUpdateTests.java new file mode 100644 index 000000000000..10b069056ac8 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationPropertiesUpdateTests.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationPropertiesUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SolutionConfigurationPropertiesUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SolutionConfigurationPropertiesUpdate model = BinaryData.fromString( + "{\"solutionType\":\"ys\",\"solutionSettings\":{\"\":{\"yudxorrqnbp\":\"uxh\",\"vkd\":\"czvyifq\",\"d\":\"jsllrmv\"}}}") + .toObject(SolutionConfigurationPropertiesUpdate.class); + Assertions.assertEquals("ys", model.solutionType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SolutionConfigurationPropertiesUpdate model = new SolutionConfigurationPropertiesUpdate().withSolutionType("ys") + .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf())); + model = BinaryData.fromObject(model).toObject(SolutionConfigurationPropertiesUpdate.class); + Assertions.assertEquals("ys", model.solutionType()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationUpdateTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationUpdateTests.java new file mode 100644 index 000000000000..d259d4275c44 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationUpdateTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationPropertiesUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionConfigurationUpdate; +import com.azure.resourcemanager.hybridconnectivity.models.SolutionSettings; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class SolutionConfigurationUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SolutionConfigurationUpdate model = BinaryData.fromString( + "{\"properties\":{\"solutionType\":\"v\",\"solutionSettings\":{\"\":{\"pfhyhl\":\"unqecanoae\",\"atuokthfuiu\":\"rpmopjmc\",\"zydagfuaxbezyiuo\":\"odsfcpkvxodpuozm\"}}},\"id\":\"twhrdxwzywqsm\",\"name\":\"surex\",\"type\":\"moryocfsfksym\"}") + .toObject(SolutionConfigurationUpdate.class); + Assertions.assertEquals("v", model.properties().solutionType()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SolutionConfigurationUpdate model = new SolutionConfigurationUpdate() + .withProperties(new SolutionConfigurationPropertiesUpdate().withSolutionType("v") + .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))); + model = BinaryData.fromObject(model).toObject(SolutionConfigurationUpdate.class); + Assertions.assertEquals("v", model.properties().solutionType()); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsCreateOrUpdateWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsCreateOrUpdateWithResponseMockTests.java index 3bc54399f4a7..740891086eef 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsCreateOrUpdateWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsCreateOrUpdateWithResponseMockTests.java @@ -25,7 +25,7 @@ public final class SolutionConfigurationsCreateOrUpdateWithResponseMockTests { @Test public void testCreateOrUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"solutionType\":\"mbzonokix\",\"solutionSettings\":{\"\":{\"rlazszrnw\":\"irgzp\",\"fpwpjylwbt\":\"iin\"}},\"status\":\"InProgress\",\"statusDetails\":\"sj\",\"lastSyncTime\":\"2021-10-21T17:47:33Z\"},\"id\":\"zfjvfbgofe\",\"name\":\"jagrqmqhldvr\",\"type\":\"iiojnal\"}"; + = "{\"properties\":{\"provisioningState\":\"Canceled\",\"solutionType\":\"hziuiefozbhdms\",\"solutionSettings\":{\"\":{\"icslfaoq\":\"qhoftrmaequiah\",\"kaivwit\":\"piyylhalnswhccsp\"}},\"status\":\"Completed\",\"statusDetails\":\"wuggwolu\",\"lastSyncTime\":\"2021-02-16T05:41:02Z\"},\"id\":\"wem\",\"name\":\"ai\",\"type\":\"sbrgz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -35,13 +35,13 @@ public void testCreateOrUpdateWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SolutionConfiguration response = manager.solutionConfigurations() - .define("jabudurgkakmo") - .withExistingResourceUri("jxbkzbzkdvn") - .withProperties(new SolutionConfigurationProperties().withSolutionType("jk") + .define("sfraoyzko") + .withExistingResourceUri("exztvbtq") + .withProperties(new SolutionConfigurationProperties().withSolutionType("mnguxawqaldsyu") .withSolutionSettings(new SolutionSettings().withAdditionalProperties(mapOf()))) .create(); - Assertions.assertEquals("mbzonokix", response.properties().solutionType()); + Assertions.assertEquals("hziuiefozbhdms", response.properties().solutionType()); } // Use "Map.of" if available diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsDeleteByResourceGroupWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsDeleteByResourceGroupWithResponseMockTests.java index f12e1d7b11be..26cd8b8d7fbf 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsDeleteByResourceGroupWithResponseMockTests.java @@ -28,7 +28,7 @@ public void testDeleteWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.solutionConfigurations() - .deleteByResourceGroupWithResponse("scywuggwoluhc", "bwemhairs", com.azure.core.util.Context.NONE); + .deleteByResourceGroupWithResponse("patdooaojkniodko", "ebwnujhe", com.azure.core.util.Context.NONE); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsGetWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsGetWithResponseMockTests.java index d917907d60e9..9faf439e95d0 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsGetWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsGetWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SolutionConfigurationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Failed\",\"solutionType\":\"wae\",\"solutionSettings\":{\"\":{\"woyuhhziuief\":\"kopbminrf\",\"smlmzqhoftrm\":\"zbhd\"}},\"status\":\"New\",\"statusDetails\":\"iahxicsl\",\"lastSyncTime\":\"2021-03-06T05:00:38Z\"},\"id\":\"z\",\"name\":\"iyylhalnswhccsp\",\"type\":\"kaivwit\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"solutionType\":\"xnevfdnwn\",\"solutionSettings\":{\"\":{\"bjudpfrxtrthzv\":\"zsyyceuzso\",\"qbrqubpaxhexiili\":\"ytdw\",\"q\":\"pdtii\"}},\"status\":\"Completed\",\"statusDetails\":\"axoruzfgsquy\",\"lastSyncTime\":\"2021-03-18T06:01:03Z\"},\"id\":\"xleptramx\",\"name\":\"ezw\",\"type\":\"wnwxuqlcvyd\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,9 +31,9 @@ public void testGetWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SolutionConfiguration response = manager.solutionConfigurations() - .getWithResponse("akufgmjz", "wr", com.azure.core.util.Context.NONE) + .getWithResponse("ayffim", "zrtuzq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("wae", response.properties().solutionType()); + Assertions.assertEquals("xnevfdnwn", response.properties().solutionType()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsListMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsListMockTests.java index 9d6bc3e83fb9..96e71b4a0057 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsListMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionConfigurationsListMockTests.java @@ -22,7 +22,7 @@ public final class SolutionConfigurationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"solutionType\":\"ggicccnxqhue\",\"solutionSettings\":{\"zrncsdt\":\"tlstvlzywem\",\"bsfgytguslfea\":\"lusiy\",\"qukyhejhzi\":\"cy\",\"srp\":\"xgfpelolppv\"},\"status\":\"InProgress\",\"statusDetails\":\"zraehtwd\",\"lastSyncTime\":\"2021-10-09T15:06:55Z\"},\"id\":\"swibyr\",\"name\":\"dl\",\"type\":\"h\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"solutionType\":\"lt\",\"solutionSettings\":{\"\":{\"pagao\":\"vefkdlfoakggk\",\"jnsjervtiagxsd\":\"pulpqblylsyxk\",\"beyvpnqicvinvkjj\":\"zuempsbzkf\",\"yhmlwpaztzp\":\"dxrbuukzcle\"}},\"status\":\"InProgress\",\"statusDetails\":\"ckw\",\"lastSyncTime\":\"2021-07-01T12:09:49Z\"},\"id\":\"whxxbuyqax\",\"name\":\"feqztppriol\",\"type\":\"or\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,8 +32,8 @@ public void testList() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.solutionConfigurations().list("rgzdwmsweyp", com.azure.core.util.Context.NONE); + = manager.solutionConfigurations().list("msbvdkcrodtjinf", com.azure.core.util.Context.NONE); - Assertions.assertEquals("ggicccnxqhue", response.iterator().next().properties().solutionType()); + Assertions.assertEquals("lt", response.iterator().next().properties().solutionType()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypePropertiesTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypePropertiesTests.java index 16e6989a3aa9..c1e00f810367 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypePropertiesTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypePropertiesTests.java @@ -12,16 +12,16 @@ public final class SolutionTypePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SolutionTypeProperties model = BinaryData.fromString( - "{\"solutionType\":\"cuh\",\"description\":\"tcty\",\"supportedAzureRegions\":[\"lbbovplw\"],\"solutionSettings\":[{\"name\":\"vgyuguos\",\"displayName\":\"mkfssxqukkfplgm\",\"type\":\"sxnkjzkdeslpvlo\",\"description\":\"wiyighxpkdw\",\"allowedValues\":[\"aiuebbaumnyqu\",\"edeojnabc\",\"hsmtxpsiebtfhvp\"],\"defaultValue\":\"sapskr\"},{\"name\":\"qmhjjdhtld\",\"displayName\":\"kyzxuutk\",\"type\":\"cwscwsvlx\",\"description\":\"togt\",\"allowedValues\":[\"upqsx\",\"nmic\",\"kvceoveilovnotyf\"],\"defaultValue\":\"fcnj\"},{\"name\":\"k\",\"displayName\":\"nxdhbt\",\"type\":\"kphywpnvjto\",\"description\":\"nermcl\",\"allowedValues\":[\"lphox\",\"scrpabgyepsbjt\"],\"defaultValue\":\"zq\"}]}") + "{\"solutionType\":\"mg\",\"description\":\"nkjzkdeslpvlop\",\"supportedAzureRegions\":[\"ighxpk\",\"wzbaiue\"],\"solutionSettings\":[{\"name\":\"umnyqu\",\"displayName\":\"edeojnabc\",\"type\":\"hsmtxpsiebtfhvp\",\"description\":\"sapskr\",\"allowedValues\":[\"mhjjdhtldwkyzx\",\"utknc\",\"scwsv\"],\"defaultValue\":\"xotogtwrupqsxv\"}]}") .toObject(SolutionTypeProperties.class); - Assertions.assertEquals("cuh", model.solutionType()); - Assertions.assertEquals("tcty", model.description()); - Assertions.assertEquals("lbbovplw", model.supportedAzureRegions().get(0)); - Assertions.assertEquals("vgyuguos", model.solutionSettings().get(0).name()); - Assertions.assertEquals("mkfssxqukkfplgm", model.solutionSettings().get(0).displayName()); - Assertions.assertEquals("sxnkjzkdeslpvlo", model.solutionSettings().get(0).type()); - Assertions.assertEquals("wiyighxpkdw", model.solutionSettings().get(0).description()); - Assertions.assertEquals("aiuebbaumnyqu", model.solutionSettings().get(0).allowedValues().get(0)); - Assertions.assertEquals("sapskr", model.solutionSettings().get(0).defaultValue()); + Assertions.assertEquals("mg", model.solutionType()); + Assertions.assertEquals("nkjzkdeslpvlop", model.description()); + Assertions.assertEquals("ighxpk", model.supportedAzureRegions().get(0)); + Assertions.assertEquals("umnyqu", model.solutionSettings().get(0).name()); + Assertions.assertEquals("edeojnabc", model.solutionSettings().get(0).displayName()); + Assertions.assertEquals("hsmtxpsiebtfhvp", model.solutionSettings().get(0).type()); + Assertions.assertEquals("sapskr", model.solutionSettings().get(0).description()); + Assertions.assertEquals("mhjjdhtldwkyzx", model.solutionSettings().get(0).allowedValues().get(0)); + Assertions.assertEquals("xotogtwrupqsxv", model.solutionSettings().get(0).defaultValue()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceInnerTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceInnerTests.java index ec3596419a70..f50254df57b3 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceInnerTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceInnerTests.java @@ -12,16 +12,16 @@ public final class SolutionTypeResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SolutionTypeResourceInner model = BinaryData.fromString( - "{\"properties\":{\"solutionType\":\"jhtxfvgxbfsmxne\",\"description\":\"pvecxgodeb\",\"supportedAzureRegions\":[\"krbm\"],\"solutionSettings\":[{\"name\":\"gr\",\"displayName\":\"wflzlfbxzpuzy\",\"type\":\"ispnqzahmgkbrp\",\"description\":\"y\",\"allowedValues\":[\"ibnuqqkpik\",\"drgvtqagn\",\"uynhijg\"],\"defaultValue\":\"mebf\"},{\"name\":\"iarbutrcvpna\",\"displayName\":\"zmhjrunmp\",\"type\":\"ttdbhrbnl\",\"description\":\"nkxmyskpbhenbtk\",\"allowedValues\":[\"ywn\",\"tnrsyn\",\"qidybyx\",\"zfcl\"],\"defaultValue\":\"aaxdbabphlwrq\"},{\"name\":\"fkts\",\"displayName\":\"hsucoc\",\"type\":\"nyyazttbtwwrqpue\",\"description\":\"ckzywbiexzfeyue\",\"allowedValues\":[\"ibx\",\"jwbhqwalmuz\",\"oxaepd\",\"zjancuxr\"],\"defaultValue\":\"d\"}]},\"id\":\"avxbniwdjswztsdb\",\"name\":\"gnxytxhpzxbz\",\"type\":\"fzab\"}") + "{\"properties\":{\"solutionType\":\"hbijhtxfvgxb\",\"description\":\"mxnehmp\",\"supportedAzureRegions\":[\"xgodebfqkkrbmp\",\"kgriwflzlfbx\"],\"solutionSettings\":[{\"name\":\"zycispn\",\"displayName\":\"zahmgkbrpyydhibn\",\"type\":\"qqkpikadrg\",\"description\":\"tqagnbuynh\",\"allowedValues\":[\"gg\",\"ebf\",\"iarbutrcvpna\",\"zmhjrunmp\"],\"defaultValue\":\"ttdbhrbnl\"},{\"name\":\"nkxmyskpbhenbtk\",\"displayName\":\"xywnytnrsynlqidy\",\"type\":\"yxczfclh\",\"description\":\"axdbabph\",\"allowedValues\":[\"rqlfktsthsucocmn\",\"yazttbtwwrqpue\",\"ckzywbiexzfeyue\",\"xibxujwbhqwalm\"],\"defaultValue\":\"zyoxaepdkzjan\"},{\"name\":\"ux\",\"displayName\":\"hdwbavxbniwdjs\",\"type\":\"zt\",\"description\":\"dbpgnxytxhp\",\"allowedValues\":[\"bzpfzab\",\"lcuhxwtctyqiklb\"],\"defaultValue\":\"ovplw\"}]},\"id\":\"hvgyuguosvmk\",\"name\":\"ss\",\"type\":\"qukkfp\"}") .toObject(SolutionTypeResourceInner.class); - Assertions.assertEquals("jhtxfvgxbfsmxne", model.properties().solutionType()); - Assertions.assertEquals("pvecxgodeb", model.properties().description()); - Assertions.assertEquals("krbm", model.properties().supportedAzureRegions().get(0)); - Assertions.assertEquals("gr", model.properties().solutionSettings().get(0).name()); - Assertions.assertEquals("wflzlfbxzpuzy", model.properties().solutionSettings().get(0).displayName()); - Assertions.assertEquals("ispnqzahmgkbrp", model.properties().solutionSettings().get(0).type()); - Assertions.assertEquals("y", model.properties().solutionSettings().get(0).description()); - Assertions.assertEquals("ibnuqqkpik", model.properties().solutionSettings().get(0).allowedValues().get(0)); - Assertions.assertEquals("mebf", model.properties().solutionSettings().get(0).defaultValue()); + Assertions.assertEquals("hbijhtxfvgxb", model.properties().solutionType()); + Assertions.assertEquals("mxnehmp", model.properties().description()); + Assertions.assertEquals("xgodebfqkkrbmp", model.properties().supportedAzureRegions().get(0)); + Assertions.assertEquals("zycispn", model.properties().solutionSettings().get(0).name()); + Assertions.assertEquals("zahmgkbrpyydhibn", model.properties().solutionSettings().get(0).displayName()); + Assertions.assertEquals("qqkpikadrg", model.properties().solutionSettings().get(0).type()); + Assertions.assertEquals("tqagnbuynh", model.properties().solutionSettings().get(0).description()); + Assertions.assertEquals("gg", model.properties().solutionSettings().get(0).allowedValues().get(0)); + Assertions.assertEquals("ttdbhrbnl", model.properties().solutionSettings().get(0).defaultValue()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceListResultTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceListResultTests.java index ac77858608bc..5cbeab691062 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceListResultTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeResourceListResultTests.java @@ -12,19 +12,19 @@ public final class SolutionTypeResourceListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SolutionTypeResourceListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"solutionType\":\"dw\",\"description\":\"ntxhdzhlrqjbhck\",\"supportedAzureRegions\":[\"hrxsbk\",\"vpycanuzbp\",\"kafkuwbcrnwbm\"],\"solutionSettings\":[{\"name\":\"seyvj\",\"displayName\":\"srtslhspkdeem\",\"type\":\"ofmxagkvtmelmqkr\",\"description\":\"ahvljuaha\",\"allowedValues\":[\"hcdhmdual\",\"exq\"],\"defaultValue\":\"vfadmws\"},{\"name\":\"crgvxpvgom\",\"displayName\":\"lf\",\"type\":\"isgwbnbbeldawkz\",\"description\":\"ali\",\"allowedValues\":[\"rqhakauha\",\"hsfwxosowzxcug\"],\"defaultValue\":\"cjooxdjebwpucwwf\"}]},\"id\":\"vbvmeu\",\"name\":\"civyhzceuo\",\"type\":\"gjrwjueiotwmcdyt\"},{\"properties\":{\"solutionType\":\"it\",\"description\":\"rjaw\",\"supportedAzureRegions\":[\"gxhnisk\",\"fbkp\"],\"solutionSettings\":[{\"name\":\"klwndnhjdauwhv\",\"displayName\":\"l\",\"type\":\"zbtd\",\"description\":\"xujznbmpowu\",\"allowedValues\":[\"rzqlveu\",\"lupj\"],\"defaultValue\":\"khfxobbcswsrt\"},{\"name\":\"riplrbpbewtg\",\"displayName\":\"fgb\",\"type\":\"c\",\"description\":\"wxzvlvqhjkb\",\"allowedValues\":[\"ibtnmxiebwwaloay\",\"cgwrtzjuz\"],\"defaultValue\":\"wyzmhtxon\"}]},\"id\":\"ts\",\"name\":\"vjcbpwxqpsrknf\",\"type\":\"guvriuhprwmd\"},{\"properties\":{\"solutionType\":\"qtayri\",\"description\":\"ro\",\"supportedAzureRegions\":[\"exrmcqibycnojvk\",\"mefqsgzvahapjyzh\"],\"solutionSettings\":[{\"name\":\"qzcjrvxdj\",\"displayName\":\"lmwlxkvugfhzo\",\"type\":\"awjvzunluthnnp\",\"description\":\"nxipeil\",\"allowedValues\":[\"zuaejxd\",\"ltskzbbtd\",\"umveekgpwozuhkf\",\"bsjyofdx\"],\"defaultValue\":\"uusdttouwa\"},{\"name\":\"oekqvk\",\"displayName\":\"lns\",\"type\":\"vbxwyjsflhh\",\"description\":\"aalnjixi\",\"allowedValues\":[\"yaw\",\"oyaqcslyjpkiid\"],\"defaultValue\":\"yexz\"}]},\"id\":\"lixhnrztfol\",\"name\":\"bnxknalaulppg\",\"type\":\"dtpnapnyiropuhp\"},{\"properties\":{\"solutionType\":\"pgylg\",\"description\":\"itxmedjvcslynqww\",\"supportedAzureRegions\":[\"zzhxgktrm\"],\"solutionSettings\":[{\"name\":\"napkteoellw\",\"displayName\":\"tfdygpfqb\",\"type\":\"ac\",\"description\":\"op\",\"allowedValues\":[\"qrhhu\",\"opppcqeq\",\"ol\"],\"defaultValue\":\"dahzxctobg\"},{\"name\":\"kdmoi\",\"displayName\":\"postmgrcfbunrm\",\"type\":\"qjhhkxbpv\",\"description\":\"ymjhxxjyngudivkr\",\"allowedValues\":[\"wbxqzvszjfau\",\"j\"],\"defaultValue\":\"dxxiv\"},{\"name\":\"tvtc\",\"displayName\":\"aqtdoqmcbx\",\"type\":\"wvxysl\",\"description\":\"bhsfxob\",\"allowedValues\":[\"tkblmpewww\",\"bkrvrnsvshqj\",\"hxcr\"],\"defaultValue\":\"bfovasrruvwbhsq\"}]},\"id\":\"ubcgjbirxb\",\"name\":\"ybsrfbjfdtwss\",\"type\":\"t\"}],\"nextLink\":\"pvjzbe\"}") + "{\"value\":[{\"properties\":{\"solutionType\":\"xywpmueefjzwfqkq\",\"description\":\"ids\",\"supportedAzureRegions\":[\"nobglaocq\",\"tcc\",\"g\"],\"solutionSettings\":[{\"name\":\"xy\",\"displayName\":\"lmoyrx\",\"type\":\"wfudwpzntxhdzhl\",\"description\":\"qj\",\"allowedValues\":[\"ck\",\"rlhrxs\",\"kyv\"],\"defaultValue\":\"ycanuzbpzkafku\"}]},\"id\":\"crnwbmeh\",\"name\":\"seyvj\",\"type\":\"srtslhspkdeem\"},{\"properties\":{\"solutionType\":\"mx\",\"description\":\"kv\",\"supportedAzureRegions\":[\"lmqkrhahvlj\",\"ahaquh\"],\"solutionSettings\":[{\"name\":\"mdua\",\"displayName\":\"aex\",\"type\":\"pvfadmwsrcr\",\"description\":\"vxpvgomz\",\"allowedValues\":[\"misgwbnb\",\"e\"],\"defaultValue\":\"dawkzbali\"},{\"name\":\"urqhaka\",\"displayName\":\"hashsfwxosow\",\"type\":\"xcug\",\"description\":\"cjooxdjebwpucwwf\",\"allowedValues\":[\"vbvmeu\",\"civyhzceuo\",\"gjrwjueiotwmcdyt\"],\"defaultValue\":\"x\"}]},\"id\":\"txnrjaw\",\"name\":\"qwgxhniskx\",\"type\":\"bkpyc\"},{\"properties\":{\"solutionType\":\"wndnhj\",\"description\":\"uwhvylwzbtdhxujz\",\"supportedAzureRegions\":[\"pow\",\"wpr\"],\"solutionSettings\":[{\"name\":\"veual\",\"displayName\":\"pjmkhfxobbc\",\"type\":\"wsrtjriplrbpbe\",\"description\":\"tghfgblcgwxzvl\",\"allowedValues\":[\"hjkbegibtnmxieb\"],\"defaultValue\":\"waloayqcgwr\"}]},\"id\":\"j\",\"name\":\"zg\",\"type\":\"yzm\"},{\"properties\":{\"solutionType\":\"ongmtsa\",\"description\":\"cbpwxqpsrknft\",\"supportedAzureRegions\":[\"riuhprwm\",\"yvxqtayriwwroy\",\"bexrmcq\",\"bycnojvkn\"],\"solutionSettings\":[{\"name\":\"qsgzvahapj\",\"displayName\":\"zhpvgqzcjrvxd\",\"type\":\"zlmwlxkvugfhz\",\"description\":\"vawjvzunlu\",\"allowedValues\":[\"nnprn\",\"i\"],\"defaultValue\":\"eilpjzuaejxdu\"},{\"name\":\"tskzbbtdzumveek\",\"displayName\":\"pwo\",\"type\":\"uh\",\"description\":\"fpbsjyofdxl\",\"allowedValues\":[\"sd\"],\"defaultValue\":\"touwaboekqv\"},{\"name\":\"elnsmvbxw\",\"displayName\":\"jsflhhcaalnjix\",\"type\":\"sxyawjoyaqcs\",\"description\":\"yjpkiidzyexz\",\"allowedValues\":[\"lixhnrztfol\"],\"defaultValue\":\"bnxknalaulppg\"}]},\"id\":\"tpnapnyiropuhpig\",\"name\":\"pgylg\",\"type\":\"git\"}],\"nextLink\":\"edjvcslynqw\"}") .toObject(SolutionTypeResourceListResult.class); - Assertions.assertEquals("dw", model.value().get(0).properties().solutionType()); - Assertions.assertEquals("ntxhdzhlrqjbhck", model.value().get(0).properties().description()); - Assertions.assertEquals("hrxsbk", model.value().get(0).properties().supportedAzureRegions().get(0)); - Assertions.assertEquals("seyvj", model.value().get(0).properties().solutionSettings().get(0).name()); - Assertions.assertEquals("srtslhspkdeem", - model.value().get(0).properties().solutionSettings().get(0).displayName()); - Assertions.assertEquals("ofmxagkvtmelmqkr", model.value().get(0).properties().solutionSettings().get(0).type()); - Assertions.assertEquals("ahvljuaha", model.value().get(0).properties().solutionSettings().get(0).description()); - Assertions.assertEquals("hcdhmdual", + Assertions.assertEquals("xywpmueefjzwfqkq", model.value().get(0).properties().solutionType()); + Assertions.assertEquals("ids", model.value().get(0).properties().description()); + Assertions.assertEquals("nobglaocq", model.value().get(0).properties().supportedAzureRegions().get(0)); + Assertions.assertEquals("xy", model.value().get(0).properties().solutionSettings().get(0).name()); + Assertions.assertEquals("lmoyrx", model.value().get(0).properties().solutionSettings().get(0).displayName()); + Assertions.assertEquals("wfudwpzntxhdzhl", model.value().get(0).properties().solutionSettings().get(0).type()); + Assertions.assertEquals("qj", model.value().get(0).properties().solutionSettings().get(0).description()); + Assertions.assertEquals("ck", model.value().get(0).properties().solutionSettings().get(0).allowedValues().get(0)); - Assertions.assertEquals("vfadmws", model.value().get(0).properties().solutionSettings().get(0).defaultValue()); - Assertions.assertEquals("pvjzbe", model.nextLink()); + Assertions.assertEquals("ycanuzbpzkafku", + model.value().get(0).properties().solutionSettings().get(0).defaultValue()); + Assertions.assertEquals("edjvcslynqw", model.nextLink()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeSettingsPropertiesTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeSettingsPropertiesTests.java index 3318a2a4586b..de9059f61944 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeSettingsPropertiesTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypeSettingsPropertiesTests.java @@ -12,13 +12,13 @@ public final class SolutionTypeSettingsPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SolutionTypeSettingsProperties model = BinaryData.fromString( - "{\"name\":\"gxywpmue\",\"displayName\":\"fjz\",\"type\":\"fqkquj\",\"description\":\"dsuyonobgla\",\"allowedValues\":[\"qxtccmgyudx\"],\"defaultValue\":\"tlmoyrx\"}") + "{\"name\":\"micykvceoveilo\",\"displayName\":\"notyfjfcnjbkcn\",\"type\":\"dhbt\",\"description\":\"kphywpnvjto\",\"allowedValues\":[\"ermclfplphoxuscr\",\"abgy\"],\"defaultValue\":\"psbjta\"}") .toObject(SolutionTypeSettingsProperties.class); - Assertions.assertEquals("gxywpmue", model.name()); - Assertions.assertEquals("fjz", model.displayName()); - Assertions.assertEquals("fqkquj", model.type()); - Assertions.assertEquals("dsuyonobgla", model.description()); - Assertions.assertEquals("qxtccmgyudx", model.allowedValues().get(0)); - Assertions.assertEquals("tlmoyrx", model.defaultValue()); + Assertions.assertEquals("micykvceoveilo", model.name()); + Assertions.assertEquals("notyfjfcnjbkcn", model.displayName()); + Assertions.assertEquals("dhbt", model.type()); + Assertions.assertEquals("kphywpnvjto", model.description()); + Assertions.assertEquals("ermclfplphoxuscr", model.allowedValues().get(0)); + Assertions.assertEquals("psbjta", model.defaultValue()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesGetByResourceGroupWithResponseMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesGetByResourceGroupWithResponseMockTests.java index 06e250ba2000..3dcf09a6712d 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesGetByResourceGroupWithResponseMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesGetByResourceGroupWithResponseMockTests.java @@ -21,7 +21,7 @@ public final class SolutionTypesGetByResourceGroupWithResponseMockTests { @Test public void testGetByResourceGroupWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"solutionType\":\"opgxedkowepb\",\"description\":\"cr\",\"supportedAzureRegions\":[\"wccsnjvcdwxlpqek\",\"tn\",\"htjsying\",\"fq\"],\"solutionSettings\":[{\"name\":\"tdhtmdvyp\",\"displayName\":\"ikdgszywkbir\",\"type\":\"yuzhlhkjoqrvq\",\"description\":\"aatjinrvgoupmfi\",\"allowedValues\":[\"fggjioolvr\",\"x\",\"v\"],\"defaultValue\":\"kkgll\"}]},\"id\":\"jygvjayvbl\",\"name\":\"hvkzuh\",\"type\":\"xvvy\"}"; + = "{\"properties\":{\"solutionType\":\"rkvfgbvfvpdbo\",\"description\":\"cizsjqlhkrribdei\",\"supportedAzureRegions\":[\"p\",\"kghv\",\"ndzwmkrefa\",\"pjorwkqnyhg\"],\"solutionSettings\":[{\"name\":\"tjivfxzsjabib\",\"displayName\":\"ystawfsdjpvkvp\",\"type\":\"jxbkzbzkdvn\",\"description\":\"jabudurgkakmo\",\"allowedValues\":[\"hjjklff\",\"mouwqlgzrfzeey\",\"bizikayuhq\",\"bjbsybb\"],\"defaultValue\":\"wrv\"}]},\"id\":\"dgmfpgvmpipasl\",\"name\":\"haq\",\"type\":\"x\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -31,17 +31,17 @@ public void testGetByResourceGroupWithResponse() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); SolutionTypeResource response = manager.solutionTypes() - .getByResourceGroupWithResponse("mfe", "kerqwkyh", com.azure.core.util.Context.NONE) + .getByResourceGroupWithResponse("y", "unyowxwl", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("opgxedkowepb", response.properties().solutionType()); - Assertions.assertEquals("cr", response.properties().description()); - Assertions.assertEquals("wccsnjvcdwxlpqek", response.properties().supportedAzureRegions().get(0)); - Assertions.assertEquals("tdhtmdvyp", response.properties().solutionSettings().get(0).name()); - Assertions.assertEquals("ikdgszywkbir", response.properties().solutionSettings().get(0).displayName()); - Assertions.assertEquals("yuzhlhkjoqrvq", response.properties().solutionSettings().get(0).type()); - Assertions.assertEquals("aatjinrvgoupmfi", response.properties().solutionSettings().get(0).description()); - Assertions.assertEquals("fggjioolvr", response.properties().solutionSettings().get(0).allowedValues().get(0)); - Assertions.assertEquals("kkgll", response.properties().solutionSettings().get(0).defaultValue()); + Assertions.assertEquals("rkvfgbvfvpdbo", response.properties().solutionType()); + Assertions.assertEquals("cizsjqlhkrribdei", response.properties().description()); + Assertions.assertEquals("p", response.properties().supportedAzureRegions().get(0)); + Assertions.assertEquals("tjivfxzsjabib", response.properties().solutionSettings().get(0).name()); + Assertions.assertEquals("ystawfsdjpvkvp", response.properties().solutionSettings().get(0).displayName()); + Assertions.assertEquals("jxbkzbzkdvn", response.properties().solutionSettings().get(0).type()); + Assertions.assertEquals("jabudurgkakmo", response.properties().solutionSettings().get(0).description()); + Assertions.assertEquals("hjjklff", response.properties().solutionSettings().get(0).allowedValues().get(0)); + Assertions.assertEquals("wrv", response.properties().solutionSettings().get(0).defaultValue()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListByResourceGroupMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListByResourceGroupMockTests.java index 49ae4bbb4a3d..95ea22626774 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListByResourceGroupMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListByResourceGroupMockTests.java @@ -22,7 +22,7 @@ public final class SolutionTypesListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"solutionType\":\"fbn\",\"description\":\"mctlpdngitv\",\"supportedAzureRegions\":[\"hrixkwmy\",\"jejveg\",\"hbpnaixexccbd\",\"eaxhcexdrrvqahqk\"],\"solutionSettings\":[{\"name\":\"pwijnhy\",\"displayName\":\"svfycxzbfv\",\"type\":\"owvrvmtgjqppyos\",\"description\":\"ronzmyhgfip\",\"allowedValues\":[\"xkmcwaekrrjre\"],\"defaultValue\":\"fxtsgum\"},{\"name\":\"jglikkxwslolb\",\"displayName\":\"pvuzlmv\",\"type\":\"elfk\",\"description\":\"gplcrpwjxeznoigb\",\"allowedValues\":[\"jwmwkpnbs\",\"zejjoqk\",\"gfhsxttaugzxn\",\"aa\"],\"defaultValue\":\"pxdtnkdmkq\"}]},\"id\":\"lwuenvrkp\",\"name\":\"ou\",\"type\":\"ibreb\"}]}"; + = "{\"value\":[{\"properties\":{\"solutionType\":\"euyowqkd\",\"description\":\"t\",\"supportedAzureRegions\":[\"bi\"],\"solutionSettings\":[{\"name\":\"pikpz\",\"displayName\":\"mejzanlfzxia\",\"type\":\"rmbzo\",\"description\":\"okixrjqcir\",\"allowedValues\":[\"pfrlazsz\",\"nwoiind\"],\"defaultValue\":\"pwp\"},{\"name\":\"ylwbtlhflsjcdhsz\",\"displayName\":\"jvfbgofelja\",\"type\":\"rqmq\",\"description\":\"ldvriiiojnalghfk\",\"allowedValues\":[\"vsexsowuelu\",\"hhahhxvrhmzkwpjg\",\"wspughftqsxhqx\"],\"defaultValue\":\"j\"},{\"name\":\"ukndxdigrjgu\",\"displayName\":\"fzdm\",\"type\":\"yqtfihwh\",\"description\":\"otzi\",\"allowedValues\":[\"amvpphoszqzudph\"],\"defaultValue\":\"amvdkfwynwcvtbv\"}]},\"id\":\"yhmtnvyqiat\",\"name\":\"zwpcnpwzcjaesg\",\"type\":\"v\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -32,21 +32,20 @@ public void testListByResourceGroup() throws Exception { new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.solutionTypes().listByResourceGroup("gsopbyrqufegxu", com.azure.core.util.Context.NONE); + = manager.solutionTypes().listByResourceGroup("smwutwbdsrezpd", com.azure.core.util.Context.NONE); - Assertions.assertEquals("fbn", response.iterator().next().properties().solutionType()); - Assertions.assertEquals("mctlpdngitv", response.iterator().next().properties().description()); - Assertions.assertEquals("hrixkwmy", response.iterator().next().properties().supportedAzureRegions().get(0)); - Assertions.assertEquals("pwijnhy", response.iterator().next().properties().solutionSettings().get(0).name()); - Assertions.assertEquals("svfycxzbfv", + Assertions.assertEquals("euyowqkd", response.iterator().next().properties().solutionType()); + Assertions.assertEquals("t", response.iterator().next().properties().description()); + Assertions.assertEquals("bi", response.iterator().next().properties().supportedAzureRegions().get(0)); + Assertions.assertEquals("pikpz", response.iterator().next().properties().solutionSettings().get(0).name()); + Assertions.assertEquals("mejzanlfzxia", response.iterator().next().properties().solutionSettings().get(0).displayName()); - Assertions.assertEquals("owvrvmtgjqppyos", - response.iterator().next().properties().solutionSettings().get(0).type()); - Assertions.assertEquals("ronzmyhgfip", + Assertions.assertEquals("rmbzo", response.iterator().next().properties().solutionSettings().get(0).type()); + Assertions.assertEquals("okixrjqcir", response.iterator().next().properties().solutionSettings().get(0).description()); - Assertions.assertEquals("xkmcwaekrrjre", + Assertions.assertEquals("pfrlazsz", response.iterator().next().properties().solutionSettings().get(0).allowedValues().get(0)); - Assertions.assertEquals("fxtsgum", + Assertions.assertEquals("pwp", response.iterator().next().properties().solutionSettings().get(0).defaultValue()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListMockTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListMockTests.java index a8126a484a58..9a652a4fd2c1 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListMockTests.java +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/SolutionTypesListMockTests.java @@ -22,7 +22,7 @@ public final class SolutionTypesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"solutionType\":\"ysjkixqtnqttez\",\"description\":\"fffiak\",\"supportedAzureRegions\":[\"qqmtedltmmji\",\"yeozphvwauyqncy\"],\"solutionSettings\":[{\"name\":\"kvi\",\"displayName\":\"mdscwxqupev\",\"type\":\"hfstotxhojujbyp\",\"description\":\"lmcuvhixb\",\"allowedValues\":[\"yfwnylr\",\"ool\",\"ttpkiwkkbnujrywv\"],\"defaultValue\":\"y\"}]},\"id\":\"fpncurdo\",\"name\":\"wiithtywub\",\"type\":\"cbihwqk\"}]}"; + = "{\"value\":[{\"properties\":{\"solutionType\":\"yajguqfhwygzlv\",\"description\":\"kfxu\",\"supportedAzureRegions\":[\"dwzrmuh\",\"pfcqdp\",\"qxqvpsvuoymgc\",\"elvezrypq\"],\"solutionSettings\":[{\"name\":\"eokerqwkyhkobopg\",\"displayName\":\"edkowepbqpcrfk\",\"type\":\"wccsnjvcdwxlpqek\",\"description\":\"tn\",\"allowedValues\":[\"tjsyin\",\"wfqatmtd\"],\"defaultValue\":\"tmdvypgikdgs\"}]},\"id\":\"w\",\"name\":\"birryuzhl\",\"type\":\"kj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -33,18 +33,19 @@ public void testList() throws Exception { PagedIterable response = manager.solutionTypes().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ysjkixqtnqttez", response.iterator().next().properties().solutionType()); - Assertions.assertEquals("fffiak", response.iterator().next().properties().description()); - Assertions.assertEquals("qqmtedltmmji", response.iterator().next().properties().supportedAzureRegions().get(0)); - Assertions.assertEquals("kvi", response.iterator().next().properties().solutionSettings().get(0).name()); - Assertions.assertEquals("mdscwxqupev", + Assertions.assertEquals("yajguqfhwygzlv", response.iterator().next().properties().solutionType()); + Assertions.assertEquals("kfxu", response.iterator().next().properties().description()); + Assertions.assertEquals("dwzrmuh", response.iterator().next().properties().supportedAzureRegions().get(0)); + Assertions.assertEquals("eokerqwkyhkobopg", + response.iterator().next().properties().solutionSettings().get(0).name()); + Assertions.assertEquals("edkowepbqpcrfk", response.iterator().next().properties().solutionSettings().get(0).displayName()); - Assertions.assertEquals("hfstotxhojujbyp", + Assertions.assertEquals("wccsnjvcdwxlpqek", response.iterator().next().properties().solutionSettings().get(0).type()); - Assertions.assertEquals("lmcuvhixb", - response.iterator().next().properties().solutionSettings().get(0).description()); - Assertions.assertEquals("yfwnylr", + Assertions.assertEquals("tn", response.iterator().next().properties().solutionSettings().get(0).description()); + Assertions.assertEquals("tjsyin", response.iterator().next().properties().solutionSettings().get(0).allowedValues().get(0)); - Assertions.assertEquals("y", response.iterator().next().properties().solutionSettings().get(0).defaultValue()); + Assertions.assertEquals("tmdvypgikdgs", + response.iterator().next().properties().solutionSettings().get(0).defaultValue()); } } diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/TrackedResourceUpdateTests.java b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/TrackedResourceUpdateTests.java new file mode 100644 index 000000000000..db472676d134 --- /dev/null +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/src/test/java/com/azure/resourcemanager/hybridconnectivity/generated/TrackedResourceUpdateTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.hybridconnectivity.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.hybridconnectivity.models.TrackedResourceUpdate; +import java.util.HashMap; +import java.util.Map; +import org.junit.jupiter.api.Assertions; + +public final class TrackedResourceUpdateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + TrackedResourceUpdate model = BinaryData.fromString( + "{\"tags\":{\"djwzrlov\":\"gmaajrm\"},\"id\":\"lwhijcoejctbzaq\",\"name\":\"qsycbkbfkgu\",\"type\":\"dkexxppofm\"}") + .toObject(TrackedResourceUpdate.class); + Assertions.assertEquals("gmaajrm", model.tags().get("djwzrlov")); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + TrackedResourceUpdate model = new TrackedResourceUpdate().withTags(mapOf("djwzrlov", "gmaajrm")); + model = BinaryData.fromObject(model).toObject(TrackedResourceUpdate.class); + Assertions.assertEquals("gmaajrm", model.tags().get("djwzrlov")); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml index bbaeb384ae0f..648530b200be 100644 --- a/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml +++ b/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/hybridconnectivity/HybridConnectivity.Management -commit: 6f175c9c006269a1d0f1928fbc768cacc6ac379a +commit: c2e4113b9a57a471dff9fcb8bed9dad94d15351b repo: Azure/azure-rest-api-specs additionalDirectories: