diff --git a/sdk/quantum/azure-resourcemanager-quantum/CHANGELOG.md b/sdk/quantum/azure-resourcemanager-quantum/CHANGELOG.md index 1199ab0a1032..877ac2c36edd 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/CHANGELOG.md +++ b/sdk/quantum/azure-resourcemanager-quantum/CHANGELOG.md @@ -1,14 +1,33 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2024-03-15) + +- Azure Resource Manager AzureQuantum client library for Java. This package contains Microsoft Azure SDK for AzureQuantum Management SDK. Package tag package-2023-11-13-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added -### Breaking Changes +* `models.ApiKey` was added + +* `models.ApiKeys` was added + +* `models.ListKeysResult` was added + +* `models.KeyType` was added + +#### `models.QuantumWorkspace$Definition` was modified + +* `withApiKeyEnabled(java.lang.Boolean)` was added + +#### `models.WorkspaceOperations` was modified + +* `regenerateKeysWithResponse(java.lang.String,java.lang.String,models.ApiKeys,com.azure.core.util.Context)` was added +* `listKeys(java.lang.String,java.lang.String)` was added +* `listKeysWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added +* `regenerateKeys(java.lang.String,java.lang.String,models.ApiKeys)` was added -### Bugs Fixed +#### `models.QuantumWorkspace` was modified -### Other Changes +* `apiKeyEnabled()` was added ## 1.0.0-beta.1 (2023-07-21) diff --git a/sdk/quantum/azure-resourcemanager-quantum/README.md b/sdk/quantum/azure-resourcemanager-quantum/README.md index 559192cd6e77..d09472dc2394 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/README.md +++ b/sdk/quantum/azure-resourcemanager-quantum/README.md @@ -2,7 +2,7 @@ Azure Resource Manager AzureQuantum client library for Java. -This package contains Microsoft Azure SDK for AzureQuantum Management SDK. Package tag package-2022-01-10-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for AzureQuantum Management SDK. Package tag package-2023-11-13-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-quantum - 1.0.0-beta.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/quantum/azure-resourcemanager-quantum/SAMPLE.md b/sdk/quantum/azure-resourcemanager-quantum/SAMPLE.md index 24dabb4e88d1..22738b15d8c8 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/SAMPLE.md +++ b/sdk/quantum/azure-resourcemanager-quantum/SAMPLE.md @@ -12,6 +12,8 @@ ## WorkspaceOperation - [CheckNameAvailability](#workspaceoperation_checknameavailability) +- [ListKeys](#workspaceoperation_listkeys) +- [RegenerateKeys](#workspaceoperation_regeneratekeys) ## Workspaces @@ -24,14 +26,17 @@ ### Offerings_List ```java -/** Samples for Offerings List. */ +/** + * Samples for Offerings List. + */ public final class OfferingsListSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/offeringsList.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/offeringsList.json */ /** * Sample code: OfferingsList. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void offeringsList(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { @@ -43,14 +48,17 @@ public final class OfferingsListSamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/operations.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/operations.json */ /** * Sample code: Operations. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void operations(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { @@ -64,58 +72,106 @@ public final class OperationsListSamples { ```java import com.azure.resourcemanager.quantum.models.CheckNameAvailabilityParameters; -/** Samples for WorkspaceOperation CheckNameAvailability. */ +/** + * Samples for WorkspaceOperation CheckNameAvailability. + */ public final class WorkspaceOperationCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesCheckNameAvailability.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesCheckNameAvailability.json */ /** * Sample code: QuantumWorkspacesCheckNameAvailability. - * + * * @param manager Entry point to AzureQuantumManager. */ - public static void quantumWorkspacesCheckNameAvailability( - com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - manager - .workspaceOperations() - .checkNameAvailabilityWithResponse( - "westus2", - new CheckNameAvailabilityParameters() - .withName("sample-workspace-name") - .withType("Microsoft.Quantum/Workspaces"), + public static void + quantumWorkspacesCheckNameAvailability(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + manager.workspaceOperations() + .checkNameAvailabilityWithResponse("westus2", new CheckNameAvailabilityParameters() + .withName("sample-workspace-name").withType("Microsoft.Quantum/Workspaces"), com.azure.core.util.Context.NONE); } } ``` +### WorkspaceOperation_ListKeys + +```java +/** + * Samples for WorkspaceOperation ListKeys. + */ +public final class WorkspaceOperationListKeysSamples { + /* + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/listKeys.json + */ + /** + * Sample code: ListKeys. + * + * @param manager Entry point to AzureQuantumManager. + */ + public static void listKeys(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + manager.workspaceOperations().listKeysWithResponse("quantumResourcegroup", "quantumworkspace1", + com.azure.core.util.Context.NONE); + } +} +``` + +### WorkspaceOperation_RegenerateKeys + +```java +import com.azure.resourcemanager.quantum.models.ApiKeys; +import com.azure.resourcemanager.quantum.models.KeyType; +import java.util.Arrays; + +/** + * Samples for WorkspaceOperation RegenerateKeys. + */ +public final class WorkspaceOperationRegenerateKeysSamples { + /* + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/regenerateKey.json + */ + /** + * Sample code: RegenerateKey. + * + * @param manager Entry point to AzureQuantumManager. + */ + public static void regenerateKey(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + manager.workspaceOperations().regenerateKeysWithResponse("quantumResourcegroup", "quantumworkspace1", + new ApiKeys().withKeys(Arrays.asList(KeyType.PRIMARY, KeyType.SECONDARY)), + com.azure.core.util.Context.NONE); + } +} +``` + ### Workspaces_CreateOrUpdate ```java import com.azure.resourcemanager.quantum.models.Provider; import java.util.Arrays; -/** Samples for Workspaces CreateOrUpdate. */ +/** + * Samples for Workspaces CreateOrUpdate. + */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesPut.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/quantumWorkspacesPut + * .json */ /** * Sample code: QuantumWorkspacesPut. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesPut(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - manager - .workspaces() - .define("quantumworkspace1") - .withRegion("West US") + manager.workspaces().define("quantumworkspace1").withRegion("West US") .withExistingResourceGroup("quantumResourcegroup") - .withProviders( - Arrays - .asList( - new Provider().withProviderId("Honeywell").withProviderSku("Basic"), - new Provider().withProviderId("IonQ").withProviderSku("Basic"), - new Provider().withProviderId("OneQBit").withProviderSku("Basic"))) + .withProviders(Arrays.asList(new Provider().withProviderId("Honeywell").withProviderSku("Basic"), + new Provider().withProviderId("IonQ").withProviderSku("Basic"), + new Provider().withProviderId("OneQBit").withProviderSku("Basic"))) .withStorageAccount( "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount") .create(); @@ -126,14 +182,17 @@ public final class WorkspacesCreateOrUpdateSamples { ### Workspaces_Delete ```java -/** Samples for Workspaces Delete. */ +/** + * Samples for Workspaces Delete. + */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesDelete.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesDelete.json */ /** * Sample code: QuantumWorkspacesDelete. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesDelete(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { @@ -145,21 +204,23 @@ public final class WorkspacesDeleteSamples { ### Workspaces_GetByResourceGroup ```java -/** Samples for Workspaces GetByResourceGroup. */ +/** + * Samples for Workspaces GetByResourceGroup. + */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesGet.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/quantumWorkspacesGet + * .json */ /** * Sample code: QuantumWorkspacesGet. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesGet(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - manager - .workspaces() - .getByResourceGroupWithResponse( - "quantumResourcegroup", "quantumworkspace1", com.azure.core.util.Context.NONE); + manager.workspaces().getByResourceGroupWithResponse("quantumResourcegroup", "quantumworkspace1", + com.azure.core.util.Context.NONE); } } ``` @@ -167,18 +228,21 @@ public final class WorkspacesGetByResourceGroupSamples { ### Workspaces_List ```java -/** Samples for Workspaces List. */ +/** + * Samples for Workspaces List. + */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesListSubscription.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesListSubscription.json */ /** * Sample code: QuantumWorkspacesListBySubscription. - * + * * @param manager Entry point to AzureQuantumManager. */ - public static void quantumWorkspacesListBySubscription( - com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + public static void + quantumWorkspacesListBySubscription(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { manager.workspaces().list(com.azure.core.util.Context.NONE); } } @@ -187,18 +251,21 @@ public final class WorkspacesListSamples { ### Workspaces_ListByResourceGroup ```java -/** Samples for Workspaces ListByResourceGroup. */ +/** + * Samples for Workspaces ListByResourceGroup. + */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesListResourceGroup.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesListResourceGroup.json */ /** * Sample code: QuantumWorkspacesListByResourceGroup. - * + * * @param manager Entry point to AzureQuantumManager. */ - public static void quantumWorkspacesListByResourceGroup( - com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + public static void + quantumWorkspacesListByResourceGroup(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { manager.workspaces().listByResourceGroup("quantumResourcegroup", com.azure.core.util.Context.NONE); } } @@ -211,26 +278,26 @@ import com.azure.resourcemanager.quantum.models.QuantumWorkspace; import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces UpdateTags. */ +/** + * Samples for Workspaces UpdateTags. + */ public final class WorkspacesUpdateTagsSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesPatch.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesPatch.json */ /** * Sample code: QuantumWorkspacesPatchTags. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesPatchTags(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - QuantumWorkspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse( - "quantumResourcegroup", "quantumworkspace1", com.azure.core.util.Context.NONE) - .getValue(); + QuantumWorkspace resource = manager.workspaces().getByResourceGroupWithResponse("quantumResourcegroup", + "quantumworkspace1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/pom.xml b/sdk/quantum/azure-resourcemanager-quantum/pom.xml index fe2a38268d6a..450b0cef4c5c 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/pom.xml +++ b/sdk/quantum/azure-resourcemanager-quantum/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for AzureQuantum Management - This package contains Microsoft Azure SDK for AzureQuantum Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-01-10-preview. + This package contains Microsoft Azure SDK for AzureQuantum Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-11-13-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,6 +45,7 @@ UTF-8 0 0 + true @@ -87,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/AzureQuantumManager.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/AzureQuantumManager.java index ca94aca262c9..ac4e2d2605aa 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/AzureQuantumManager.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/AzureQuantumManager.java @@ -40,7 +40,9 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to AzureQuantumManager. */ +/** + * Entry point to AzureQuantumManager. + */ public final class AzureQuantumManager { private Workspaces workspaces; @@ -55,18 +57,14 @@ public final class AzureQuantumManager { private AzureQuantumManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new AzureQuantumManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new AzureQuantumManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of AzureQuantum service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the AzureQuantum service API instance. @@ -79,7 +77,7 @@ public static AzureQuantumManager authenticate(TokenCredential credential, Azure /** * Creates an instance of AzureQuantum service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the AzureQuantum service API instance. @@ -92,14 +90,16 @@ public static AzureQuantumManager authenticate(HttpPipeline httpPipeline, AzureP /** * Gets a Configurable instance that can be used to create AzureQuantumManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new AzureQuantumManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -171,8 +171,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -189,8 +189,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -210,21 +210,12 @@ public AzureQuantumManager authenticate(TokenCredential credential, AzureProfile Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.quantum") - .append("/") - .append("1.0.0-beta.1"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.quantum").append("/") + .append("1.0.0-beta.2"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -243,38 +234,25 @@ public AzureQuantumManager authenticate(TokenCredential credential, AzureProfile policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new AzureQuantumManager(httpPipeline, profile, defaultPollInterval); } } /** * Gets the resource collection API of Workspaces. It manages QuantumWorkspace. - * + * * @return Resource collection API of Workspaces. */ public Workspaces workspaces() { @@ -286,7 +264,7 @@ public Workspaces workspaces() { /** * Gets the resource collection API of Offerings. - * + * * @return Resource collection API of Offerings. */ public Offerings offerings() { @@ -298,7 +276,7 @@ public Offerings offerings() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -310,7 +288,7 @@ public Operations operations() { /** * Gets the resource collection API of WorkspaceOperations. - * + * * @return Resource collection API of WorkspaceOperations. */ public WorkspaceOperations workspaceOperations() { @@ -321,8 +299,10 @@ public WorkspaceOperations workspaceOperations() { } /** - * @return Wrapped service client AzureQuantumManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * Gets wrapped service client AzureQuantumManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + * + * @return Wrapped service client AzureQuantumManagementClient. */ public AzureQuantumManagementClient serviceClient() { return this.clientObject; diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/AzureQuantumManagementClient.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/AzureQuantumManagementClient.java index 249f89e35340..5abc8e88d148 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/AzureQuantumManagementClient.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/AzureQuantumManagementClient.java @@ -7,67 +7,69 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for AzureQuantumManagementClient class. */ +/** + * The interface for AzureQuantumManagementClient class. + */ public interface AzureQuantumManagementClient { /** - * Gets The Azure subscription ID. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); /** * Gets the WorkspacesClient object to access its operations. - * + * * @return the WorkspacesClient object. */ WorkspacesClient getWorkspaces(); /** * Gets the OfferingsClient object to access its operations. - * + * * @return the OfferingsClient object. */ OfferingsClient getOfferings(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** * Gets the WorkspaceOperationsClient object to access its operations. - * + * * @return the WorkspaceOperationsClient object. */ WorkspaceOperationsClient getWorkspaceOperations(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OfferingsClient.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OfferingsClient.java index 33ca6ac458d9..8fa8eebb1bba 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OfferingsClient.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OfferingsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.quantum.fluent.models.ProviderDescriptionInner; -/** An instance of this class provides access to all the operations defined in OfferingsClient. */ +/** + * An instance of this class provides access to all the operations defined in OfferingsClient. + */ public interface OfferingsClient { /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -26,7 +28,7 @@ public interface OfferingsClient { /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OperationsClient.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OperationsClient.java index 853bab8ec420..8cf0abb9ba60 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OperationsClient.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/OperationsClient.java @@ -10,11 +10,13 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.quantum.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Returns list of operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return lists the operations available as paginated response with {@link PagedIterable}. @@ -24,7 +26,7 @@ public interface OperationsClient { /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspaceOperationsClient.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspaceOperationsClient.java index 00ff2607c5da..de541b77db5a 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspaceOperationsClient.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspaceOperationsClient.java @@ -9,13 +9,17 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.quantum.fluent.models.CheckNameAvailabilityResultInner; +import com.azure.resourcemanager.quantum.fluent.models.ListKeysResultInner; +import com.azure.resourcemanager.quantum.models.ApiKeys; import com.azure.resourcemanager.quantum.models.CheckNameAvailabilityParameters; -/** An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. + */ public interface WorkspaceOperationsClient { /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -25,12 +29,12 @@ public interface WorkspaceOperationsClient { * @return result of check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context); + Response checkNameAvailabilityWithResponse(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context); /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -39,6 +43,66 @@ Response checkNameAvailabilityWithResponse( * @return result of check name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResultInner checkNameAvailability( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters); + CheckNameAvailabilityResultInner checkNameAvailability(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters); + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listKeysWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ListKeysResultInner listKeys(String resourceGroupName, String workspaceName); + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, ApiKeys keySpecification, + Context context); + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void regenerateKeys(String resourceGroupName, String workspaceName, ApiKeys keySpecification); } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspacesClient.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspacesClient.java index befc7e2f0469..0327e407ff0a 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspacesClient.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/WorkspacesClient.java @@ -14,12 +14,14 @@ import com.azure.resourcemanager.quantum.fluent.models.QuantumWorkspaceInner; import com.azure.resourcemanager.quantum.models.TagsObject; -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ public interface WorkspacesClient { /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -28,13 +30,13 @@ public interface WorkspacesClient { * @return the resource proxy definition object for quantum workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context); /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -46,8 +48,8 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -56,13 +58,13 @@ Response getByResourceGroupWithResponse( * @return the {@link SyncPoller} for polling of the resource proxy definition object for quantum workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, QuantumWorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace); + SyncPoller, QuantumWorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, QuantumWorkspaceInner quantumWorkspace); /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @param context The context to associate with this operation. @@ -72,13 +74,13 @@ SyncPoller, QuantumWorkspaceInner> beginCreate * @return the {@link SyncPoller} for polling of the resource proxy definition object for quantum workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, QuantumWorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context); + SyncPoller, QuantumWorkspaceInner> beginCreateOrUpdate(String resourceGroupName, + String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context); /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -87,13 +89,13 @@ SyncPoller, QuantumWorkspaceInner> beginCreate * @return the resource proxy definition object for quantum workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - QuantumWorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace); + QuantumWorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, + QuantumWorkspaceInner quantumWorkspace); /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @param context The context to associate with this operation. @@ -103,13 +105,13 @@ QuantumWorkspaceInner createOrUpdate( * @return the resource proxy definition object for quantum workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - QuantumWorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context); + QuantumWorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, + QuantumWorkspaceInner quantumWorkspace, Context context); /** * Updates an existing workspace's tags. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param workspaceTags Parameters supplied to update tags. * @param context The context to associate with this operation. @@ -119,13 +121,13 @@ QuantumWorkspaceInner createOrUpdate( * @return the resource proxy definition object for quantum workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateTagsWithResponse( - String resourceGroupName, String workspaceName, TagsObject workspaceTags, Context context); + Response updateTagsWithResponse(String resourceGroupName, String workspaceName, + TagsObject workspaceTags, Context context); /** * Updates an existing workspace's tags. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param workspaceTags Parameters supplied to update tags. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -138,8 +140,8 @@ Response updateTagsWithResponse( /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -151,8 +153,8 @@ Response updateTagsWithResponse( /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -165,8 +167,8 @@ Response updateTagsWithResponse( /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -177,8 +179,8 @@ Response updateTagsWithResponse( /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -190,7 +192,7 @@ Response updateTagsWithResponse( /** * Gets the list of Workspaces within a Subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a Subscription as paginated response with {@link PagedIterable}. @@ -200,7 +202,7 @@ Response updateTagsWithResponse( /** * Gets the list of Workspaces within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -212,8 +214,8 @@ Response updateTagsWithResponse( /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -224,8 +226,8 @@ Response updateTagsWithResponse( /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/CheckNameAvailabilityResultInner.java index a084a4560890..00ae28badfe1 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/CheckNameAvailabilityResultInner.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/CheckNameAvailabilityResultInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Result of check name availability. */ +/** + * Result of check name availability. + */ @Fluent public final class CheckNameAvailabilityResultInner { /* @@ -28,13 +30,15 @@ public final class CheckNameAvailabilityResultInner { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; - /** Creates an instance of CheckNameAvailabilityResultInner class. */ + /** + * Creates an instance of CheckNameAvailabilityResultInner class. + */ public CheckNameAvailabilityResultInner() { } /** * Get the nameAvailable property: Indicator of availability of the Quantum Workspace resource name. - * + * * @return the nameAvailable value. */ public Boolean nameAvailable() { @@ -43,7 +47,7 @@ public Boolean nameAvailable() { /** * Set the nameAvailable property: Indicator of availability of the Quantum Workspace resource name. - * + * * @param nameAvailable the nameAvailable value to set. * @return the CheckNameAvailabilityResultInner object itself. */ @@ -54,7 +58,7 @@ public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) /** * Get the reason property: The reason of unavailability. - * + * * @return the reason value. */ public String reason() { @@ -63,7 +67,7 @@ public String reason() { /** * Set the reason property: The reason of unavailability. - * + * * @param reason the reason value to set. * @return the CheckNameAvailabilityResultInner object itself. */ @@ -74,7 +78,7 @@ public CheckNameAvailabilityResultInner withReason(String reason) { /** * Get the message property: The detailed info regarding the reason associated with the Namespace. - * + * * @return the message value. */ public String message() { @@ -83,7 +87,7 @@ public String message() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/ListKeysResultInner.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/ListKeysResultInner.java new file mode 100644 index 000000000000..14e99b9fc339 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/ListKeysResultInner.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.quantum.models.ApiKey; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Result of list Api keys and connection strings. + */ +@Fluent +public final class ListKeysResultInner { + /* + * Indicator of enablement of the Quantum workspace Api keys. + */ + @JsonProperty(value = "apiKeyEnabled") + private Boolean apiKeyEnabled; + + /* + * The quantum workspace primary api key. + */ + @JsonProperty(value = "primaryKey") + private ApiKey primaryKey; + + /* + * The quantum workspace secondary api key. + */ + @JsonProperty(value = "secondaryKey") + private ApiKey secondaryKey; + + /* + * The connection string of the primary api key. + */ + @JsonProperty(value = "primaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String primaryConnectionString; + + /* + * The connection string of the secondary api key. + */ + @JsonProperty(value = "secondaryConnectionString", access = JsonProperty.Access.WRITE_ONLY) + private String secondaryConnectionString; + + /** + * Creates an instance of ListKeysResultInner class. + */ + public ListKeysResultInner() { + } + + /** + * Get the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @return the apiKeyEnabled value. + */ + public Boolean apiKeyEnabled() { + return this.apiKeyEnabled; + } + + /** + * Set the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @param apiKeyEnabled the apiKeyEnabled value to set. + * @return the ListKeysResultInner object itself. + */ + public ListKeysResultInner withApiKeyEnabled(Boolean apiKeyEnabled) { + this.apiKeyEnabled = apiKeyEnabled; + return this; + } + + /** + * Get the primaryKey property: The quantum workspace primary api key. + * + * @return the primaryKey value. + */ + public ApiKey primaryKey() { + return this.primaryKey; + } + + /** + * Set the primaryKey property: The quantum workspace primary api key. + * + * @param primaryKey the primaryKey value to set. + * @return the ListKeysResultInner object itself. + */ + public ListKeysResultInner withPrimaryKey(ApiKey primaryKey) { + this.primaryKey = primaryKey; + return this; + } + + /** + * Get the secondaryKey property: The quantum workspace secondary api key. + * + * @return the secondaryKey value. + */ + public ApiKey secondaryKey() { + return this.secondaryKey; + } + + /** + * Set the secondaryKey property: The quantum workspace secondary api key. + * + * @param secondaryKey the secondaryKey value to set. + * @return the ListKeysResultInner object itself. + */ + public ListKeysResultInner withSecondaryKey(ApiKey secondaryKey) { + this.secondaryKey = secondaryKey; + return this; + } + + /** + * Get the primaryConnectionString property: The connection string of the primary api key. + * + * @return the primaryConnectionString value. + */ + public String primaryConnectionString() { + return this.primaryConnectionString; + } + + /** + * Get the secondaryConnectionString property: The connection string of the secondary api key. + * + * @return the secondaryConnectionString value. + */ + public String secondaryConnectionString() { + return this.secondaryConnectionString; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (primaryKey() != null) { + primaryKey().validate(); + } + if (secondaryKey() != null) { + secondaryKey().validate(); + } + } +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/OperationInner.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/OperationInner.java index 578a81d3907e..7999f3ec1994 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/OperationInner.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/OperationInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.quantum.models.OperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** Operation provided by provider. */ +/** + * Operation provided by provider. + */ @Fluent public final class OperationInner { /* @@ -29,13 +31,15 @@ public final class OperationInner { @JsonProperty(value = "display") private OperationDisplay display; - /** Creates an instance of OperationInner class. */ + /** + * Creates an instance of OperationInner class. + */ public OperationInner() { } /** * Get the name property: Name of the operation. - * + * * @return the name value. */ public String name() { @@ -44,7 +48,7 @@ public String name() { /** * Set the name property: Name of the operation. - * + * * @param name the name value to set. * @return the OperationInner object itself. */ @@ -55,7 +59,7 @@ public OperationInner withName(String name) { /** * Get the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -64,7 +68,7 @@ public Boolean isDataAction() { /** * Set the isDataAction property: Indicates whether the operation is a data action. - * + * * @param isDataAction the isDataAction value to set. * @return the OperationInner object itself. */ @@ -75,7 +79,7 @@ public OperationInner withIsDataAction(Boolean isDataAction) { /** * Get the display property: Properties of the operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -84,7 +88,7 @@ public OperationDisplay display() { /** * Set the display property: Properties of the operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -95,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/ProviderDescriptionInner.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/ProviderDescriptionInner.java index c31bc6feb023..d69072b964de 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/ProviderDescriptionInner.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/ProviderDescriptionInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.quantum.models.ProviderProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Information about an offering. A provider offering is an entity that offers Targets to run Azure Quantum Jobs. */ +/** + * Information about an offering. A provider offering is an entity that offers Targets to run Azure Quantum Jobs. + */ @Fluent public final class ProviderDescriptionInner { /* @@ -24,18 +26,20 @@ public final class ProviderDescriptionInner { private String name; /* - * A list of provider-specific properties. + * Provider properties. */ @JsonProperty(value = "properties") private ProviderProperties properties; - /** Creates an instance of ProviderDescriptionInner class. */ + /** + * Creates an instance of ProviderDescriptionInner class. + */ public ProviderDescriptionInner() { } /** * Get the id property: Unique provider's id. - * + * * @return the id value. */ public String id() { @@ -44,7 +48,7 @@ public String id() { /** * Set the id property: Unique provider's id. - * + * * @param id the id value to set. * @return the ProviderDescriptionInner object itself. */ @@ -55,7 +59,7 @@ public ProviderDescriptionInner withId(String id) { /** * Get the name property: Provider's display name. - * + * * @return the name value. */ public String name() { @@ -63,8 +67,8 @@ public String name() { } /** - * Get the properties property: A list of provider-specific properties. - * + * Get the properties property: Provider properties. + * * @return the properties value. */ public ProviderProperties properties() { @@ -72,8 +76,8 @@ public ProviderProperties properties() { } /** - * Set the properties property: A list of provider-specific properties. - * + * Set the properties property: Provider properties. + * * @param properties the properties value to set. * @return the ProviderDescriptionInner object itself. */ @@ -84,7 +88,7 @@ public ProviderDescriptionInner withProperties(ProviderProperties properties) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/QuantumWorkspaceInner.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/QuantumWorkspaceInner.java index feb2d8c96e7c..21d0ef1297e8 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/QuantumWorkspaceInner.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/QuantumWorkspaceInner.java @@ -15,7 +15,9 @@ import java.util.List; import java.util.Map; -/** The resource proxy definition object for quantum workspace. */ +/** + * The resource proxy definition object for quantum workspace. + */ @Fluent public final class QuantumWorkspaceInner extends Resource { /* @@ -31,18 +33,20 @@ public final class QuantumWorkspaceInner extends Resource { private QuantumWorkspaceIdentity identity; /* - * System metadata + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of QuantumWorkspaceInner class. */ + /** + * Creates an instance of QuantumWorkspaceInner class. + */ public QuantumWorkspaceInner() { } /** * Get the innerProperties property: Gets or sets the properties. Define quantum workspace's specific properties. - * + * * @return the innerProperties value. */ private WorkspaceResourceProperties innerProperties() { @@ -51,7 +55,7 @@ private WorkspaceResourceProperties innerProperties() { /** * Get the identity property: Managed Identity information. - * + * * @return the identity value. */ public QuantumWorkspaceIdentity identity() { @@ -60,7 +64,7 @@ public QuantumWorkspaceIdentity identity() { /** * Set the identity property: Managed Identity information. - * + * * @param identity the identity value to set. * @return the QuantumWorkspaceInner object itself. */ @@ -70,22 +74,26 @@ public QuantumWorkspaceInner withIdentity(QuantumWorkspaceIdentity identity) { } /** - * Get the systemData property: System metadata. - * + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public QuantumWorkspaceInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public QuantumWorkspaceInner withTags(Map tags) { super.withTags(tags); @@ -94,7 +102,7 @@ public QuantumWorkspaceInner withTags(Map tags) { /** * Get the providers property: List of Providers selected for this Workspace. - * + * * @return the providers value. */ public List providers() { @@ -103,7 +111,7 @@ public List providers() { /** * Set the providers property: List of Providers selected for this Workspace. - * + * * @param providers the providers value to set. * @return the QuantumWorkspaceInner object itself. */ @@ -117,7 +125,7 @@ public QuantumWorkspaceInner withProviders(List providers) { /** * Get the usable property: Whether the current workspace is ready to accept Jobs. - * + * * @return the usable value. */ public UsableStatus usable() { @@ -126,7 +134,7 @@ public UsableStatus usable() { /** * Get the provisioningState property: Provisioning status field. - * + * * @return the provisioningState value. */ public ProvisioningStatus provisioningState() { @@ -135,7 +143,7 @@ public ProvisioningStatus provisioningState() { /** * Get the storageAccount property: ARM Resource Id of the storage account associated with this workspace. - * + * * @return the storageAccount value. */ public String storageAccount() { @@ -144,7 +152,7 @@ public String storageAccount() { /** * Set the storageAccount property: ARM Resource Id of the storage account associated with this workspace. - * + * * @param storageAccount the storageAccount value to set. * @return the QuantumWorkspaceInner object itself. */ @@ -158,16 +166,39 @@ public QuantumWorkspaceInner withStorageAccount(String storageAccount) { /** * Get the endpointUri property: The URI of the workspace endpoint. - * + * * @return the endpointUri value. */ public String endpointUri() { return this.innerProperties() == null ? null : this.innerProperties().endpointUri(); } + /** + * Get the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @return the apiKeyEnabled value. + */ + public Boolean apiKeyEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().apiKeyEnabled(); + } + + /** + * Set the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @param apiKeyEnabled the apiKeyEnabled value to set. + * @return the QuantumWorkspaceInner object itself. + */ + public QuantumWorkspaceInner withApiKeyEnabled(Boolean apiKeyEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkspaceResourceProperties(); + } + this.innerProperties().withApiKeyEnabled(apiKeyEnabled); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/WorkspaceResourceProperties.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/WorkspaceResourceProperties.java index 5500f424b882..c2575b4554b7 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/WorkspaceResourceProperties.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/WorkspaceResourceProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Properties of a Workspace. */ +/** + * Properties of a Workspace. + */ @Fluent public final class WorkspaceResourceProperties { /* @@ -44,13 +46,21 @@ public final class WorkspaceResourceProperties { @JsonProperty(value = "endpointUri", access = JsonProperty.Access.WRITE_ONLY) private String endpointUri; - /** Creates an instance of WorkspaceResourceProperties class. */ + /* + * Indicator of enablement of the Quantum workspace Api keys. + */ + @JsonProperty(value = "apiKeyEnabled") + private Boolean apiKeyEnabled; + + /** + * Creates an instance of WorkspaceResourceProperties class. + */ public WorkspaceResourceProperties() { } /** * Get the providers property: List of Providers selected for this Workspace. - * + * * @return the providers value. */ public List providers() { @@ -59,7 +69,7 @@ public List providers() { /** * Set the providers property: List of Providers selected for this Workspace. - * + * * @param providers the providers value to set. * @return the WorkspaceResourceProperties object itself. */ @@ -70,7 +80,7 @@ public WorkspaceResourceProperties withProviders(List providers) { /** * Get the usable property: Whether the current workspace is ready to accept Jobs. - * + * * @return the usable value. */ public UsableStatus usable() { @@ -79,7 +89,7 @@ public UsableStatus usable() { /** * Get the provisioningState property: Provisioning status field. - * + * * @return the provisioningState value. */ public ProvisioningStatus provisioningState() { @@ -88,7 +98,7 @@ public ProvisioningStatus provisioningState() { /** * Get the storageAccount property: ARM Resource Id of the storage account associated with this workspace. - * + * * @return the storageAccount value. */ public String storageAccount() { @@ -97,7 +107,7 @@ public String storageAccount() { /** * Set the storageAccount property: ARM Resource Id of the storage account associated with this workspace. - * + * * @param storageAccount the storageAccount value to set. * @return the WorkspaceResourceProperties object itself. */ @@ -108,16 +118,36 @@ public WorkspaceResourceProperties withStorageAccount(String storageAccount) { /** * Get the endpointUri property: The URI of the workspace endpoint. - * + * * @return the endpointUri value. */ public String endpointUri() { return this.endpointUri; } + /** + * Get the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @return the apiKeyEnabled value. + */ + public Boolean apiKeyEnabled() { + return this.apiKeyEnabled; + } + + /** + * Set the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @param apiKeyEnabled the apiKeyEnabled value to set. + * @return the WorkspaceResourceProperties object itself. + */ + public WorkspaceResourceProperties withApiKeyEnabled(Boolean apiKeyEnabled) { + this.apiKeyEnabled = apiKeyEnabled; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/package-info.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/package-info.java index 4938a46816b8..97e1040ffdbe 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/package-info.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for AzureQuantumManagementClient. null. */ +/** + * Package containing the inner data models for AzureQuantumManagementClient. + * null. + */ package com.azure.resourcemanager.quantum.fluent.models; diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/package-info.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/package-info.java index 041a6f802ab8..3ce074a39d8d 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/package-info.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for AzureQuantumManagementClient. null. */ +/** + * Package containing the service clients for AzureQuantumManagementClient. + * null. + */ package com.azure.resourcemanager.quantum.fluent; diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientBuilder.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientBuilder.java index ba73cc1c76ec..ac063248595f 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientBuilder.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientBuilder.java @@ -14,17 +14,19 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the AzureQuantumManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {AzureQuantumManagementClientImpl.class}) +/** + * A builder for creating a new instance of the AzureQuantumManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { AzureQuantumManagementClientImpl.class }) public final class AzureQuantumManagementClientBuilder { /* - * The Azure subscription ID. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The Azure subscription ID. - * + * Sets The ID of the target subscription. The value must be an UUID. + * * @param subscriptionId the subscriptionId value. * @return the AzureQuantumManagementClientBuilder. */ @@ -40,7 +42,7 @@ public AzureQuantumManagementClientBuilder subscriptionId(String subscriptionId) /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the AzureQuantumManagementClientBuilder. */ @@ -56,7 +58,7 @@ public AzureQuantumManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the AzureQuantumManagementClientBuilder. */ @@ -72,7 +74,7 @@ public AzureQuantumManagementClientBuilder environment(AzureEnvironment environm /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the AzureQuantumManagementClientBuilder. */ @@ -88,7 +90,7 @@ public AzureQuantumManagementClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the AzureQuantumManagementClientBuilder. */ @@ -104,7 +106,7 @@ public AzureQuantumManagementClientBuilder defaultPollInterval(Duration defaultP /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the AzureQuantumManagementClientBuilder. */ @@ -115,30 +117,20 @@ public AzureQuantumManagementClientBuilder serializerAdapter(SerializerAdapter s /** * Builds an instance of AzureQuantumManagementClientImpl with the provided parameters. - * + * * @return an instance of AzureQuantumManagementClientImpl. */ public AzureQuantumManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureQuantumManagementClientImpl client = - new AzureQuantumManagementClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + AzureQuantumManagementClientImpl client = new AzureQuantumManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientImpl.java index 2229df61e391..25a8da29e399 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/AzureQuantumManagementClientImpl.java @@ -36,123 +36,145 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AzureQuantumManagementClientImpl type. */ +/** + * Initializes a new instance of the AzureQuantumManagementClientImpl type. + */ @ServiceClient(builder = AzureQuantumManagementClientBuilder.class) public final class AzureQuantumManagementClientImpl implements AzureQuantumManagementClient { - /** The Azure subscription ID. */ + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** - * Gets The Azure subscription ID. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The WorkspacesClient object to access its operations. */ + /** + * The WorkspacesClient object to access its operations. + */ private final WorkspacesClient workspaces; /** * Gets the WorkspacesClient object to access its operations. - * + * * @return the WorkspacesClient object. */ public WorkspacesClient getWorkspaces() { return this.workspaces; } - /** The OfferingsClient object to access its operations. */ + /** + * The OfferingsClient object to access its operations. + */ private final OfferingsClient offerings; /** * Gets the OfferingsClient object to access its operations. - * + * * @return the OfferingsClient object. */ public OfferingsClient getOfferings() { return this.offerings; } - /** The OperationsClient object to access its operations. */ + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The WorkspaceOperationsClient object to access its operations. */ + /** + * The WorkspaceOperationsClient object to access its operations. + */ private final WorkspaceOperationsClient workspaceOperations; /** * Gets the WorkspaceOperationsClient object to access its operations. - * + * * @return the WorkspaceOperationsClient object. */ public WorkspaceOperationsClient getWorkspaceOperations() { @@ -161,27 +183,22 @@ public WorkspaceOperationsClient getWorkspaceOperations() { /** * Initializes an instance of AzureQuantumManagementClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The Azure subscription ID. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - AzureQuantumManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + AzureQuantumManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-01-10-preview"; + this.apiVersion = "2023-11-13-preview"; this.workspaces = new WorkspacesClientImpl(this); this.offerings = new OfferingsClientImpl(this); this.operations = new OperationsClientImpl(this); @@ -190,7 +207,7 @@ public WorkspaceOperationsClient getWorkspaceOperations() { /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -199,7 +216,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -209,7 +226,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -219,26 +236,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -251,19 +257,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/CheckNameAvailabilityResultImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/CheckNameAvailabilityResultImpl.java index 99933db4068f..be6ba9505006 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/CheckNameAvailabilityResultImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/CheckNameAvailabilityResultImpl.java @@ -12,8 +12,7 @@ public final class CheckNameAvailabilityResultImpl implements CheckNameAvailabil private final com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager; - CheckNameAvailabilityResultImpl( - CheckNameAvailabilityResultInner innerObject, + CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner innerObject, com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ListKeysResultImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ListKeysResultImpl.java new file mode 100644 index 000000000000..f93c3102ad12 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ListKeysResultImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.implementation; + +import com.azure.resourcemanager.quantum.fluent.models.ListKeysResultInner; +import com.azure.resourcemanager.quantum.models.ApiKey; +import com.azure.resourcemanager.quantum.models.ListKeysResult; + +public final class ListKeysResultImpl implements ListKeysResult { + private ListKeysResultInner innerObject; + + private final com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager; + + ListKeysResultImpl(ListKeysResultInner innerObject, + com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean apiKeyEnabled() { + return this.innerModel().apiKeyEnabled(); + } + + public ApiKey primaryKey() { + return this.innerModel().primaryKey(); + } + + public ApiKey secondaryKey() { + return this.innerModel().secondaryKey(); + } + + public String primaryConnectionString() { + return this.innerModel().primaryConnectionString(); + } + + public String secondaryConnectionString() { + return this.innerModel().secondaryConnectionString(); + } + + public ListKeysResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.quantum.AzureQuantumManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsClientImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsClientImpl.java index d650e0038f1d..fa26c6ccceb5 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsClientImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsClientImpl.java @@ -30,130 +30,106 @@ import com.azure.resourcemanager.quantum.models.OfferingsListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OfferingsClient. */ +/** + * An instance of this class provides access to all the operations defined in OfferingsClient. + */ public final class OfferingsClientImpl implements OfferingsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OfferingsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureQuantumManagementClientImpl client; /** * Initializes an instance of OfferingsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OfferingsClientImpl(AzureQuantumManagementClientImpl client) { - this.service = - RestProxy.create(OfferingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OfferingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureQuantumManagementClientOfferings to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for AzureQuantumManagementClientOfferings to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "AzureQuantumManageme") public interface OfferingsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/offerings") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @PathParam("locationName") String locationName, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 of a list Providers operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String locationName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - locationName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), locationName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a list Providers operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String locationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); @@ -161,27 +137,15 @@ private Mono> listSinglePageAsync(String final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - locationName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), locationName, + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -195,7 +159,7 @@ private PagedFlux listAsync(String locationName) { /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -205,13 +169,13 @@ private PagedFlux listAsync(String locationName) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String locationName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(locationName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(locationName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -225,7 +189,7 @@ public PagedIterable list(String locationName) { /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -240,14 +204,15 @@ public PagedIterable list(String locationName, Context /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a list Providers operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -255,37 +220,28 @@ private Mono> listNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a list Providers operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -293,23 +249,13 @@ private Mono> listNextSinglePageAsync(St return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsImpl.java index d399e6b37c01..5e84df36d44c 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OfferingsImpl.java @@ -19,20 +19,20 @@ public final class OfferingsImpl implements Offerings { private final com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager; - public OfferingsImpl( - OfferingsClient innerClient, com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { + public OfferingsImpl(OfferingsClient innerClient, + com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String locationName) { PagedIterable inner = this.serviceClient().list(locationName); - return Utils.mapPage(inner, inner1 -> new ProviderDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProviderDescriptionImpl(inner1, this.manager())); } public PagedIterable list(String locationName, Context context) { PagedIterable inner = this.serviceClient().list(locationName, context); - return Utils.mapPage(inner, inner1 -> new ProviderDescriptionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ProviderDescriptionImpl(inner1, this.manager())); } private OfferingsClient serviceClient() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsClientImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsClientImpl.java index 838168c50333..41c36ef53a0e 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsClientImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.quantum.models.OperationsList; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureQuantumManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(AzureQuantumManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,30 +62,24 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "AzureQuantumManageme") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Quantum/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Returns list of operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return lists the operations available along with {@link PagedResponse} on successful completion of {@link Mono}. @@ -87,30 +87,21 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -120,29 +111,19 @@ private Mono> listSinglePageAsync() { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Returns list of operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return lists the operations available as paginated response with {@link PagedFlux}. @@ -154,7 +135,7 @@ private PagedFlux listAsync() { /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -163,13 +144,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Returns list of operations. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return lists the operations available as paginated response with {@link PagedIterable}. @@ -181,7 +162,7 @@ public PagedIterable list() { /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -195,9 +176,10 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -209,31 +191,22 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -246,23 +219,13 @@ private Mono> listNextSinglePageAsync(String nextL return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsImpl.java index eef200082da4..ec0cc3e55617 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/OperationsImpl.java @@ -19,20 +19,20 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ProviderDescriptionImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ProviderDescriptionImpl.java index b3068ee6a14f..51527e0b96c6 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ProviderDescriptionImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ProviderDescriptionImpl.java @@ -13,8 +13,8 @@ public final class ProviderDescriptionImpl implements ProviderDescription { private final com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager; - ProviderDescriptionImpl( - ProviderDescriptionInner innerObject, com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { + ProviderDescriptionImpl(ProviderDescriptionInner innerObject, + com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/QuantumWorkspaceImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/QuantumWorkspaceImpl.java index e704154bc2c5..ac7d2eb64fea 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/QuantumWorkspaceImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/QuantumWorkspaceImpl.java @@ -82,6 +82,10 @@ public String endpointUri() { return this.innerModel().endpointUri(); } + public Boolean apiKeyEnabled() { + return this.innerModel().apiKeyEnabled(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -114,20 +118,14 @@ public QuantumWorkspaceImpl withExistingResourceGroup(String resourceGroupName) } public QuantumWorkspace create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getWorkspaces().createOrUpdate(resourceGroupName, + workspaceName, this.innerModel(), Context.NONE); return this; } public QuantumWorkspace create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .createOrUpdate(resourceGroupName, workspaceName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getWorkspaces().createOrUpdate(resourceGroupName, + workspaceName, this.innerModel(), context); return this; } @@ -143,50 +141,34 @@ public QuantumWorkspaceImpl update() { } public QuantumWorkspace apply() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .updateTagsWithResponse(resourceGroupName, workspaceName, updateWorkspaceTags, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .updateTagsWithResponse(resourceGroupName, workspaceName, updateWorkspaceTags, Context.NONE).getValue(); return this; } public QuantumWorkspace apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .updateTagsWithResponse(resourceGroupName, workspaceName, updateWorkspaceTags, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .updateTagsWithResponse(resourceGroupName, workspaceName, updateWorkspaceTags, context).getValue(); return this; } - QuantumWorkspaceImpl( - QuantumWorkspaceInner innerObject, com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { + QuantumWorkspaceImpl(QuantumWorkspaceInner innerObject, + com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.workspaceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "workspaces"); } public QuantumWorkspace refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); return this; } public QuantumWorkspace refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaces() - .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getWorkspaces() + .getByResourceGroupWithResponse(resourceGroupName, workspaceName, context).getValue(); return this; } @@ -225,6 +207,11 @@ public QuantumWorkspaceImpl withStorageAccount(String storageAccount) { return this; } + public QuantumWorkspaceImpl withApiKeyEnabled(Boolean apiKeyEnabled) { + this.innerModel().withApiKeyEnabled(apiKeyEnabled); + return this; + } + private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/Utils.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ResourceManagerUtils.java similarity index 79% rename from sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/Utils.java rename to sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ResourceManagerUtils.java index 49c15a11c078..80193f25918b 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/Utils.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsClientImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsClientImpl.java index 717fc5552d86..f3844e12ba27 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsClientImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsClientImpl.java @@ -24,25 +24,33 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.quantum.fluent.WorkspaceOperationsClient; import com.azure.resourcemanager.quantum.fluent.models.CheckNameAvailabilityResultInner; +import com.azure.resourcemanager.quantum.fluent.models.ListKeysResultInner; +import com.azure.resourcemanager.quantum.models.ApiKeys; import com.azure.resourcemanager.quantum.models.CheckNameAvailabilityParameters; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspaceOperationsClient. + */ public final class WorkspaceOperationsClientImpl implements WorkspaceOperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspaceOperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureQuantumManagementClientImpl client; /** * Initializes an instance of WorkspaceOperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkspaceOperationsClientImpl(AzureQuantumManagementClientImpl client) { - this.service = - RestProxy.create(WorkspaceOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(WorkspaceOperationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -53,24 +61,39 @@ public final class WorkspaceOperationsClientImpl implements WorkspaceOperationsC @Host("{$host}") @ServiceInterface(name = "AzureQuantumManageme") public interface WorkspaceOperationsService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/checkNameAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @PathParam("locationName") String locationName, @BodyParam("application/json") CheckNameAvailabilityParameters checkNameAvailabilityParameters, - @HeaderParam("Accept") String accept, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/listKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listKeys(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}/regenerateKey") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKeys(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") ApiKeys keySpecification, @HeaderParam("Accept") String accept, Context context); } /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -79,50 +102,36 @@ Mono> checkNameAvailability( * @return result of check name availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + private Mono> checkNameAvailabilityWithResponseAsync(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (checkNameAvailabilityParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityParameters is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter checkNameAvailabilityParameters is required and cannot be null.")); } else { checkNameAvailabilityParameters.validate(); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - locationName, - checkNameAvailabilityParameters, - accept, - context)) + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), locationName, checkNameAvailabilityParameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -132,47 +141,34 @@ private Mono> checkNameAvailabilityWi * @return result of check name availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { + private Mono> checkNameAvailabilityWithResponseAsync(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } if (checkNameAvailabilityParameters == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityParameters is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter checkNameAvailabilityParameters is required and cannot be null.")); } else { checkNameAvailabilityParameters.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - locationName, - checkNameAvailabilityParameters, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), locationName, checkNameAvailabilityParameters, accept, context); } /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -181,15 +177,15 @@ private Mono> checkNameAvailabilityWi * @return result of check name availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + private Mono checkNameAvailabilityAsync(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters) { return checkNameAvailabilityWithResponseAsync(locationName, checkNameAvailabilityParameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -199,14 +195,14 @@ private Mono checkNameAvailabilityAsync( * @return result of check name availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { + public Response checkNameAvailabilityWithResponse(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { return checkNameAvailabilityWithResponseAsync(locationName, checkNameAvailabilityParameters, context).block(); } /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -215,9 +211,273 @@ public Response checkNameAvailabilityWithRespo * @return result of check name availability. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResultInner checkNameAvailability( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + public CheckNameAvailabilityResultInner checkNameAvailability(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters) { return checkNameAvailabilityWithResponse(locationName, checkNameAvailabilityParameters, Context.NONE) .getValue(); } + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, workspaceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listKeysWithResponseAsync(String resourceGroupName, + String workspaceName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), + resourceGroupName, workspaceName, accept, context); + } + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listKeysAsync(String resourceGroupName, String workspaceName) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + Context context) { + return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + } + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ListKeysResultInner listKeys(String resourceGroupName, String workspaceName) { + return listKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); + } + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regenerateKeysWithResponseAsync(String resourceGroupName, String workspaceName, + ApiKeys keySpecification) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (keySpecification == null) { + return Mono + .error(new IllegalArgumentException("Parameter keySpecification is required and cannot be null.")); + } else { + keySpecification.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, workspaceName, keySpecification, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> regenerateKeysWithResponseAsync(String resourceGroupName, String workspaceName, + ApiKeys keySpecification, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (keySpecification == null) { + return Mono + .error(new IllegalArgumentException("Parameter keySpecification is required and cannot be null.")); + } else { + keySpecification.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.regenerateKeys(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), resourceGroupName, workspaceName, keySpecification, accept, context); + } + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono regenerateKeysAsync(String resourceGroupName, String workspaceName, ApiKeys keySpecification) { + return regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, keySpecification) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + ApiKeys keySpecification, Context context) { + return regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, keySpecification, context).block(); + } + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void regenerateKeys(String resourceGroupName, String workspaceName, ApiKeys keySpecification) { + regenerateKeysWithResponse(resourceGroupName, workspaceName, keySpecification, Context.NONE); + } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsImpl.java index 95ccbab12dd0..6c6f4245adf0 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspaceOperationsImpl.java @@ -10,8 +10,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.quantum.fluent.WorkspaceOperationsClient; import com.azure.resourcemanager.quantum.fluent.models.CheckNameAvailabilityResultInner; +import com.azure.resourcemanager.quantum.fluent.models.ListKeysResultInner; +import com.azure.resourcemanager.quantum.models.ApiKeys; import com.azure.resourcemanager.quantum.models.CheckNameAvailabilityParameters; import com.azure.resourcemanager.quantum.models.CheckNameAvailabilityResult; +import com.azure.resourcemanager.quantum.models.ListKeysResult; import com.azure.resourcemanager.quantum.models.WorkspaceOperations; public final class WorkspaceOperationsImpl implements WorkspaceOperations { @@ -21,33 +24,28 @@ public final class WorkspaceOperationsImpl implements WorkspaceOperations { private final com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager; - public WorkspaceOperationsImpl( - WorkspaceOperationsClient innerClient, com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { + public WorkspaceOperationsImpl(WorkspaceOperationsClient innerClient, + com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response checkNameAvailabilityWithResponse( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { - Response inner = - this - .serviceClient() - .checkNameAvailabilityWithResponse(locationName, checkNameAvailabilityParameters, context); + public Response checkNameAvailabilityWithResponse(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context) { + Response inner = this.serviceClient() + .checkNameAvailabilityWithResponse(locationName, checkNameAvailabilityParameters, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CheckNameAvailabilityResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public CheckNameAvailabilityResult checkNameAvailability( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters) { - CheckNameAvailabilityResultInner inner = - this.serviceClient().checkNameAvailability(locationName, checkNameAvailabilityParameters); + public CheckNameAvailabilityResult checkNameAvailability(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters) { + CheckNameAvailabilityResultInner inner + = this.serviceClient().checkNameAvailability(locationName, checkNameAvailabilityParameters); if (inner != null) { return new CheckNameAvailabilityResultImpl(inner, this.manager()); } else { @@ -55,6 +53,37 @@ public CheckNameAvailabilityResult checkNameAvailability( } } + public Response listKeysWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ListKeysResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ListKeysResult listKeys(String resourceGroupName, String workspaceName) { + ListKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); + if (inner != null) { + return new ListKeysResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, + ApiKeys keySpecification, Context context) { + return this.serviceClient().regenerateKeysWithResponse(resourceGroupName, workspaceName, keySpecification, + context); + } + + public void regenerateKeys(String resourceGroupName, String workspaceName, ApiKeys keySpecification) { + this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, keySpecification); + } + private WorkspaceOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesClientImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesClientImpl.java index 23014563643f..e206cc1df543 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesClientImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesClientImpl.java @@ -40,22 +40,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ +/** + * An instance of this class provides access to all the operations defined in WorkspacesClient. + */ public final class WorkspacesClientImpl implements WorkspacesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final WorkspacesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final AzureQuantumManagementClientImpl client; /** * Initializes an instance of WorkspacesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ WorkspacesClientImpl(AzureQuantumManagementClientImpl client) { - this.service = - RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -66,209 +72,153 @@ public final class WorkspacesClientImpl implements WorkspacesClient { @Host("{$host}") @ServiceInterface(name = "AzureQuantumManageme") public interface WorkspacesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") QuantumWorkspaceInner quantumWorkspace, - @HeaderParam("Accept") String accept, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") QuantumWorkspaceInner quantumWorkspace, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> updateTags( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") TagsObject workspaceTags, - @HeaderParam("Accept") String accept, + Mono> updateTags(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("workspaceName") String workspaceName, + @BodyParam("application/json") TagsObject workspaceTags, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces/{workspaceName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("workspaceName") String workspaceName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/workspaces") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Quantum/workspaces") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource proxy definition object for quantum workspace along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - accept, - context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource proxy definition object for quantum workspace along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String workspaceName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), workspaceName, accept, context); } /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -283,8 +233,8 @@ private Mono getByResourceGroupAsync(String resourceGroup /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -293,15 +243,15 @@ private Mono getByResourceGroupAsync(String resourceGroup * @return the resource proxy definition object for quantum workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String workspaceName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -315,34 +265,30 @@ public QuantumWorkspaceInner getByResourceGroup(String resourceGroupName, String /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource proxy definition object for quantum workspace along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, QuantumWorkspaceInner quantumWorkspace) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); @@ -355,25 +301,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - quantumWorkspace, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), workspaceName, quantumWorkspace, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @param context The context to associate with this operation. @@ -381,26 +318,22 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource proxy definition object for quantum workspace along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); @@ -413,22 +346,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - quantumWorkspace, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), workspaceName, quantumWorkspace, accept, context); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -439,22 +364,17 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, QuantumWorkspaceInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, quantumWorkspace); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - QuantumWorkspaceInner.class, - QuantumWorkspaceInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, quantumWorkspace); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), QuantumWorkspaceInner.class, QuantumWorkspaceInner.class, + this.client.getContext()); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @param context The context to associate with this operation. @@ -467,18 +387,16 @@ private PollerFlux, QuantumWorkspaceInner> beg private PollerFlux, QuantumWorkspaceInner> beginCreateOrUpdateAsync( String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, quantumWorkspace, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), QuantumWorkspaceInner.class, QuantumWorkspaceInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, quantumWorkspace, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), QuantumWorkspaceInner.class, QuantumWorkspaceInner.class, context); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -487,15 +405,15 @@ private PollerFlux, QuantumWorkspaceInner> beg * @return the {@link SyncPoller} for polling of the resource proxy definition object for quantum workspace. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, QuantumWorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace) { + public SyncPoller, QuantumWorkspaceInner> + beginCreateOrUpdate(String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace) { return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace).getSyncPoller(); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @param context The context to associate with this operation. @@ -507,15 +425,14 @@ public SyncPoller, QuantumWorkspaceInner> begi @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, QuantumWorkspaceInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace, context) .getSyncPoller(); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -524,17 +441,16 @@ public SyncPoller, QuantumWorkspaceInner> begi * @return the resource proxy definition object for quantum workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + QuantumWorkspaceInner quantumWorkspace) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @param context The context to associate with this operation. @@ -544,17 +460,16 @@ private Mono createOrUpdateAsync( * @return the resource proxy definition object for quantum workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String workspaceName, + QuantumWorkspaceInner quantumWorkspace, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -563,15 +478,15 @@ private Mono createOrUpdateAsync( * @return the resource proxy definition object for quantum workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public QuantumWorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace) { + public QuantumWorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, + QuantumWorkspaceInner quantumWorkspace) { return createOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace).block(); } /** * Creates or updates a workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param quantumWorkspace Workspace details. * @param context The context to associate with this operation. @@ -581,41 +496,37 @@ public QuantumWorkspaceInner createOrUpdate( * @return the resource proxy definition object for quantum workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public QuantumWorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, QuantumWorkspaceInner quantumWorkspace, Context context) { + public QuantumWorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, + QuantumWorkspaceInner quantumWorkspace, Context context) { return createOrUpdateAsync(resourceGroupName, workspaceName, quantumWorkspace, context).block(); } /** * Updates an existing workspace's tags. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param workspaceTags Parameters supplied to update tags. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource proxy definition object for quantum workspace along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String workspaceName, TagsObject workspaceTags) { + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String workspaceName, TagsObject workspaceTags) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); @@ -628,24 +539,15 @@ private Mono> updateTagsWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - workspaceTags, - accept, - context)) + context -> service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), workspaceName, workspaceTags, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates an existing workspace's tags. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param workspaceTags Parameters supplied to update tags. * @param context The context to associate with this operation. @@ -653,26 +555,22 @@ private Mono> updateTagsWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource proxy definition object for quantum workspace along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateTagsWithResponseAsync( - String resourceGroupName, String workspaceName, TagsObject workspaceTags, Context context) { + private Mono> updateTagsWithResponseAsync(String resourceGroupName, + String workspaceName, TagsObject workspaceTags, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); @@ -684,22 +582,14 @@ private Mono> updateTagsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .updateTags( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - workspaceTags, - accept, - context); + return service.updateTags(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), workspaceName, workspaceTags, accept, context); } /** * Updates an existing workspace's tags. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param workspaceTags Parameters supplied to update tags. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -708,16 +598,16 @@ private Mono> updateTagsWithResponseAsync( * @return the resource proxy definition object for quantum workspace on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateTagsAsync( - String resourceGroupName, String workspaceName, TagsObject workspaceTags) { + private Mono updateTagsAsync(String resourceGroupName, String workspaceName, + TagsObject workspaceTags) { return updateTagsWithResponseAsync(resourceGroupName, workspaceName, workspaceTags) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Updates an existing workspace's tags. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param workspaceTags Parameters supplied to update tags. * @param context The context to associate with this operation. @@ -727,15 +617,15 @@ private Mono updateTagsAsync( * @return the resource proxy definition object for quantum workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String workspaceName, TagsObject workspaceTags, Context context) { + public Response updateTagsWithResponse(String resourceGroupName, String workspaceName, + TagsObject workspaceTags, Context context) { return updateTagsWithResponseAsync(resourceGroupName, workspaceName, workspaceTags, context).block(); } /** * Updates an existing workspace's tags. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param workspaceTags Parameters supplied to update tags. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -750,8 +640,8 @@ public QuantumWorkspaceInner updateTags(String resourceGroupName, String workspa /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -761,44 +651,31 @@ public QuantumWorkspaceInner updateTags(String resourceGroupName, String workspa @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), workspaceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -807,44 +684,33 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String workspaceName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - workspaceName, - accept, - context); + return service.delete(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), workspaceName, accept, context); } /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -854,16 +720,14 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -872,19 +736,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -898,8 +761,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -908,15 +771,15 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, + Context context) { return this.beginDeleteAsync(resourceGroupName, workspaceName, context).getSyncPoller(); } /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -930,8 +793,8 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName) { /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -941,15 +804,14 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String workspaceName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, context) - .last() + return beginDeleteAsync(resourceGroupName, workspaceName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -962,8 +824,8 @@ public void delete(String resourceGroupName, String workspaceName) { /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -977,109 +839,76 @@ public void delete(String resourceGroupName, String workspaceName, Context conte /** * Gets the list of Workspaces within a Subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a Subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of Workspaces within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a Subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the list of Workspaces within a Subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a Subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Gets the list of Workspaces within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1088,13 +917,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Gets the list of Workspaces within a Subscription. - * + * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a Subscription as paginated response with {@link PagedIterable}. @@ -1106,7 +935,7 @@ public PagedIterable list() { /** * Gets the list of Workspaces within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1120,111 +949,76 @@ public PagedIterable list(Context context) { /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, + this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - resourceGroupName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1232,15 +1026,14 @@ private Mono> listByResourceGroupSinglePage */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1249,15 +1042,14 @@ private PagedFlux listByResourceGroupAsync(String resourc */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1270,8 +1062,8 @@ public PagedIterable listByResourceGroup(String resourceG /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1285,14 +1077,15 @@ public PagedIterable listByResourceGroup(String resourceG /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a list Workspaces operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1300,76 +1093,59 @@ private Mono> listBySubscriptionNextSingleP return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a list Workspaces operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a list Workspaces operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1377,63 +1153,45 @@ private Mono> listByResourceGroupNextSingle return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response of a list Workspaces operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesImpl.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesImpl.java index b21c1882a3fa..dbc1e5027543 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesImpl.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/WorkspacesImpl.java @@ -21,21 +21,18 @@ public final class WorkspacesImpl implements Workspaces { private final com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager; - public WorkspacesImpl( - WorkspacesClient innerClient, com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { + public WorkspacesImpl(WorkspacesClient innerClient, + com.azure.resourcemanager.quantum.AzureQuantumManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new QuantumWorkspaceImpl(inner.getValue(), this.manager())); } else { return null; @@ -61,97 +58,77 @@ public void delete(String resourceGroupName, String workspaceName, Context conte public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new QuantumWorkspaceImpl(inner1, this.manager())); } public QuantumWorkspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } this.delete(resourceGroupName, workspaceName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); + String workspaceName = ResourceManagerUtils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } this.delete(resourceGroupName, workspaceName, context); } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/package-info.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/package-info.java index b633b5f9e9ef..da03b6a59a56 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/package-info.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for AzureQuantumManagementClient. null. */ +/** + * Package containing the implementations for AzureQuantumManagementClient. + * null. + */ package com.azure.resourcemanager.quantum.implementation; diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ApiKey.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ApiKey.java new file mode 100644 index 000000000000..2ccd97884553 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ApiKey.java @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Azure quantum workspace Api key details. + */ +@Fluent +public final class ApiKey { + /* + * The creation time of the api key. + */ + @JsonProperty(value = "createdAt") + private OffsetDateTime createdAt; + + /* + * The Api key. + */ + @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) + private String key; + + /** + * Creates an instance of ApiKey class. + */ + public ApiKey() { + } + + /** + * Get the createdAt property: The creation time of the api key. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Set the createdAt property: The creation time of the api key. + * + * @param createdAt the createdAt value to set. + * @return the ApiKey object itself. + */ + public ApiKey withCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get the key property: The Api key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ApiKeys.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ApiKeys.java new file mode 100644 index 000000000000..3997ee70d873 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ApiKeys.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of api keys to be generated. + */ +@Fluent +public final class ApiKeys { + /* + * A list of api key names. + */ + @JsonProperty(value = "keys") + private List keys; + + /** + * Creates an instance of ApiKeys class. + */ + public ApiKeys() { + } + + /** + * Get the keys property: A list of api key names. + * + * @return the keys value. + */ + public List keys() { + return this.keys; + } + + /** + * Set the keys property: A list of api key names. + * + * @param keys the keys value to set. + * @return the ApiKeys object itself. + */ + public ApiKeys withKeys(List keys) { + this.keys = keys; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityParameters.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityParameters.java index f8954e4717fb..3a9d19a3aa25 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityParameters.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityParameters.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Details of check name availability request body. */ +/** + * Details of check name availability request body. + */ @Fluent public final class CheckNameAvailabilityParameters { /* @@ -22,13 +24,15 @@ public final class CheckNameAvailabilityParameters { @JsonProperty(value = "type") private String type; - /** Creates an instance of CheckNameAvailabilityParameters class. */ + /** + * Creates an instance of CheckNameAvailabilityParameters class. + */ public CheckNameAvailabilityParameters() { } /** * Get the name property: Name for checking availability. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: Name for checking availability. - * + * * @param name the name value to set. * @return the CheckNameAvailabilityParameters object itself. */ @@ -48,7 +52,7 @@ public CheckNameAvailabilityParameters withName(String name) { /** * Get the type property: The resource type of Quantum Workspace. - * + * * @return the type value. */ public String type() { @@ -57,7 +61,7 @@ public String type() { /** * Set the type property: The resource type of Quantum Workspace. - * + * * @param type the type value to set. * @return the CheckNameAvailabilityParameters object itself. */ @@ -68,7 +72,7 @@ public CheckNameAvailabilityParameters withType(String type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityResult.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityResult.java index b641bfec86dc..c75f5fd2fa56 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityResult.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/CheckNameAvailabilityResult.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.quantum.fluent.models.CheckNameAvailabilityResultInner; -/** An immutable client-side representation of CheckNameAvailabilityResult. */ +/** + * An immutable client-side representation of CheckNameAvailabilityResult. + */ public interface CheckNameAvailabilityResult { /** * Gets the nameAvailable property: Indicator of availability of the Quantum Workspace resource name. - * + * * @return the nameAvailable value. */ Boolean nameAvailable(); /** * Gets the reason property: The reason of unavailability. - * + * * @return the reason value. */ String reason(); /** * Gets the message property: The detailed info regarding the reason associated with the Namespace. - * + * * @return the message value. */ String message(); /** * Gets the inner com.azure.resourcemanager.quantum.fluent.models.CheckNameAvailabilityResultInner object. - * + * * @return the inner object. */ CheckNameAvailabilityResultInner innerModel(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/KeyType.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/KeyType.java new file mode 100644 index 000000000000..e941f698f0f9 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/KeyType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Defines values for KeyType. + */ +public final class KeyType extends ExpandableStringEnum { + /** + * Static value Primary for KeyType. + */ + public static final KeyType PRIMARY = fromString("Primary"); + + /** + * Static value Secondary for KeyType. + */ + public static final KeyType SECONDARY = fromString("Secondary"); + + /** + * Creates a new instance of KeyType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public KeyType() { + } + + /** + * Creates or finds a KeyType from its string representation. + * + * @param name a name to look for. + * @return the corresponding KeyType. + */ + @JsonCreator + public static KeyType fromString(String name) { + return fromString(name, KeyType.class); + } + + /** + * Gets known KeyType values. + * + * @return known KeyType values. + */ + public static Collection values() { + return values(KeyType.class); + } +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ListKeysResult.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ListKeysResult.java new file mode 100644 index 000000000000..a1cf8cc247dd --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ListKeysResult.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.models; + +import com.azure.resourcemanager.quantum.fluent.models.ListKeysResultInner; + +/** + * An immutable client-side representation of ListKeysResult. + */ +public interface ListKeysResult { + /** + * Gets the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @return the apiKeyEnabled value. + */ + Boolean apiKeyEnabled(); + + /** + * Gets the primaryKey property: The quantum workspace primary api key. + * + * @return the primaryKey value. + */ + ApiKey primaryKey(); + + /** + * Gets the secondaryKey property: The quantum workspace secondary api key. + * + * @return the secondaryKey value. + */ + ApiKey secondaryKey(); + + /** + * Gets the primaryConnectionString property: The connection string of the primary api key. + * + * @return the primaryConnectionString value. + */ + String primaryConnectionString(); + + /** + * Gets the secondaryConnectionString property: The connection string of the secondary api key. + * + * @return the secondaryConnectionString value. + */ + String secondaryConnectionString(); + + /** + * Gets the inner com.azure.resourcemanager.quantum.fluent.models.ListKeysResultInner object. + * + * @return the inner object. + */ + ListKeysResultInner innerModel(); +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Offerings.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Offerings.java index 70cdfc72c1cb..218051dd3898 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Offerings.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Offerings.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Offerings. */ +/** + * Resource collection API of Offerings. + */ public interface Offerings { /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -22,7 +24,7 @@ public interface Offerings { /** * Returns the list of all provider offerings available for the given location. - * + * * @param locationName Location. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OfferingsListResult.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OfferingsListResult.java index 4922cd323218..d0758647272b 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OfferingsListResult.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OfferingsListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a list Providers operation. */ +/** + * The response of a list Providers operation. + */ @Fluent public final class OfferingsListResult { /* @@ -24,13 +26,15 @@ public final class OfferingsListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of OfferingsListResult class. */ + /** + * Creates an instance of OfferingsListResult class. + */ public OfferingsListResult() { } /** * Get the value property: Result of a list Providers operation. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Result of a list Providers operation. - * + * * @param value the value value to set. * @return the OfferingsListResult object itself. */ @@ -51,7 +55,7 @@ public OfferingsListResult withValue(List value) { /** * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of * Providers. - * + * * @return the nextLink value. */ public String nextLink() { @@ -61,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of * Providers. - * + * * @param nextLink the nextLink value to set. * @return the OfferingsListResult object itself. */ @@ -72,7 +76,7 @@ public OfferingsListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operation.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operation.java index 263e3b656555..71c941240c5e 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operation.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operation.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.quantum.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: Name of the operation. - * + * * @return the name value. */ String name(); /** * Gets the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Properties of the operation. - * + * * @return the display value. */ OperationDisplay display(); /** * Gets the inner com.azure.resourcemanager.quantum.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationDisplay.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationDisplay.java index d5eb519e4a4a..c5f949c54243 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationDisplay.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Properties of the operation. */ +/** + * Properties of the operation. + */ @Fluent public final class OperationDisplay { /* @@ -34,13 +36,15 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: Provider name. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Set the provider property: Provider name. - * + * * @param provider the provider value to set. * @return the OperationDisplay object itself. */ @@ -60,7 +64,7 @@ public OperationDisplay withProvider(String provider) { /** * Get the resource property: Resource name. - * + * * @return the resource value. */ public String resource() { @@ -69,7 +73,7 @@ public String resource() { /** * Set the resource property: Resource name. - * + * * @param resource the resource value to set. * @return the OperationDisplay object itself. */ @@ -80,7 +84,7 @@ public OperationDisplay withResource(String resource) { /** * Get the operation property: Operation name. - * + * * @return the operation value. */ public String operation() { @@ -89,7 +93,7 @@ public String operation() { /** * Set the operation property: Operation name. - * + * * @param operation the operation value to set. * @return the OperationDisplay object itself. */ @@ -100,7 +104,7 @@ public OperationDisplay withOperation(String operation) { /** * Get the description property: Description of the operation. - * + * * @return the description value. */ public String description() { @@ -109,7 +113,7 @@ public String description() { /** * Set the description property: Description of the operation. - * + * * @param description the description value to set. * @return the OperationDisplay object itself. */ @@ -120,7 +124,7 @@ public OperationDisplay withDescription(String description) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operations.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operations.java index 4fb4be8b5ec7..5996d174c860 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operations.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Operations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Returns list of operations. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return lists the operations available as paginated response with {@link PagedIterable}. @@ -20,7 +22,7 @@ public interface Operations { /** * Returns list of operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationsList.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationsList.java index 3bdc44ca65e4..74b2427d2689 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationsList.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/OperationsList.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Lists the operations available. */ +/** + * Lists the operations available. + */ @Fluent public final class OperationsList { /* @@ -25,13 +27,15 @@ public final class OperationsList { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of OperationsList class. */ + /** + * Creates an instance of OperationsList class. + */ public OperationsList() { } /** * Get the nextLink property: Url to follow for getting next page of operations. - * + * * @return the nextLink value. */ public String nextLink() { @@ -40,7 +44,7 @@ public String nextLink() { /** * Set the nextLink property: Url to follow for getting next page of operations. - * + * * @param nextLink the nextLink value to set. * @return the OperationsList object itself. */ @@ -51,7 +55,7 @@ public OperationsList withNextLink(String nextLink) { /** * Get the value property: Array of operations. - * + * * @return the value value. */ public List value() { @@ -60,7 +64,7 @@ public List value() { /** * Set the value property: Array of operations. - * + * * @param value the value value to set. * @return the OperationsList object itself. */ @@ -71,14 +75,13 @@ public OperationsList withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model OperationsList")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model OperationsList")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDetail.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDetail.java index b2aa8e2ef67d..92437bc7cdca 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDetail.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDetail.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Detailed pricing information for an sku. */ +/** + * Detailed pricing information for an sku. + */ @Fluent public final class PricingDetail { /* @@ -22,13 +24,15 @@ public final class PricingDetail { @JsonProperty(value = "value") private String value; - /** Creates an instance of PricingDetail class. */ + /** + * Creates an instance of PricingDetail class. + */ public PricingDetail() { } /** * Get the id property: Unique id for this pricing information. - * + * * @return the id value. */ public String id() { @@ -37,7 +41,7 @@ public String id() { /** * Set the id property: Unique id for this pricing information. - * + * * @param id the id value to set. * @return the PricingDetail object itself. */ @@ -48,7 +52,7 @@ public PricingDetail withId(String id) { /** * Get the value property: The unit cost of this sku. - * + * * @return the value value. */ public String value() { @@ -57,7 +61,7 @@ public String value() { /** * Set the value property: The unit cost of this sku. - * + * * @param value the value value to set. * @return the PricingDetail object itself. */ @@ -68,7 +72,7 @@ public PricingDetail withValue(String value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDimension.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDimension.java index 360a17fe523b..9229f49e9a08 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDimension.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/PricingDimension.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Information about pricing dimension. */ +/** + * Information about pricing dimension. + */ @Fluent public final class PricingDimension { /* @@ -22,13 +24,15 @@ public final class PricingDimension { @JsonProperty(value = "name") private String name; - /** Creates an instance of PricingDimension class. */ + /** + * Creates an instance of PricingDimension class. + */ public PricingDimension() { } /** * Get the id property: Unique id of this pricing dimension. - * + * * @return the id value. */ public String id() { @@ -37,7 +41,7 @@ public String id() { /** * Set the id property: Unique id of this pricing dimension. - * + * * @param id the id value to set. * @return the PricingDimension object itself. */ @@ -48,7 +52,7 @@ public PricingDimension withId(String id) { /** * Get the name property: The display name of this pricing dimension. - * + * * @return the name value. */ public String name() { @@ -57,7 +61,7 @@ public String name() { /** * Set the name property: The display name of this pricing dimension. - * + * * @param name the name value to set. * @return the PricingDimension object itself. */ @@ -68,7 +72,7 @@ public PricingDimension withName(String name) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Provider.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Provider.java index e411c7daf401..f43e9f3717ba 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Provider.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Provider.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Information about a Provider. A Provider is an entity that offers Targets to run Azure Quantum Jobs. */ +/** + * Information about a Provider. A Provider is an entity that offers Targets to run Azure Quantum Jobs. + */ @Fluent public final class Provider { /* @@ -46,13 +48,15 @@ public final class Provider { @JsonProperty(value = "resourceUsageId") private String resourceUsageId; - /** Creates an instance of Provider class. */ + /** + * Creates an instance of Provider class. + */ public Provider() { } /** * Get the providerId property: Unique id of this provider. - * + * * @return the providerId value. */ public String providerId() { @@ -61,7 +65,7 @@ public String providerId() { /** * Set the providerId property: Unique id of this provider. - * + * * @param providerId the providerId value to set. * @return the Provider object itself. */ @@ -72,7 +76,7 @@ public Provider withProviderId(String providerId) { /** * Get the providerSku property: The sku associated with pricing information for this provider. - * + * * @return the providerSku value. */ public String providerSku() { @@ -81,7 +85,7 @@ public String providerSku() { /** * Set the providerSku property: The sku associated with pricing information for this provider. - * + * * @param providerSku the providerSku value to set. * @return the Provider object itself. */ @@ -92,7 +96,7 @@ public Provider withProviderSku(String providerSku) { /** * Get the instanceUri property: A Uri identifying the specific instance of this provider. - * + * * @return the instanceUri value. */ public String instanceUri() { @@ -101,7 +105,7 @@ public String instanceUri() { /** * Set the instanceUri property: A Uri identifying the specific instance of this provider. - * + * * @param instanceUri the instanceUri value to set. * @return the Provider object itself. */ @@ -112,7 +116,7 @@ public Provider withInstanceUri(String instanceUri) { /** * Get the applicationName property: The provider's marketplace application display name. - * + * * @return the applicationName value. */ public String applicationName() { @@ -121,7 +125,7 @@ public String applicationName() { /** * Set the applicationName property: The provider's marketplace application display name. - * + * * @param applicationName the applicationName value to set. * @return the Provider object itself. */ @@ -132,7 +136,7 @@ public Provider withApplicationName(String applicationName) { /** * Get the provisioningState property: Provisioning status field. - * + * * @return the provisioningState value. */ public Status provisioningState() { @@ -141,7 +145,7 @@ public Status provisioningState() { /** * Set the provisioningState property: Provisioning status field. - * + * * @param provisioningState the provisioningState value to set. * @return the Provider object itself. */ @@ -152,7 +156,7 @@ public Provider withProvisioningState(Status provisioningState) { /** * Get the resourceUsageId property: Id to track resource usage for the provider. - * + * * @return the resourceUsageId value. */ public String resourceUsageId() { @@ -161,7 +165,7 @@ public String resourceUsageId() { /** * Set the resourceUsageId property: Id to track resource usage for the provider. - * + * * @param resourceUsageId the resourceUsageId value to set. * @return the Provider object itself. */ @@ -172,7 +176,7 @@ public Provider withResourceUsageId(String resourceUsageId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderDescription.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderDescription.java index c24c29097dcd..a4e4415595b0 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderDescription.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderDescription.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.quantum.fluent.models.ProviderDescriptionInner; -/** An immutable client-side representation of ProviderDescription. */ +/** + * An immutable client-side representation of ProviderDescription. + */ public interface ProviderDescription { /** * Gets the id property: Unique provider's id. - * + * * @return the id value. */ String id(); /** * Gets the name property: Provider's display name. - * + * * @return the name value. */ String name(); /** - * Gets the properties property: A list of provider-specific properties. - * + * Gets the properties property: Provider properties. + * * @return the properties value. */ ProviderProperties properties(); /** * Gets the inner com.azure.resourcemanager.quantum.fluent.models.ProviderDescriptionInner object. - * + * * @return the inner object. */ ProviderDescriptionInner innerModel(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderProperties.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderProperties.java index f9bee19edc18..da872729f706 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderProperties.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Provider properties. */ +/** + * Provider properties. + */ @Fluent public final class ProviderProperties { /* @@ -71,13 +73,15 @@ public final class ProviderProperties { @JsonProperty(value = "pricingDimensions") private List pricingDimensions; - /** Creates an instance of ProviderProperties class. */ + /** + * Creates an instance of ProviderProperties class. + */ public ProviderProperties() { } /** * Get the description property: A description about this provider. - * + * * @return the description value. */ public String description() { @@ -86,7 +90,7 @@ public String description() { /** * Get the providerType property: Provider type. - * + * * @return the providerType value. */ public String providerType() { @@ -95,7 +99,7 @@ public String providerType() { /** * Get the company property: Company name. - * + * * @return the company value. */ public String company() { @@ -104,7 +108,7 @@ public String company() { /** * Get the defaultEndpoint property: Provider's default endpoint. - * + * * @return the defaultEndpoint value. */ public String defaultEndpoint() { @@ -113,7 +117,7 @@ public String defaultEndpoint() { /** * Get the aad property: Azure Active Directory info. - * + * * @return the aad value. */ public ProviderPropertiesAad aad() { @@ -122,7 +126,7 @@ public ProviderPropertiesAad aad() { /** * Set the aad property: Azure Active Directory info. - * + * * @param aad the aad value to set. * @return the ProviderProperties object itself. */ @@ -133,7 +137,7 @@ public ProviderProperties withAad(ProviderPropertiesAad aad) { /** * Get the managedApplication property: Provider's Managed-Application info. - * + * * @return the managedApplication value. */ public ProviderPropertiesManagedApplication managedApplication() { @@ -142,7 +146,7 @@ public ProviderPropertiesManagedApplication managedApplication() { /** * Set the managedApplication property: Provider's Managed-Application info. - * + * * @param managedApplication the managedApplication value to set. * @return the ProviderProperties object itself. */ @@ -153,7 +157,7 @@ public ProviderProperties withManagedApplication(ProviderPropertiesManagedApplic /** * Get the targets property: The list of targets available from this provider. - * + * * @return the targets value. */ public List targets() { @@ -162,7 +166,7 @@ public List targets() { /** * Set the targets property: The list of targets available from this provider. - * + * * @param targets the targets value to set. * @return the ProviderProperties object itself. */ @@ -173,7 +177,7 @@ public ProviderProperties withTargets(List targets) { /** * Get the skus property: The list of skus available from this provider. - * + * * @return the skus value. */ public List skus() { @@ -182,7 +186,7 @@ public List skus() { /** * Set the skus property: The list of skus available from this provider. - * + * * @param skus the skus value to set. * @return the ProviderProperties object itself. */ @@ -193,7 +197,7 @@ public ProviderProperties withSkus(List skus) { /** * Get the quotaDimensions property: The list of quota dimensions from the provider. - * + * * @return the quotaDimensions value. */ public List quotaDimensions() { @@ -202,7 +206,7 @@ public List quotaDimensions() { /** * Set the quotaDimensions property: The list of quota dimensions from the provider. - * + * * @param quotaDimensions the quotaDimensions value to set. * @return the ProviderProperties object itself. */ @@ -213,7 +217,7 @@ public ProviderProperties withQuotaDimensions(List quotaDimensio /** * Get the pricingDimensions property: The list of pricing dimensions from the provider. - * + * * @return the pricingDimensions value. */ public List pricingDimensions() { @@ -222,7 +226,7 @@ public List pricingDimensions() { /** * Set the pricingDimensions property: The list of pricing dimensions from the provider. - * + * * @param pricingDimensions the pricingDimensions value to set. * @return the ProviderProperties object itself. */ @@ -233,7 +237,7 @@ public ProviderProperties withPricingDimensions(List pricingDi /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesAad.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesAad.java index dd8984c72283..63555eee9bdf 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesAad.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesAad.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure Active Directory info. */ +/** + * Azure Active Directory info. + */ @Immutable public final class ProviderPropertiesAad { /* @@ -22,13 +24,15 @@ public final class ProviderPropertiesAad { @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private String tenantId; - /** Creates an instance of ProviderPropertiesAad class. */ + /** + * Creates an instance of ProviderPropertiesAad class. + */ public ProviderPropertiesAad() { } /** * Get the applicationId property: Provider's application id. - * + * * @return the applicationId value. */ public String applicationId() { @@ -37,7 +41,7 @@ public String applicationId() { /** * Get the tenantId property: Provider's tenant id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -46,7 +50,7 @@ public String tenantId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesManagedApplication.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesManagedApplication.java index 7173344b7059..4da9b4fec7c4 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesManagedApplication.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProviderPropertiesManagedApplication.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Provider's Managed-Application info. */ +/** + * Provider's Managed-Application info. + */ @Immutable public final class ProviderPropertiesManagedApplication { /* @@ -22,13 +24,15 @@ public final class ProviderPropertiesManagedApplication { @JsonProperty(value = "offerId", access = JsonProperty.Access.WRITE_ONLY) private String offerId; - /** Creates an instance of ProviderPropertiesManagedApplication class. */ + /** + * Creates an instance of ProviderPropertiesManagedApplication class. + */ public ProviderPropertiesManagedApplication() { } /** * Get the publisherId property: Provider's publisher id. - * + * * @return the publisherId value. */ public String publisherId() { @@ -37,7 +41,7 @@ public String publisherId() { /** * Get the offerId property: Provider's offer id. - * + * * @return the offerId value. */ public String offerId() { @@ -46,7 +50,7 @@ public String offerId() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProvisioningStatus.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProvisioningStatus.java index 3dbe6454ac3f..2292d9e6703e 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProvisioningStatus.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ProvisioningStatus.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning status field. */ +/** + * Provisioning status field. + */ public final class ProvisioningStatus extends ExpandableStringEnum { - /** Static value Succeeded for ProvisioningStatus. */ + /** + * Static value Succeeded for ProvisioningStatus. + */ public static final ProvisioningStatus SUCCEEDED = fromString("Succeeded"); - /** Static value ProviderLaunching for ProvisioningStatus. */ + /** + * Static value ProviderLaunching for ProvisioningStatus. + */ public static final ProvisioningStatus PROVIDER_LAUNCHING = fromString("ProviderLaunching"); - /** Static value ProviderUpdating for ProvisioningStatus. */ + /** + * Static value ProviderUpdating for ProvisioningStatus. + */ public static final ProvisioningStatus PROVIDER_UPDATING = fromString("ProviderUpdating"); - /** Static value ProviderDeleting for ProvisioningStatus. */ + /** + * Static value ProviderDeleting for ProvisioningStatus. + */ public static final ProvisioningStatus PROVIDER_DELETING = fromString("ProviderDeleting"); - /** Static value ProviderProvisioning for ProvisioningStatus. */ + /** + * Static value ProviderProvisioning for ProvisioningStatus. + */ public static final ProvisioningStatus PROVIDER_PROVISIONING = fromString("ProviderProvisioning"); - /** Static value Failed for ProvisioningStatus. */ + /** + * Static value Failed for ProvisioningStatus. + */ public static final ProvisioningStatus FAILED = fromString("Failed"); /** * Creates a new instance of ProvisioningStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public ProvisioningStatus() { /** * Creates or finds a ProvisioningStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ProvisioningStatus. */ @@ -50,7 +64,7 @@ public static ProvisioningStatus fromString(String name) { /** * Gets known ProvisioningStatus values. - * + * * @return known ProvisioningStatus values. */ public static Collection values() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspace.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspace.java index fe0be1d17252..c89ca27e3e86 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspace.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspace.java @@ -11,139 +11,153 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of QuantumWorkspace. */ +/** + * An immutable client-side representation of QuantumWorkspace. + */ public interface QuantumWorkspace { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the identity property: Managed Identity information. - * + * * @return the identity value. */ QuantumWorkspaceIdentity identity(); /** - * Gets the systemData property: System metadata. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the providers property: List of Providers selected for this Workspace. - * + * * @return the providers value. */ List providers(); /** * Gets the usable property: Whether the current workspace is ready to accept Jobs. - * + * * @return the usable value. */ UsableStatus usable(); /** * Gets the provisioningState property: Provisioning status field. - * + * * @return the provisioningState value. */ ProvisioningStatus provisioningState(); /** * Gets the storageAccount property: ARM Resource Id of the storage account associated with this workspace. - * + * * @return the storageAccount value. */ String storageAccount(); /** * Gets the endpointUri property: The URI of the workspace endpoint. - * + * * @return the endpointUri value. */ String endpointUri(); + /** + * Gets the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys. + * + * @return the apiKeyEnabled value. + */ + Boolean apiKeyEnabled(); + /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.quantum.fluent.models.QuantumWorkspaceInner object. - * + * * @return the inner object. */ QuantumWorkspaceInner innerModel(); - /** The entirety of the QuantumWorkspace definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the QuantumWorkspace definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The QuantumWorkspace definition stages. */ + /** + * The QuantumWorkspace definition stages. + */ interface DefinitionStages { - /** The first stage of the QuantumWorkspace definition. */ + /** + * The first stage of the QuantumWorkspace definition. + */ interface Blank extends WithLocation { } - /** The stage of the QuantumWorkspace definition allowing to specify location. */ + /** + * The stage of the QuantumWorkspace definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -151,19 +165,21 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the QuantumWorkspace definition allowing to specify parent resource. */ + /** + * The stage of the QuantumWorkspace definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -173,105 +189,129 @@ interface WithResourceGroup { * The stage of the QuantumWorkspace definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithProviders, - DefinitionStages.WithStorageAccount { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithProviders, DefinitionStages.WithStorageAccount, DefinitionStages.WithApiKeyEnabled { /** * Executes the create request. - * + * * @return the created resource. */ QuantumWorkspace create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ QuantumWorkspace create(Context context); } - /** The stage of the QuantumWorkspace definition allowing to specify tags. */ + /** + * The stage of the QuantumWorkspace definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the QuantumWorkspace definition allowing to specify identity. */ + /** + * The stage of the QuantumWorkspace definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: Managed Identity information.. - * + * * @param identity Managed Identity information. * @return the next definition stage. */ WithCreate withIdentity(QuantumWorkspaceIdentity identity); } - /** The stage of the QuantumWorkspace definition allowing to specify providers. */ + /** + * The stage of the QuantumWorkspace definition allowing to specify providers. + */ interface WithProviders { /** * Specifies the providers property: List of Providers selected for this Workspace. - * + * * @param providers List of Providers selected for this Workspace. * @return the next definition stage. */ WithCreate withProviders(List providers); } - /** The stage of the QuantumWorkspace definition allowing to specify storageAccount. */ + /** + * The stage of the QuantumWorkspace definition allowing to specify storageAccount. + */ interface WithStorageAccount { /** * Specifies the storageAccount property: ARM Resource Id of the storage account associated with this * workspace.. - * + * * @param storageAccount ARM Resource Id of the storage account associated with this workspace. * @return the next definition stage. */ WithCreate withStorageAccount(String storageAccount); } + + /** + * The stage of the QuantumWorkspace definition allowing to specify apiKeyEnabled. + */ + interface WithApiKeyEnabled { + /** + * Specifies the apiKeyEnabled property: Indicator of enablement of the Quantum workspace Api keys.. + * + * @param apiKeyEnabled Indicator of enablement of the Quantum workspace Api keys. + * @return the next definition stage. + */ + WithCreate withApiKeyEnabled(Boolean apiKeyEnabled); + } } /** * Begins update for the QuantumWorkspace resource. - * + * * @return the stage of resource update. */ QuantumWorkspace.Update update(); - /** The template for QuantumWorkspace update. */ + /** + * The template for QuantumWorkspace update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ QuantumWorkspace apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ QuantumWorkspace apply(Context context); } - /** The QuantumWorkspace update stages. */ + /** + * The QuantumWorkspace update stages. + */ interface UpdateStages { - /** The stage of the QuantumWorkspace update allowing to specify tags. */ + /** + * The stage of the QuantumWorkspace update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ @@ -281,14 +321,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ QuantumWorkspace refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspaceIdentity.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspaceIdentity.java index f78a76a60ecd..a3eb31bdbd0d 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspaceIdentity.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuantumWorkspaceIdentity.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Managed Identity information. */ +/** + * Managed Identity information. + */ @Fluent public final class QuantumWorkspaceIdentity { /* @@ -28,13 +30,15 @@ public final class QuantumWorkspaceIdentity { @JsonProperty(value = "type") private ResourceIdentityType type; - /** Creates an instance of QuantumWorkspaceIdentity class. */ + /** + * Creates an instance of QuantumWorkspaceIdentity class. + */ public QuantumWorkspaceIdentity() { } /** * Get the principalId property: The principal ID of resource identity. - * + * * @return the principalId value. */ public String principalId() { @@ -43,7 +47,7 @@ public String principalId() { /** * Get the tenantId property: The tenant ID of resource. - * + * * @return the tenantId value. */ public String tenantId() { @@ -52,7 +56,7 @@ public String tenantId() { /** * Get the type property: The identity type. - * + * * @return the type value. */ public ResourceIdentityType type() { @@ -61,7 +65,7 @@ public ResourceIdentityType type() { /** * Set the type property: The identity type. - * + * * @param type the type value to set. * @return the QuantumWorkspaceIdentity object itself. */ @@ -72,7 +76,7 @@ public QuantumWorkspaceIdentity withType(ResourceIdentityType type) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuotaDimension.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuotaDimension.java index 7caeee2c8a9e..e33541f7e7b5 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuotaDimension.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/QuotaDimension.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Information about a specific quota dimension. */ +/** + * Information about a specific quota dimension. + */ @Fluent public final class QuotaDimension { /* @@ -58,13 +60,15 @@ public final class QuotaDimension { @JsonProperty(value = "unitPlural") private String unitPlural; - /** Creates an instance of QuotaDimension class. */ + /** + * Creates an instance of QuotaDimension class. + */ public QuotaDimension() { } /** * Get the id property: Unique id of this dimension. - * + * * @return the id value. */ public String id() { @@ -73,7 +77,7 @@ public String id() { /** * Set the id property: Unique id of this dimension. - * + * * @param id the id value to set. * @return the QuotaDimension object itself. */ @@ -84,7 +88,7 @@ public QuotaDimension withId(String id) { /** * Get the scope property: The scope of this quota dimension. - * + * * @return the scope value. */ public String scope() { @@ -93,7 +97,7 @@ public String scope() { /** * Set the scope property: The scope of this quota dimension. - * + * * @param scope the scope value to set. * @return the QuotaDimension object itself. */ @@ -104,7 +108,7 @@ public QuotaDimension withScope(String scope) { /** * Get the period property: The reset period of this quota dimension. - * + * * @return the period value. */ public String period() { @@ -113,7 +117,7 @@ public String period() { /** * Set the period property: The reset period of this quota dimension. - * + * * @param period the period value to set. * @return the QuotaDimension object itself. */ @@ -124,7 +128,7 @@ public QuotaDimension withPeriod(String period) { /** * Get the quota property: The max limit of this dimension. - * + * * @return the quota value. */ public Float quota() { @@ -133,7 +137,7 @@ public Float quota() { /** * Set the quota property: The max limit of this dimension. - * + * * @param quota the quota value to set. * @return the QuotaDimension object itself. */ @@ -144,7 +148,7 @@ public QuotaDimension withQuota(Float quota) { /** * Get the name property: The display name of this quota dimension. - * + * * @return the name value. */ public String name() { @@ -153,7 +157,7 @@ public String name() { /** * Set the name property: The display name of this quota dimension. - * + * * @param name the name value to set. * @return the QuotaDimension object itself. */ @@ -164,7 +168,7 @@ public QuotaDimension withName(String name) { /** * Get the description property: A description about this quota dimension. - * + * * @return the description value. */ public String description() { @@ -173,7 +177,7 @@ public String description() { /** * Set the description property: A description about this quota dimension. - * + * * @param description the description value to set. * @return the QuotaDimension object itself. */ @@ -184,7 +188,7 @@ public QuotaDimension withDescription(String description) { /** * Get the unit property: The standard unit of measurement used for this quota dimension. - * + * * @return the unit value. */ public String unit() { @@ -193,7 +197,7 @@ public String unit() { /** * Set the unit property: The standard unit of measurement used for this quota dimension. - * + * * @param unit the unit value to set. * @return the QuotaDimension object itself. */ @@ -204,7 +208,7 @@ public QuotaDimension withUnit(String unit) { /** * Get the unitPlural property: The standard unit of measurement used for this quota dimension in plural form. - * + * * @return the unitPlural value. */ public String unitPlural() { @@ -213,7 +217,7 @@ public String unitPlural() { /** * Set the unitPlural property: The standard unit of measurement used for this quota dimension in plural form. - * + * * @param unitPlural the unitPlural value to set. * @return the QuotaDimension object itself. */ @@ -224,7 +228,7 @@ public QuotaDimension withUnitPlural(String unitPlural) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ResourceIdentityType.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ResourceIdentityType.java index 3c3e1302bf5a..2a37ec8cc9f1 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ResourceIdentityType.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/ResourceIdentityType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The identity type. */ +/** + * The identity type. + */ public final class ResourceIdentityType extends ExpandableStringEnum { - /** Static value SystemAssigned for ResourceIdentityType. */ + /** + * Static value SystemAssigned for ResourceIdentityType. + */ public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value None for ResourceIdentityType. */ + /** + * Static value None for ResourceIdentityType. + */ public static final ResourceIdentityType NONE = fromString("None"); /** * Creates a new instance of ResourceIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public ResourceIdentityType() { /** * Creates or finds a ResourceIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ResourceIdentityType. */ @@ -38,7 +44,7 @@ public static ResourceIdentityType fromString(String name) { /** * Gets known ResourceIdentityType values. - * + * * @return known ResourceIdentityType values. */ public static Collection values() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/SkuDescription.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/SkuDescription.java index b6df9e4a859b..bd2c996874a9 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/SkuDescription.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/SkuDescription.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Information about a specific sku. */ +/** + * Information about a specific sku. + */ @Fluent public final class SkuDescription { /* @@ -65,13 +67,15 @@ public final class SkuDescription { @JsonProperty(value = "pricingDetails") private List pricingDetails; - /** Creates an instance of SkuDescription class. */ + /** + * Creates an instance of SkuDescription class. + */ public SkuDescription() { } /** * Get the id property: Unique sku id. - * + * * @return the id value. */ public String id() { @@ -80,7 +84,7 @@ public String id() { /** * Set the id property: Unique sku id. - * + * * @param id the id value to set. * @return the SkuDescription object itself. */ @@ -91,7 +95,7 @@ public SkuDescription withId(String id) { /** * Get the name property: Display name of this sku. - * + * * @return the name value. */ public String name() { @@ -100,7 +104,7 @@ public String name() { /** * Set the name property: Display name of this sku. - * + * * @param name the name value to set. * @return the SkuDescription object itself. */ @@ -111,7 +115,7 @@ public SkuDescription withName(String name) { /** * Get the version property: Display name of this sku. - * + * * @return the version value. */ public String version() { @@ -120,7 +124,7 @@ public String version() { /** * Set the version property: Display name of this sku. - * + * * @param version the version value to set. * @return the SkuDescription object itself. */ @@ -131,7 +135,7 @@ public SkuDescription withVersion(String version) { /** * Get the description property: Description about this sku. - * + * * @return the description value. */ public String description() { @@ -140,7 +144,7 @@ public String description() { /** * Set the description property: Description about this sku. - * + * * @param description the description value to set. * @return the SkuDescription object itself. */ @@ -151,7 +155,7 @@ public SkuDescription withDescription(String description) { /** * Get the restrictedAccessUri property: Uri to subscribe to the restricted access sku. - * + * * @return the restrictedAccessUri value. */ public String restrictedAccessUri() { @@ -160,7 +164,7 @@ public String restrictedAccessUri() { /** * Set the restrictedAccessUri property: Uri to subscribe to the restricted access sku. - * + * * @param restrictedAccessUri the restrictedAccessUri value to set. * @return the SkuDescription object itself. */ @@ -172,7 +176,7 @@ public SkuDescription withRestrictedAccessUri(String restrictedAccessUri) { /** * Get the autoAdd property: Flag to indicate whether the sku should be automatically added during workspace * creation. - * + * * @return the autoAdd value. */ public Boolean autoAdd() { @@ -182,7 +186,7 @@ public Boolean autoAdd() { /** * Set the autoAdd property: Flag to indicate whether the sku should be automatically added during workspace * creation. - * + * * @param autoAdd the autoAdd value to set. * @return the SkuDescription object itself. */ @@ -193,7 +197,7 @@ public SkuDescription withAutoAdd(Boolean autoAdd) { /** * Get the targets property: The list of targets available for this sku. - * + * * @return the targets value. */ public List targets() { @@ -202,7 +206,7 @@ public List targets() { /** * Set the targets property: The list of targets available for this sku. - * + * * @param targets the targets value to set. * @return the SkuDescription object itself. */ @@ -213,7 +217,7 @@ public SkuDescription withTargets(List targets) { /** * Get the quotaDimensions property: The list of quota dimensions for this sku. - * + * * @return the quotaDimensions value. */ public List quotaDimensions() { @@ -222,7 +226,7 @@ public List quotaDimensions() { /** * Set the quotaDimensions property: The list of quota dimensions for this sku. - * + * * @param quotaDimensions the quotaDimensions value to set. * @return the SkuDescription object itself. */ @@ -233,7 +237,7 @@ public SkuDescription withQuotaDimensions(List quotaDimensions) /** * Get the pricingDetails property: The list of pricing details for the sku. - * + * * @return the pricingDetails value. */ public List pricingDetails() { @@ -242,7 +246,7 @@ public List pricingDetails() { /** * Set the pricingDetails property: The list of pricing details for the sku. - * + * * @param pricingDetails the pricingDetails value to set. * @return the SkuDescription object itself. */ @@ -253,7 +257,7 @@ public SkuDescription withPricingDetails(List pricingDetails) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Status.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Status.java index 11a266cbc189..8aa0b6203954 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Status.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Status.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning status field. */ +/** + * Provisioning status field. + */ public final class Status extends ExpandableStringEnum { - /** Static value Succeeded for Status. */ + /** + * Static value Succeeded for Status. + */ public static final Status SUCCEEDED = fromString("Succeeded"); - /** Static value Launching for Status. */ + /** + * Static value Launching for Status. + */ public static final Status LAUNCHING = fromString("Launching"); - /** Static value Updating for Status. */ + /** + * Static value Updating for Status. + */ public static final Status UPDATING = fromString("Updating"); - /** Static value Deleting for Status. */ + /** + * Static value Deleting for Status. + */ public static final Status DELETING = fromString("Deleting"); - /** Static value Deleted for Status. */ + /** + * Static value Deleted for Status. + */ public static final Status DELETED = fromString("Deleted"); - /** Static value Failed for Status. */ + /** + * Static value Failed for Status. + */ public static final Status FAILED = fromString("Failed"); /** * Creates a new instance of Status value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public Status() { /** * Creates or finds a Status from its string representation. - * + * * @param name a name to look for. * @return the corresponding Status. */ @@ -50,7 +64,7 @@ public static Status fromString(String name) { /** * Gets known Status values. - * + * * @return known Status values. */ public static Collection values() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TagsObject.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TagsObject.java index 0783cd7ec7fa..5f801c75d9a1 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TagsObject.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TagsObject.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Tags object for patch operations. */ +/** + * Tags object for patch operations. + */ @Fluent public final class TagsObject { /* @@ -19,13 +21,15 @@ public final class TagsObject { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of TagsObject class. */ + /** + * Creates an instance of TagsObject class. + */ public TagsObject() { } /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the TagsObject object itself. */ @@ -45,7 +49,7 @@ public TagsObject withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TargetDescription.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TargetDescription.java index c8b4526f54d6..e27fa8acc700 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TargetDescription.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/TargetDescription.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Information about a Target. A target is the component that can process a specific type of Job. */ +/** + * Information about a Target. A target is the component that can process a specific type of Job. + */ @Fluent public final class TargetDescription { /* @@ -41,13 +43,15 @@ public final class TargetDescription { @JsonProperty(value = "acceptedContentEncodings") private List acceptedContentEncodings; - /** Creates an instance of TargetDescription class. */ + /** + * Creates an instance of TargetDescription class. + */ public TargetDescription() { } /** * Get the id property: Unique target id. - * + * * @return the id value. */ public String id() { @@ -56,7 +60,7 @@ public String id() { /** * Set the id property: Unique target id. - * + * * @param id the id value to set. * @return the TargetDescription object itself. */ @@ -67,7 +71,7 @@ public TargetDescription withId(String id) { /** * Get the name property: Display name of this target. - * + * * @return the name value. */ public String name() { @@ -76,7 +80,7 @@ public String name() { /** * Set the name property: Display name of this target. - * + * * @param name the name value to set. * @return the TargetDescription object itself. */ @@ -87,7 +91,7 @@ public TargetDescription withName(String name) { /** * Get the description property: A description about this target. - * + * * @return the description value. */ public String description() { @@ -96,7 +100,7 @@ public String description() { /** * Set the description property: A description about this target. - * + * * @param description the description value to set. * @return the TargetDescription object itself. */ @@ -107,7 +111,7 @@ public TargetDescription withDescription(String description) { /** * Get the acceptedDataFormats property: List of data formats accepted by this target. - * + * * @return the acceptedDataFormats value. */ public List acceptedDataFormats() { @@ -116,7 +120,7 @@ public List acceptedDataFormats() { /** * Set the acceptedDataFormats property: List of data formats accepted by this target. - * + * * @param acceptedDataFormats the acceptedDataFormats value to set. * @return the TargetDescription object itself. */ @@ -127,7 +131,7 @@ public TargetDescription withAcceptedDataFormats(List acceptedDataFormat /** * Get the acceptedContentEncodings property: List of content encodings accepted by this target. - * + * * @return the acceptedContentEncodings value. */ public List acceptedContentEncodings() { @@ -136,7 +140,7 @@ public List acceptedContentEncodings() { /** * Set the acceptedContentEncodings property: List of content encodings accepted by this target. - * + * * @param acceptedContentEncodings the acceptedContentEncodings value to set. * @return the TargetDescription object itself. */ @@ -147,7 +151,7 @@ public TargetDescription withAcceptedContentEncodings(List acceptedConte /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/UsableStatus.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/UsableStatus.java index 9504e82bdcd4..84b24afc0290 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/UsableStatus.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/UsableStatus.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Whether the current workspace is ready to accept Jobs. */ +/** + * Whether the current workspace is ready to accept Jobs. + */ public final class UsableStatus extends ExpandableStringEnum { - /** Static value Yes for UsableStatus. */ + /** + * Static value Yes for UsableStatus. + */ public static final UsableStatus YES = fromString("Yes"); - /** Static value No for UsableStatus. */ + /** + * Static value No for UsableStatus. + */ public static final UsableStatus NO = fromString("No"); - /** Static value Partial for UsableStatus. */ + /** + * Static value Partial for UsableStatus. + */ public static final UsableStatus PARTIAL = fromString("Partial"); /** * Creates a new instance of UsableStatus value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public UsableStatus() { /** * Creates or finds a UsableStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding UsableStatus. */ @@ -41,7 +49,7 @@ public static UsableStatus fromString(String name) { /** * Gets known UsableStatus values. - * + * * @return known UsableStatus values. */ public static Collection values() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceListResult.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceListResult.java index 2a28c6caff5b..334d372f217c 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceListResult.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceListResult.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The response of a list Workspaces operation. */ +/** + * The response of a list Workspaces operation. + */ @Fluent public final class WorkspaceListResult { /* @@ -24,13 +26,15 @@ public final class WorkspaceListResult { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of WorkspaceListResult class. */ + /** + * Creates an instance of WorkspaceListResult class. + */ public WorkspaceListResult() { } /** * Get the value property: Result of a list Workspaces operation. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Result of a list Workspaces operation. - * + * * @param value the value value to set. * @return the WorkspaceListResult object itself. */ @@ -51,7 +55,7 @@ public WorkspaceListResult withValue(List value) { /** * Get the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of * Workspaces. - * + * * @return the nextLink value. */ public String nextLink() { @@ -61,7 +65,7 @@ public String nextLink() { /** * Set the nextLink property: Link to the next set of results. Not empty if Value contains incomplete list of * Workspaces. - * + * * @param nextLink the nextLink value to set. * @return the WorkspaceListResult object itself. */ @@ -72,7 +76,7 @@ public WorkspaceListResult withNextLink(String nextLink) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceOperations.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceOperations.java index b212e665ec3f..3acd9829b53c 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceOperations.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/WorkspaceOperations.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of WorkspaceOperations. */ +/** + * Resource collection API of WorkspaceOperations. + */ public interface WorkspaceOperations { /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @param context The context to associate with this operation. @@ -20,12 +22,12 @@ public interface WorkspaceOperations { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of check name availability along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context); + Response checkNameAvailabilityWithResponse(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters, Context context); /** * Check the availability of the resource name. - * + * * @param locationName Location. * @param checkNameAvailabilityParameters The name and type of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -33,6 +35,62 @@ Response checkNameAvailabilityWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return result of check name availability. */ - CheckNameAvailabilityResult checkNameAvailability( - String locationName, CheckNameAvailabilityParameters checkNameAvailabilityParameters); + CheckNameAvailabilityResult checkNameAvailability(String locationName, + CheckNameAvailabilityParameters checkNameAvailabilityParameters); + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs along with {@link Response}. + */ + Response listKeysWithResponse(String resourceGroupName, String workspaceName, Context context); + + /** + * Get the keys to use with the Quantum APIs. A key is used to authenticate and authorize access to the Quantum REST + * APIs. Only one key is needed at a time; two are given to provide seamless key regeneration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the keys to use with the Quantum APIs. + */ + ListKeysResult listKeys(String resourceGroupName, String workspaceName); + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response regenerateKeysWithResponse(String resourceGroupName, String workspaceName, ApiKeys keySpecification, + Context context); + + /** + * Regenerate either the primary or secondary key for use with the Quantum APIs. The old key will stop working + * immediately. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the quantum workspace resource. + * @param keySpecification Which key to regenerate: primary or secondary. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void regenerateKeys(String resourceGroupName, String workspaceName, ApiKeys keySpecification); } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Workspaces.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Workspaces.java index 9a3ce0baffba..d36eded90648 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Workspaces.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/Workspaces.java @@ -8,12 +8,14 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Workspaces. */ +/** + * Resource collection API of Workspaces. + */ public interface Workspaces { /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -21,13 +23,13 @@ public interface Workspaces { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the resource proxy definition object for quantum workspace along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, + Context context); /** * Returns the Workspace resource associated with the given name. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -38,8 +40,8 @@ Response getByResourceGroupWithResponse( /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -49,8 +51,8 @@ Response getByResourceGroupWithResponse( /** * Deletes a Workspace resource. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the quantum workspace resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -61,7 +63,7 @@ Response getByResourceGroupWithResponse( /** * Gets the list of Workspaces within a Subscription. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of Workspaces within a Subscription as paginated response with {@link PagedIterable}. @@ -70,7 +72,7 @@ Response getByResourceGroupWithResponse( /** * Gets the list of Workspaces within a Subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -81,8 +83,8 @@ Response getByResourceGroupWithResponse( /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -92,8 +94,8 @@ Response getByResourceGroupWithResponse( /** * Gets the list of Workspaces within a resource group. - * - * @param resourceGroupName The name of the resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -104,7 +106,7 @@ Response getByResourceGroupWithResponse( /** * Returns the Workspace resource associated with the given name. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -115,7 +117,7 @@ Response getByResourceGroupWithResponse( /** * Returns the Workspace resource associated with the given name. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -127,7 +129,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a Workspace resource. - * + * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -137,7 +139,7 @@ Response getByResourceGroupWithResponse( /** * Deletes a Workspace resource. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -148,7 +150,7 @@ Response getByResourceGroupWithResponse( /** * Begins definition for a new QuantumWorkspace resource. - * + * * @param name resource name. * @return the first stage of the new QuantumWorkspace definition. */ diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/package-info.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/package-info.java index 186530e5e0eb..bb29f3eb81af 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/package-info.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for AzureQuantumManagementClient. null. */ +/** + * Package containing the data models for AzureQuantumManagementClient. + * null. + */ package com.azure.resourcemanager.quantum.models; diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/package-info.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/package-info.java index 71e8e34a4378..55c6aa3a1ae8 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/package-info.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/com/azure/resourcemanager/quantum/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for AzureQuantumManagementClient. null. */ +/** + * Package containing the classes for AzureQuantumManagementClient. + * null. + */ package com.azure.resourcemanager.quantum; diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/module-info.java b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/module-info.java index 7b0c53d5d30b..d1b747a33801 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/main/java/module-info.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.quantum { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.quantum; exports com.azure.resourcemanager.quantum.fluent; exports com.azure.resourcemanager.quantum.fluent.models; exports com.azure.resourcemanager.quantum.models; - - opens com.azure.resourcemanager.quantum.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.quantum.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.quantum.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.quantum.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quantum/proxy-config.json b/sdk/quantum/azure-resourcemanager-quantum/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quantum/proxy-config.json new file mode 100644 index 000000000000..176ab623574d --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quantum/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.quantum.implementation.WorkspacesClientImpl$WorkspacesService" ], [ "com.azure.resourcemanager.quantum.implementation.OfferingsClientImpl$OfferingsService" ], [ "com.azure.resourcemanager.quantum.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.quantum.implementation.WorkspaceOperationsClientImpl$WorkspaceOperationsService" ] ] \ No newline at end of file diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quantum/reflect-config.json b/sdk/quantum/azure-resourcemanager-quantum/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quantum/reflect-config.json new file mode 100644 index 000000000000..e36c12ea5171 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-quantum/reflect-config.json @@ -0,0 +1,146 @@ +[ { + "name" : "com.azure.resourcemanager.quantum.fluent.models.QuantumWorkspaceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.fluent.models.WorkspaceResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.Provider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.QuantumWorkspaceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.TagsObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.WorkspaceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.OfferingsListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.fluent.models.ProviderDescriptionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.ProviderProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.ProviderPropertiesAad", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.ProviderPropertiesManagedApplication", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.TargetDescription", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.SkuDescription", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.QuotaDimension", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.PricingDetail", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.PricingDimension", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.OperationsList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.CheckNameAvailabilityParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.fluent.models.CheckNameAvailabilityResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.fluent.models.ListKeysResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.ApiKey", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.ApiKeys", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.Status", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.UsableStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.ProvisioningStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.ResourceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.quantum.models.KeyType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OfferingsListSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OfferingsListSamples.java index 3c653dc70138..6e8f743dfbda 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OfferingsListSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OfferingsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.quantum.generated; -/** Samples for Offerings List. */ +/** + * Samples for Offerings List. + */ public final class OfferingsListSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/offeringsList.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/offeringsList.json */ /** * Sample code: OfferingsList. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void offeringsList(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OperationsListSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OperationsListSamples.java index b77c89f29d6e..d25909608e0a 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OperationsListSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/OperationsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.quantum.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/operations.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/operations.json */ /** * Sample code: Operations. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void operations(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationCheckNameAvailabilitySamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationCheckNameAvailabilitySamples.java index ab3867ba8c5d..5c3a27642ef8 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationCheckNameAvailabilitySamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationCheckNameAvailabilitySamples.java @@ -6,25 +6,24 @@ import com.azure.resourcemanager.quantum.models.CheckNameAvailabilityParameters; -/** Samples for WorkspaceOperation CheckNameAvailability. */ +/** + * Samples for WorkspaceOperation CheckNameAvailability. + */ public final class WorkspaceOperationCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesCheckNameAvailability.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesCheckNameAvailability.json */ /** * Sample code: QuantumWorkspacesCheckNameAvailability. - * + * * @param manager Entry point to AzureQuantumManager. */ - public static void quantumWorkspacesCheckNameAvailability( - com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - manager - .workspaceOperations() - .checkNameAvailabilityWithResponse( - "westus2", - new CheckNameAvailabilityParameters() - .withName("sample-workspace-name") - .withType("Microsoft.Quantum/Workspaces"), + public static void + quantumWorkspacesCheckNameAvailability(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + manager.workspaceOperations() + .checkNameAvailabilityWithResponse("westus2", new CheckNameAvailabilityParameters() + .withName("sample-workspace-name").withType("Microsoft.Quantum/Workspaces"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationListKeysSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationListKeysSamples.java new file mode 100644 index 000000000000..95ce88726bf8 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationListKeysSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.generated; + +/** + * Samples for WorkspaceOperation ListKeys. + */ +public final class WorkspaceOperationListKeysSamples { + /* + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/listKeys.json + */ + /** + * Sample code: ListKeys. + * + * @param manager Entry point to AzureQuantumManager. + */ + public static void listKeys(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + manager.workspaceOperations().listKeysWithResponse("quantumResourcegroup", "quantumworkspace1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationRegenerateKeysSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationRegenerateKeysSamples.java new file mode 100644 index 000000000000..9a876bceb185 --- /dev/null +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationRegenerateKeysSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.quantum.generated; + +import com.azure.resourcemanager.quantum.models.ApiKeys; +import com.azure.resourcemanager.quantum.models.KeyType; +import java.util.Arrays; + +/** + * Samples for WorkspaceOperation RegenerateKeys. + */ +public final class WorkspaceOperationRegenerateKeysSamples { + /* + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/regenerateKey.json + */ + /** + * Sample code: RegenerateKey. + * + * @param manager Entry point to AzureQuantumManager. + */ + public static void regenerateKey(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + manager.workspaceOperations().regenerateKeysWithResponse("quantumResourcegroup", "quantumworkspace1", + new ApiKeys().withKeys(Arrays.asList(KeyType.PRIMARY, KeyType.SECONDARY)), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesCreateOrUpdateSamples.java index 3960560260eb..b4e61fee32c2 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesCreateOrUpdateSamples.java @@ -7,28 +7,26 @@ import com.azure.resourcemanager.quantum.models.Provider; import java.util.Arrays; -/** Samples for Workspaces CreateOrUpdate. */ +/** + * Samples for Workspaces CreateOrUpdate. + */ public final class WorkspacesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesPut.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/quantumWorkspacesPut + * .json */ /** * Sample code: QuantumWorkspacesPut. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesPut(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - manager - .workspaces() - .define("quantumworkspace1") - .withRegion("West US") + manager.workspaces().define("quantumworkspace1").withRegion("West US") .withExistingResourceGroup("quantumResourcegroup") - .withProviders( - Arrays - .asList( - new Provider().withProviderId("Honeywell").withProviderSku("Basic"), - new Provider().withProviderId("IonQ").withProviderSku("Basic"), - new Provider().withProviderId("OneQBit").withProviderSku("Basic"))) + .withProviders(Arrays.asList(new Provider().withProviderId("Honeywell").withProviderSku("Basic"), + new Provider().withProviderId("IonQ").withProviderSku("Basic"), + new Provider().withProviderId("OneQBit").withProviderSku("Basic"))) .withStorageAccount( "/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount") .create(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteSamples.java index 5c72896d3b1d..269930594804 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.quantum.generated; -/** Samples for Workspaces Delete. */ +/** + * Samples for Workspaces Delete. + */ public final class WorkspacesDeleteSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesDelete.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesDelete.json */ /** * Sample code: QuantumWorkspacesDelete. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesDelete(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesGetByResourceGroupSamples.java index 083173be395f..80d38be11316 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesGetByResourceGroupSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.quantum.generated; -/** Samples for Workspaces GetByResourceGroup. */ +/** + * Samples for Workspaces GetByResourceGroup. + */ public final class WorkspacesGetByResourceGroupSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesGet.json + * x-ms-original-file: + * specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/quantumWorkspacesGet + * .json */ /** * Sample code: QuantumWorkspacesGet. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesGet(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - manager - .workspaces() - .getByResourceGroupWithResponse( - "quantumResourcegroup", "quantumworkspace1", com.azure.core.util.Context.NONE); + manager.workspaces().getByResourceGroupWithResponse("quantumResourcegroup", "quantumworkspace1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListByResourceGroupSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListByResourceGroupSamples.java index a67c363c849c..dac33d4a44fe 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListByResourceGroupSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.quantum.generated; -/** Samples for Workspaces ListByResourceGroup. */ +/** + * Samples for Workspaces ListByResourceGroup. + */ public final class WorkspacesListByResourceGroupSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesListResourceGroup.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesListResourceGroup.json */ /** * Sample code: QuantumWorkspacesListByResourceGroup. - * + * * @param manager Entry point to AzureQuantumManager. */ - public static void quantumWorkspacesListByResourceGroup( - com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + public static void + quantumWorkspacesListByResourceGroup(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { manager.workspaces().listByResourceGroup("quantumResourcegroup", com.azure.core.util.Context.NONE); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListSamples.java index 736b4f0cfa25..7edde7c5bd46 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesListSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.quantum.generated; -/** Samples for Workspaces List. */ +/** + * Samples for Workspaces List. + */ public final class WorkspacesListSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesListSubscription.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesListSubscription.json */ /** * Sample code: QuantumWorkspacesListBySubscription. - * + * * @param manager Entry point to AzureQuantumManager. */ - public static void quantumWorkspacesListBySubscription( - com.azure.resourcemanager.quantum.AzureQuantumManager manager) { + public static void + quantumWorkspacesListBySubscription(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { manager.workspaces().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesUpdateTagsSamples.java b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesUpdateTagsSamples.java index d64a307ef312..950bc0ffd840 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesUpdateTagsSamples.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/samples/java/com/azure/resourcemanager/quantum/generated/WorkspacesUpdateTagsSamples.java @@ -8,26 +8,26 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Workspaces UpdateTags. */ +/** + * Samples for Workspaces UpdateTags. + */ public final class WorkspacesUpdateTagsSamples { /* - * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesPatch.json + * x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/ + * quantumWorkspacesPatch.json */ /** * Sample code: QuantumWorkspacesPatchTags. - * + * * @param manager Entry point to AzureQuantumManager. */ public static void quantumWorkspacesPatchTags(com.azure.resourcemanager.quantum.AzureQuantumManager manager) { - QuantumWorkspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse( - "quantumResourcegroup", "quantumworkspace1", com.azure.core.util.Context.NONE) - .getValue(); + QuantumWorkspace resource = manager.workspaces().getByResourceGroupWithResponse("quantumResourcegroup", + "quantumworkspace1", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityParametersTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityParametersTests.java index eb7de5dbaa86..bc892bb03b5a 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityParametersTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityParametersTests.java @@ -11,20 +11,19 @@ public final class CheckNameAvailabilityParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckNameAvailabilityParameters model = - BinaryData - .fromString("{\"name\":\"vhelxprglyatdd\",\"type\":\"cbcuejrjxgciqi\"}") + CheckNameAvailabilityParameters model + = BinaryData.fromString("{\"name\":\"bttdumorppxe\",\"type\":\"nzbtbhj\"}") .toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("vhelxprglyatdd", model.name()); - Assertions.assertEquals("cbcuejrjxgciqi", model.type()); + Assertions.assertEquals("bttdumorppxe", model.name()); + Assertions.assertEquals("nzbtbhj", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CheckNameAvailabilityParameters model = - new CheckNameAvailabilityParameters().withName("vhelxprglyatdd").withType("cbcuejrjxgciqi"); + CheckNameAvailabilityParameters model + = new CheckNameAvailabilityParameters().withName("bttdumorppxe").withType("nzbtbhj"); model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("vhelxprglyatdd", model.name()); - Assertions.assertEquals("cbcuejrjxgciqi", model.type()); + Assertions.assertEquals("bttdumorppxe", model.name()); + Assertions.assertEquals("nzbtbhj", model.type()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityResultInnerTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityResultInnerTests.java index 09da4ffceebb..57978289100b 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityResultInnerTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/CheckNameAvailabilityResultInnerTests.java @@ -11,20 +11,19 @@ public final class CheckNameAvailabilityResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckNameAvailabilityResultInner model = - BinaryData - .fromString("{\"nameAvailable\":false,\"reason\":\"sxsdqrhzoymibm\",\"message\":\"yiba\"}") - .toObject(CheckNameAvailabilityResultInner.class); + CheckNameAvailabilityResultInner model = BinaryData + .fromString("{\"nameAvailable\":false,\"reason\":\"fgohdneuelfphs\",\"message\":\"htozfikdow\"}") + .toObject(CheckNameAvailabilityResultInner.class); Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("sxsdqrhzoymibm", model.reason()); + Assertions.assertEquals("fgohdneuelfphs", model.reason()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CheckNameAvailabilityResultInner model = - new CheckNameAvailabilityResultInner().withNameAvailable(false).withReason("sxsdqrhzoymibm"); + CheckNameAvailabilityResultInner model + = new CheckNameAvailabilityResultInner().withNameAvailable(false).withReason("fgohdneuelfphs"); model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResultInner.class); Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals("sxsdqrhzoymibm", model.reason()); + Assertions.assertEquals("fgohdneuelfphs", model.reason()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListMockTests.java index afeba7164dc0..ffe58f1226a7 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListMockTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListMockTests.java @@ -31,69 +31,53 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"id\":\"oegokdwbwh\",\"name\":\"z\",\"properties\":{\"description\":\"rvexztvb\",\"providerType\":\"gsfraoyzkoow\",\"company\":\"mnguxawqaldsyu\",\"defaultEndpoint\":\"imerqfobwyznk\",\"aad\":{\"applicationId\":\"utwpfhp\",\"tenantId\":\"m\"},\"managedApplication\":{\"publisherId\":\"kdsnfdsdoakgtdl\",\"offerId\":\"kzevdlhewpusds\"},\"targets\":[{\"id\":\"ogvbbejdcngq\",\"name\":\"oakufgm\",\"description\":\"rwr\",\"acceptedDataFormats\":[\"twaenuuzko\",\"bminrfdwoyuhhzi\",\"iefozbhdmsml\"],\"acceptedContentEncodings\":[\"hoftr\",\"ae\",\"u\",\"ah\"]},{\"id\":\"cslfaoqzpiyylha\",\"name\":\"swhccsphk\",\"description\":\"vwitqscyw\",\"acceptedDataFormats\":[\"woluhczbwemhair\"],\"acceptedContentEncodings\":[\"gzd\",\"msweypqwdxggicc\",\"n\"]},{\"id\":\"huexmk\",\"name\":\"lstvlzywe\",\"description\":\"zrncsdt\",\"acceptedDataFormats\":[\"siypbs\"],\"acceptedContentEncodings\":[\"tg\",\"sl\"]}],\"skus\":[{\"id\":\"cy\",\"name\":\"ukyhejhzis\",\"version\":\"fpel\",\"description\":\"p\",\"restrictedAccessUri\":\"ksrpqv\",\"autoAdd\":false,\"targets\":[\"ehtwdwrft\",\"wib\"],\"quotaDimensions\":[{}],\"pricingDetails\":[{}]}],\"quotaDimensions\":[{\"id\":\"hfwpracstwit\",\"scope\":\"hevxcced\",\"period\":\"nmdyodnwzxl\",\"quota\":58.360874,\"name\":\"nhltiugcxn\",\"description\":\"vwxqibyqunyo\",\"unit\":\"wlmdjrkv\",\"unitPlural\":\"bvfvpdbod\"}],\"pricingDimensions\":[{\"id\":\"sjq\",\"name\":\"krribdeibqi\"},{\"id\":\"kghv\",\"name\":\"dzwmkrefajpj\"},{\"id\":\"wkqnyhg\",\"name\":\"j\"}]}}]}"; + String responseStr + = "{\"value\":[{\"id\":\"bnnhadoocrkvcik\",\"name\":\"vpa\",\"properties\":{\"description\":\"x\",\"providerType\":\"u\",\"company\":\"ik\",\"defaultEndpoint\":\"ggxkallatmelwuip\",\"aad\":{\"applicationId\":\"jzkzi\",\"tenantId\":\"vvcnayr\"},\"managedApplication\":{\"publisherId\":\"nxxmueedndrdv\",\"offerId\":\"kwqqtchealmf\"},\"targets\":[{\"id\":\"aygdvwvgpioh\",\"name\":\"xrtfudxep\",\"description\":\"yqagvrvm\",\"acceptedDataFormats\":[\"ukghimdblxgw\"],\"acceptedContentEncodings\":[\"njhf\",\"xw\",\"szkkfoqre\",\"fkzikfj\"]}],\"skus\":[{\"id\":\"a\",\"name\":\"xwczelpcire\",\"version\":\"feaenwab\",\"description\":\"tkl\",\"restrictedAccessUri\":\"xbjhwuaanozjosph\",\"autoAdd\":false,\"targets\":[\"jrvxaglrv\",\"mjwosytx\"],\"quotaDimensions\":[{},{},{},{}],\"pricingDetails\":[{},{}]}],\"quotaDimensions\":[{\"id\":\"tq\",\"scope\":\"iekkezz\",\"period\":\"hlyfjhdgqgg\",\"quota\":29.760027,\"name\":\"nyga\",\"description\":\"idb\",\"unit\":\"atpxl\",\"unitPlural\":\"xcyjmoadsuvarmy\"},{\"id\":\"mjsjqb\",\"scope\":\"hyxxrwlycoduhpk\",\"period\":\"gymare\",\"quota\":23.266273,\"name\":\"xqugjhkycubedd\",\"description\":\"sofwqmzqalkrmnji\",\"unit\":\"xacqqudfnbyx\",\"unitPlural\":\"aabjyvayffimrz\"},{\"id\":\"uzqogsexnevf\",\"scope\":\"wnwmewzs\",\"period\":\"ceuzsoibjudpfr\",\"quota\":98.30812,\"name\":\"hzv\",\"description\":\"tdwkqbrq\",\"unit\":\"paxh\",\"unitPlural\":\"iilivpdtiirqtd\"},{\"id\":\"axoruzfgsquy\",\"scope\":\"rxxle\",\"period\":\"ramxjezwlwnw\",\"quota\":41.191147,\"name\":\"cvydypatdoo\",\"description\":\"jkniodko\",\"unit\":\"bw\",\"unitPlural\":\"jhemms\"}],\"pricingDimensions\":[{\"id\":\"c\",\"name\":\"dtjinfw\"},{\"id\":\"fltkacjv\",\"name\":\"kdlfoa\"}]}}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + AzureQuantumManager manager = AzureQuantumManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - PagedIterable response = - manager.offerings().list("khnzbonlw", com.azure.core.util.Context.NONE); + PagedIterable response = manager.offerings().list("jlt", com.azure.core.util.Context.NONE); - Assertions.assertEquals("oegokdwbwh", response.iterator().next().id()); - Assertions.assertEquals("ogvbbejdcngq", response.iterator().next().properties().targets().get(0).id()); - Assertions.assertEquals("oakufgm", response.iterator().next().properties().targets().get(0).name()); - Assertions.assertEquals("rwr", response.iterator().next().properties().targets().get(0).description()); - Assertions - .assertEquals( - "twaenuuzko", response.iterator().next().properties().targets().get(0).acceptedDataFormats().get(0)); - Assertions - .assertEquals( - "hoftr", response.iterator().next().properties().targets().get(0).acceptedContentEncodings().get(0)); - Assertions.assertEquals("cy", response.iterator().next().properties().skus().get(0).id()); - Assertions.assertEquals("ukyhejhzis", response.iterator().next().properties().skus().get(0).name()); - Assertions.assertEquals("fpel", response.iterator().next().properties().skus().get(0).version()); - Assertions.assertEquals("p", response.iterator().next().properties().skus().get(0).description()); - Assertions.assertEquals("ksrpqv", response.iterator().next().properties().skus().get(0).restrictedAccessUri()); + Assertions.assertEquals("bnnhadoocrkvcik", response.iterator().next().id()); + Assertions.assertEquals("aygdvwvgpioh", response.iterator().next().properties().targets().get(0).id()); + Assertions.assertEquals("xrtfudxep", response.iterator().next().properties().targets().get(0).name()); + Assertions.assertEquals("yqagvrvm", response.iterator().next().properties().targets().get(0).description()); + Assertions.assertEquals("ukghimdblxgw", + response.iterator().next().properties().targets().get(0).acceptedDataFormats().get(0)); + Assertions.assertEquals("njhf", + response.iterator().next().properties().targets().get(0).acceptedContentEncodings().get(0)); + Assertions.assertEquals("a", response.iterator().next().properties().skus().get(0).id()); + Assertions.assertEquals("xwczelpcire", response.iterator().next().properties().skus().get(0).name()); + Assertions.assertEquals("feaenwab", response.iterator().next().properties().skus().get(0).version()); + Assertions.assertEquals("tkl", response.iterator().next().properties().skus().get(0).description()); + Assertions.assertEquals("xbjhwuaanozjosph", + response.iterator().next().properties().skus().get(0).restrictedAccessUri()); Assertions.assertEquals(false, response.iterator().next().properties().skus().get(0).autoAdd()); - Assertions.assertEquals("ehtwdwrft", response.iterator().next().properties().skus().get(0).targets().get(0)); - Assertions.assertEquals("hfwpracstwit", response.iterator().next().properties().quotaDimensions().get(0).id()); - Assertions.assertEquals("hevxcced", response.iterator().next().properties().quotaDimensions().get(0).scope()); - Assertions - .assertEquals("nmdyodnwzxl", response.iterator().next().properties().quotaDimensions().get(0).period()); - Assertions.assertEquals(58.360874F, response.iterator().next().properties().quotaDimensions().get(0).quota()); - Assertions.assertEquals("nhltiugcxn", response.iterator().next().properties().quotaDimensions().get(0).name()); - Assertions - .assertEquals( - "vwxqibyqunyo", response.iterator().next().properties().quotaDimensions().get(0).description()); - Assertions.assertEquals("wlmdjrkv", response.iterator().next().properties().quotaDimensions().get(0).unit()); - Assertions - .assertEquals("bvfvpdbod", response.iterator().next().properties().quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("sjq", response.iterator().next().properties().pricingDimensions().get(0).id()); - Assertions - .assertEquals("krribdeibqi", response.iterator().next().properties().pricingDimensions().get(0).name()); + Assertions.assertEquals("jrvxaglrv", response.iterator().next().properties().skus().get(0).targets().get(0)); + Assertions.assertEquals("tq", response.iterator().next().properties().quotaDimensions().get(0).id()); + Assertions.assertEquals("iekkezz", response.iterator().next().properties().quotaDimensions().get(0).scope()); + Assertions.assertEquals("hlyfjhdgqgg", + response.iterator().next().properties().quotaDimensions().get(0).period()); + Assertions.assertEquals(29.760027F, response.iterator().next().properties().quotaDimensions().get(0).quota()); + Assertions.assertEquals("nyga", response.iterator().next().properties().quotaDimensions().get(0).name()); + Assertions.assertEquals("idb", response.iterator().next().properties().quotaDimensions().get(0).description()); + Assertions.assertEquals("atpxl", response.iterator().next().properties().quotaDimensions().get(0).unit()); + Assertions.assertEquals("xcyjmoadsuvarmy", + response.iterator().next().properties().quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("c", response.iterator().next().properties().pricingDimensions().get(0).id()); + Assertions.assertEquals("dtjinfw", response.iterator().next().properties().pricingDimensions().get(0).name()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListResultTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListResultTests.java index 264dbedc1a96..061c05fe5d9e 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListResultTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OfferingsListResultTests.java @@ -21,256 +21,162 @@ public final class OfferingsListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OfferingsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"zdn\",\"name\":\"jq\",\"properties\":{\"description\":\"muouqfp\",\"providerType\":\"zw\",\"company\":\"g\",\"defaultEndpoint\":\"tnwu\",\"aad\":{\"applicationId\":\"a\",\"tenantId\":\"ufizuckyf\"},\"managedApplication\":{\"publisherId\":\"fidfvzw\",\"offerId\":\"uht\"},\"targets\":[{\"id\":\"sdkf\",\"name\":\"wxmnteiwao\",\"description\":\"km\",\"acceptedDataFormats\":[\"mmxdcu\"],\"acceptedContentEncodings\":[\"srp\",\"mzidnsezcxtb\",\"sgfyccsnew\"]},{\"id\":\"wzjeiach\",\"name\":\"osfln\",\"description\":\"sfqpteehz\",\"acceptedDataFormats\":[\"pyqr\",\"mzinpvswjdk\",\"rsoodqxhcrmnoh\"],\"acceptedContentEncodings\":[\"kwh\",\"soifiyipjxsqw\"]}],\"skus\":[{\"id\":\"bznorcjxvsnby\",\"name\":\"abnmocpcyshu\",\"version\":\"afbljjgpbtoqcjmk\",\"description\":\"a\",\"restrictedAccessUri\":\"qidtqajzyu\",\"autoAdd\":true,\"targets\":[\"jkrlkhbzhfepg\"],\"quotaDimensions\":[{}],\"pricingDetails\":[{},{},{}]}],\"quotaDimensions\":[{\"id\":\"c\",\"scope\":\"c\",\"period\":\"ierhhbcsglummaj\",\"quota\":29.64415,\"name\":\"dxob\",\"description\":\"dxkqpx\",\"unit\":\"ajionpimexgstxg\",\"unitPlural\":\"odgmaajrmvdjwz\"}],\"pricingDimensions\":[{\"id\":\"mcl\",\"name\":\"ijcoejctb\"},{\"id\":\"qsqsy\",\"name\":\"kbfkg\"},{\"id\":\"dkexxppofm\",\"name\":\"x\"},{\"id\":\"jpgd\",\"name\":\"ocjjxhvpmouexh\"}]}},{\"id\":\"xibqeojnx\",\"name\":\"zvddntwndeicbtwn\",\"properties\":{\"description\":\"oqvuhr\",\"providerType\":\"f\",\"company\":\"yd\",\"defaultEndpoint\":\"lmjthjq\",\"aad\":{\"applicationId\":\"yeicxmqciwqvhk\",\"tenantId\":\"xuigdtopbobj\"},\"managedApplication\":{\"publisherId\":\"m\",\"offerId\":\"u\"},\"targets\":[{\"id\":\"hrzayvvtpgvdf\",\"name\":\"otkftutqxlngx\",\"description\":\"fgugnxkrxdqmid\",\"acceptedDataFormats\":[\"zrvqdr\",\"bhj\"],\"acceptedContentEncodings\":[\"gehoqfbowskany\",\"tzlcuiywgqywgn\"]}],\"skus\":[{\"id\":\"nhzgpphrcgyn\",\"name\":\"cpecfvmmcoofs\",\"version\":\"zevgb\",\"description\":\"jqabcypmivkwlzuv\",\"restrictedAccessUri\":\"fwnfnb\",\"autoAdd\":false,\"targets\":[\"nlebxetqgtzxd\",\"nqbqqwxr\",\"feallnwsu\",\"isnjampmngnz\"],\"quotaDimensions\":[{},{},{},{}],\"pricingDetails\":[{},{},{}]},{\"id\":\"ooch\",\"name\":\"onq\",\"version\":\"kvlrxnj\",\"description\":\"seiphe\",\"restrictedAccessUri\":\"lokeyy\",\"autoAdd\":false,\"targets\":[\"dlwtgrhpdj\",\"jumasx\",\"zj\",\"qyeg\"],\"quotaDimensions\":[{},{},{},{}],\"pricingDetails\":[{}]},{\"id\":\"xhejjzzvdud\",\"name\":\"dslfhotwmcy\",\"version\":\"wlbjnpgacftade\",\"description\":\"nltyfsoppusuesnz\",\"restrictedAccessUri\":\"ej\",\"autoAdd\":true,\"targets\":[\"xzdmohctb\",\"vudwx\",\"ndnvo\",\"gujjugwdkcglh\"],\"quotaDimensions\":[{},{}],\"pricingDetails\":[{},{},{}]}],\"quotaDimensions\":[{\"id\":\"gdtjixhbkuofqwey\",\"scope\":\"menevfyexfwh\",\"period\":\"cibvyvdcsitynn\",\"quota\":87.51548,\"name\":\"ectehf\",\"description\":\"scjeypv\",\"unit\":\"zrkgqhcjrefovg\",\"unitPlural\":\"qsl\"},{\"id\":\"yvxyqjp\",\"scope\":\"attpngjcrcczsq\",\"period\":\"hvmdajvnysounq\",\"quota\":2.2711873,\"name\":\"oaeupfhyhltrpmo\",\"description\":\"mcmatuokthfuiu\",\"unit\":\"dsfcpkvxodpuoz\",\"unitPlural\":\"zydagfuaxbezyiuo\"},{\"id\":\"twhrdxwzywqsm\",\"scope\":\"ureximoryocfs\",\"period\":\"s\",\"quota\":76.61667,\"name\":\"ys\",\"description\":\"i\",\"unit\":\"xhqyudxorrqnb\",\"unitPlural\":\"czvyifq\"}],\"pricingDimensions\":[{\"id\":\"vjsllrmvvdfw\",\"name\":\"kpnpulexxbczwtr\"},{\"id\":\"iqzbq\",\"name\":\"sovmyokacspkwl\"}]}}],\"nextLink\":\"dobpxjmflbvvn\"}") - .toObject(OfferingsListResult.class); - Assertions.assertEquals("zdn", model.value().get(0).id()); - Assertions.assertEquals("sdkf", model.value().get(0).properties().targets().get(0).id()); - Assertions.assertEquals("wxmnteiwao", model.value().get(0).properties().targets().get(0).name()); - Assertions.assertEquals("km", model.value().get(0).properties().targets().get(0).description()); - Assertions - .assertEquals("mmxdcu", model.value().get(0).properties().targets().get(0).acceptedDataFormats().get(0)); - Assertions - .assertEquals("srp", model.value().get(0).properties().targets().get(0).acceptedContentEncodings().get(0)); - Assertions.assertEquals("bznorcjxvsnby", model.value().get(0).properties().skus().get(0).id()); - Assertions.assertEquals("abnmocpcyshu", model.value().get(0).properties().skus().get(0).name()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.value().get(0).properties().skus().get(0).version()); - Assertions.assertEquals("a", model.value().get(0).properties().skus().get(0).description()); - Assertions.assertEquals("qidtqajzyu", model.value().get(0).properties().skus().get(0).restrictedAccessUri()); - Assertions.assertEquals(true, model.value().get(0).properties().skus().get(0).autoAdd()); - Assertions.assertEquals("jkrlkhbzhfepg", model.value().get(0).properties().skus().get(0).targets().get(0)); - Assertions.assertEquals("c", model.value().get(0).properties().quotaDimensions().get(0).id()); - Assertions.assertEquals("c", model.value().get(0).properties().quotaDimensions().get(0).scope()); - Assertions.assertEquals("ierhhbcsglummaj", model.value().get(0).properties().quotaDimensions().get(0).period()); - Assertions.assertEquals(29.64415F, model.value().get(0).properties().quotaDimensions().get(0).quota()); - Assertions.assertEquals("dxob", model.value().get(0).properties().quotaDimensions().get(0).name()); - Assertions.assertEquals("dxkqpx", model.value().get(0).properties().quotaDimensions().get(0).description()); - Assertions.assertEquals("ajionpimexgstxg", model.value().get(0).properties().quotaDimensions().get(0).unit()); - Assertions - .assertEquals("odgmaajrmvdjwz", model.value().get(0).properties().quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("mcl", model.value().get(0).properties().pricingDimensions().get(0).id()); - Assertions.assertEquals("ijcoejctb", model.value().get(0).properties().pricingDimensions().get(0).name()); - Assertions.assertEquals("dobpxjmflbvvn", model.nextLink()); + OfferingsListResult model = BinaryData.fromString( + "{\"value\":[{\"id\":\"huxinpmqnj\",\"name\":\"wixjsprozvcp\",\"properties\":{\"description\":\"gjvw\",\"providerType\":\"datscmd\",\"company\":\"jhulsuuvmkjo\",\"defaultEndpoint\":\"rwfndiod\",\"aad\":{\"applicationId\":\"lwejdpv\",\"tenantId\":\"yoqpsoaccta\"},\"managedApplication\":{\"publisherId\":\"ljlahbcryf\",\"offerId\":\"fdosyg\"},\"targets\":[{\"id\":\"ojakhmsbzjhcrze\",\"name\":\"phlxa\",\"description\":\"thqt\",\"acceptedDataFormats\":[\"jbp\",\"zfsinzgvf\",\"jrwzox\"],\"acceptedContentEncodings\":[\"felluwfzitonpe\",\"fpjkjlxofp\"]},{\"id\":\"hpf\",\"name\":\"ypininm\",\"description\":\"huyb\",\"acceptedDataFormats\":[\"odepoogin\",\"vamih\"],\"acceptedContentEncodings\":[\"narxzxtheotus\",\"vyevcciqi\",\"nhungbw\"]},{\"id\":\"rnfygxgispem\",\"name\":\"zfkufubljofx\",\"description\":\"ofjaeqjhqjb\",\"acceptedDataFormats\":[\"msmjqulngsntn\"],\"acceptedContentEncodings\":[\"kzgcwrwcl\",\"xwrljdouskcqvkoc\",\"cjdkwtnhxbnjbi\"]},{\"id\":\"qrglssainqpjwn\",\"name\":\"ljfmppee\",\"description\":\"mgxsab\",\"acceptedDataFormats\":[\"duuji\",\"c\",\"czdzev\",\"dhkrwpdappdsbdk\"],\"acceptedContentEncodings\":[\"wjfeusnhutjel\",\"mrldhu\"]}],\"skus\":[{\"id\":\"datqxhocdgeabl\",\"name\":\"huticndvkao\",\"version\":\"yiftyhxhuro\",\"description\":\"tyxolniwpwc\",\"restrictedAccessUri\":\"jfkgiawxk\",\"autoAdd\":false,\"targets\":[\"wckbasyypnd\",\"hsgcbacphejkot\",\"nqgoulzndli\",\"wyqkgfgibm\"],\"quotaDimensions\":[{},{}],\"pricingDetails\":[{},{},{},{}]}],\"quotaDimensions\":[{\"id\":\"rxybz\",\"scope\":\"e\",\"period\":\"ytb\",\"quota\":19.418764,\"name\":\"ouf\",\"description\":\"mnkzsmod\",\"unit\":\"lougpbkw\",\"unitPlural\":\"utduqktapspwgcu\"},{\"id\":\"tumkdosvqwhbm\",\"scope\":\"bbjfddgmbmbexp\",\"period\":\"htqqrolfp\",\"quota\":1.6021609,\"name\":\"lgbquxig\",\"description\":\"jgzjaoyfhrtx\",\"unit\":\"n\",\"unitPlural\":\"kujysvlejuvfq\"},{\"id\":\"rlyxwjkcprbnw\",\"scope\":\"gjvtbv\",\"period\":\"sszdnru\",\"quota\":66.73355,\"name\":\"hmuouqfprwzwbn\",\"description\":\"itnwuizgazxufi\",\"unit\":\"ckyfih\",\"unitPlural\":\"idf\"}],\"pricingDimensions\":[{\"id\":\"zuhtymwisdkfthwx\",\"name\":\"t\"},{\"id\":\"waopvkmijcmmxd\",\"name\":\"fufsrpymzi\"},{\"id\":\"sezcxtb\",\"name\":\"gfycc\"}]}},{\"id\":\"ewmdw\",\"name\":\"eiachboosflnr\",\"properties\":{\"description\":\"qpteeh\",\"providerType\":\"vypyqrimzinpv\",\"company\":\"jdkirsoodqx\",\"defaultEndpoint\":\"rmnohj\",\"aad\":{\"applicationId\":\"whdsoifiyip\",\"tenantId\":\"sqwpgrjb\"},\"managedApplication\":{\"publisherId\":\"rcjxvsnbyxqabn\",\"offerId\":\"cpc\"},\"targets\":[{\"id\":\"rzafbljjgpbtoqcj\",\"name\":\"ljavbqid\",\"description\":\"ajzyul\",\"acceptedDataFormats\":[\"dj\"],\"acceptedContentEncodings\":[\"khbzhfepgzg\",\"e\"]},{\"id\":\"locx\",\"name\":\"paierh\",\"description\":\"csglum\",\"acceptedDataFormats\":[\"tjaodxobnb\",\"xkqpxo\",\"ajionpimexgstxg\",\"po\"],\"acceptedContentEncodings\":[\"aajrm\",\"djwzrlov\",\"clwhijcoejctbz\",\"qsqsy\"]},{\"id\":\"kbfkg\",\"name\":\"dkexxppofm\",\"description\":\"x\",\"acceptedDataFormats\":[\"pg\"],\"acceptedContentEncodings\":[\"ocjjxhvpmouexh\"]}],\"skus\":[{\"id\":\"bqe\",\"name\":\"nxqbzvddn\",\"version\":\"ndei\",\"description\":\"twnpzaoqvuhrhcf\",\"restrictedAccessUri\":\"yd\",\"autoAdd\":false,\"targets\":[\"t\",\"jqkwpyeicx\",\"qciwqvhkhixuigdt\"],\"quotaDimensions\":[{}],\"pricingDetails\":[{},{},{},{}]},{\"id\":\"og\",\"name\":\"e\",\"version\":\"a\",\"description\":\"uhrzayvvt\",\"restrictedAccessUri\":\"vdfgiotk\",\"autoAdd\":false,\"targets\":[\"xlngx\",\"efgugnxk\"],\"quotaDimensions\":[{},{}],\"pricingDetails\":[{}]},{\"id\":\"dt\",\"name\":\"zrvqdr\",\"version\":\"hjybigehoqfbo\",\"description\":\"kanyktzlcuiywg\",\"restrictedAccessUri\":\"wgndrvynhzgpp\",\"autoAdd\":true,\"targets\":[\"nc\",\"cpecfvmmcoofs\",\"lzevgbmqjqab\",\"y\"],\"quotaDimensions\":[{},{},{},{}],\"pricingDetails\":[{},{},{},{}]}],\"quotaDimensions\":[{\"id\":\"uvcc\",\"scope\":\"nfnbacfionlebxe\",\"period\":\"gtzxdpn\",\"quota\":19.734276,\"name\":\"wxrjfeallnwsub\",\"description\":\"njampm\",\"unit\":\"nzscxa\",\"unitPlural\":\"ooch\"}],\"pricingDimensions\":[{\"id\":\"qvpkvlrxnjeaseip\",\"name\":\"oflokey\"}]}}],\"nextLink\":\"enjbdlwtgrhp\"}") + .toObject(OfferingsListResult.class); + Assertions.assertEquals("huxinpmqnj", model.value().get(0).id()); + Assertions.assertEquals("ojakhmsbzjhcrze", model.value().get(0).properties().targets().get(0).id()); + Assertions.assertEquals("phlxa", model.value().get(0).properties().targets().get(0).name()); + Assertions.assertEquals("thqt", model.value().get(0).properties().targets().get(0).description()); + Assertions.assertEquals("jbp", model.value().get(0).properties().targets().get(0).acceptedDataFormats().get(0)); + Assertions.assertEquals("felluwfzitonpe", + model.value().get(0).properties().targets().get(0).acceptedContentEncodings().get(0)); + Assertions.assertEquals("datqxhocdgeabl", model.value().get(0).properties().skus().get(0).id()); + Assertions.assertEquals("huticndvkao", model.value().get(0).properties().skus().get(0).name()); + Assertions.assertEquals("yiftyhxhuro", model.value().get(0).properties().skus().get(0).version()); + Assertions.assertEquals("tyxolniwpwc", model.value().get(0).properties().skus().get(0).description()); + Assertions.assertEquals("jfkgiawxk", model.value().get(0).properties().skus().get(0).restrictedAccessUri()); + Assertions.assertEquals(false, model.value().get(0).properties().skus().get(0).autoAdd()); + Assertions.assertEquals("wckbasyypnd", model.value().get(0).properties().skus().get(0).targets().get(0)); + Assertions.assertEquals("rxybz", model.value().get(0).properties().quotaDimensions().get(0).id()); + Assertions.assertEquals("e", model.value().get(0).properties().quotaDimensions().get(0).scope()); + Assertions.assertEquals("ytb", model.value().get(0).properties().quotaDimensions().get(0).period()); + Assertions.assertEquals(19.418764F, model.value().get(0).properties().quotaDimensions().get(0).quota()); + Assertions.assertEquals("ouf", model.value().get(0).properties().quotaDimensions().get(0).name()); + Assertions.assertEquals("mnkzsmod", model.value().get(0).properties().quotaDimensions().get(0).description()); + Assertions.assertEquals("lougpbkw", model.value().get(0).properties().quotaDimensions().get(0).unit()); + Assertions.assertEquals("utduqktapspwgcu", + model.value().get(0).properties().quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("zuhtymwisdkfthwx", model.value().get(0).properties().pricingDimensions().get(0).id()); + Assertions.assertEquals("t", model.value().get(0).properties().pricingDimensions().get(0).name()); + Assertions.assertEquals("enjbdlwtgrhp", model.nextLink()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OfferingsListResult model = - new OfferingsListResult() + OfferingsListResult model + = new OfferingsListResult() .withValue( Arrays .asList( - new ProviderDescriptionInner() - .withId("zdn") - .withProperties( - new ProviderProperties() - .withAad(new ProviderPropertiesAad()) - .withManagedApplication(new ProviderPropertiesManagedApplication()) + new ProviderDescriptionInner().withId("huxinpmqnj") + .withProperties(new ProviderProperties().withAad(new ProviderPropertiesAad()) + .withManagedApplication(new ProviderPropertiesManagedApplication()) + .withTargets(Arrays.asList(new TargetDescription().withId("ojakhmsbzjhcrze") + .withName("phlxa").withDescription("thqt") + .withAcceptedDataFormats(Arrays.asList("jbp", "zfsinzgvf", "jrwzox")) + .withAcceptedContentEncodings(Arrays.asList("felluwfzitonpe", "fpjkjlxofp")), + new TargetDescription().withId("hpf").withName("ypininm") + .withDescription("huyb") + .withAcceptedDataFormats(Arrays.asList("odepoogin", "vamih")) + .withAcceptedContentEncodings( + Arrays.asList("narxzxtheotus", "vyevcciqi", "nhungbw")), + new TargetDescription().withId("rnfygxgispem").withName("zfkufubljofx") + .withDescription("ofjaeqjhqjb") + .withAcceptedDataFormats(Arrays.asList("msmjqulngsntn")) + .withAcceptedContentEncodings( + Arrays.asList("kzgcwrwcl", "xwrljdouskcqvkoc", "cjdkwtnhxbnjbi")), + new TargetDescription().withId("qrglssainqpjwn").withName("ljfmppee") + .withDescription("mgxsab") + .withAcceptedDataFormats( + Arrays.asList("duuji", "c", "czdzev", "dhkrwpdappdsbdk")) + .withAcceptedContentEncodings(Arrays.asList("wjfeusnhutjel", "mrldhu")))) + .withSkus(Arrays.asList(new SkuDescription().withId("datqxhocdgeabl") + .withName("huticndvkao").withVersion("yiftyhxhuro") + .withDescription("tyxolniwpwc").withRestrictedAccessUri("jfkgiawxk") + .withAutoAdd(false) .withTargets( - Arrays - .asList( - new TargetDescription() - .withId("sdkf") - .withName("wxmnteiwao") - .withDescription("km") - .withAcceptedDataFormats(Arrays.asList("mmxdcu")) - .withAcceptedContentEncodings( - Arrays.asList("srp", "mzidnsezcxtb", "sgfyccsnew")), - new TargetDescription() - .withId("wzjeiach") - .withName("osfln") - .withDescription("sfqpteehz") - .withAcceptedDataFormats( - Arrays.asList("pyqr", "mzinpvswjdk", "rsoodqxhcrmnoh")) - .withAcceptedContentEncodings( - Arrays.asList("kwh", "soifiyipjxsqw")))) - .withSkus( - Arrays - .asList( - new SkuDescription() - .withId("bznorcjxvsnby") - .withName("abnmocpcyshu") - .withVersion("afbljjgpbtoqcjmk") - .withDescription("a") - .withRestrictedAccessUri("qidtqajzyu") - .withAutoAdd(true) - .withTargets(Arrays.asList("jkrlkhbzhfepg")) - .withQuotaDimensions(Arrays.asList(new QuotaDimension())) - .withPricingDetails( - Arrays - .asList( - new PricingDetail(), - new PricingDetail(), - new PricingDetail())))) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("c") - .withScope("c") - .withPeriod("ierhhbcsglummaj") - .withQuota(29.64415F) - .withName("dxob") - .withDescription("dxkqpx") - .withUnit("ajionpimexgstxg") - .withUnitPlural("odgmaajrmvdjwz"))) - .withPricingDimensions( - Arrays - .asList( - new PricingDimension().withId("mcl").withName("ijcoejctb"), - new PricingDimension().withId("qsqsy").withName("kbfkg"), - new PricingDimension().withId("dkexxppofm").withName("x"), - new PricingDimension().withId("jpgd").withName("ocjjxhvpmouexh")))), - new ProviderDescriptionInner() - .withId("xibqeojnx") - .withProperties( - new ProviderProperties() - .withAad(new ProviderPropertiesAad()) - .withManagedApplication(new ProviderPropertiesManagedApplication()) - .withTargets( - Arrays - .asList( - new TargetDescription() - .withId("hrzayvvtpgvdf") - .withName("otkftutqxlngx") - .withDescription("fgugnxkrxdqmid") - .withAcceptedDataFormats(Arrays.asList("zrvqdr", "bhj")) - .withAcceptedContentEncodings( - Arrays.asList("gehoqfbowskany", "tzlcuiywgqywgn")))) - .withSkus( - Arrays - .asList( - new SkuDescription() - .withId("nhzgpphrcgyn") - .withName("cpecfvmmcoofs") - .withVersion("zevgb") - .withDescription("jqabcypmivkwlzuv") - .withRestrictedAccessUri("fwnfnb") - .withAutoAdd(false) - .withTargets( - Arrays - .asList( - "nlebxetqgtzxd", - "nqbqqwxr", - "feallnwsu", - "isnjampmngnz")) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension(), - new QuotaDimension(), - new QuotaDimension(), - new QuotaDimension())) - .withPricingDetails( - Arrays - .asList( - new PricingDetail(), - new PricingDetail(), - new PricingDetail())), - new SkuDescription() - .withId("ooch") - .withName("onq") - .withVersion("kvlrxnj") - .withDescription("seiphe") - .withRestrictedAccessUri("lokeyy") - .withAutoAdd(false) - .withTargets( - Arrays.asList("dlwtgrhpdj", "jumasx", "zj", "qyeg")) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension(), - new QuotaDimension(), - new QuotaDimension(), - new QuotaDimension())) - .withPricingDetails(Arrays.asList(new PricingDetail())), - new SkuDescription() - .withId("xhejjzzvdud") - .withName("dslfhotwmcy") - .withVersion("wlbjnpgacftade") - .withDescription("nltyfsoppusuesnz") - .withRestrictedAccessUri("ej") - .withAutoAdd(true) - .withTargets( - Arrays - .asList("xzdmohctb", "vudwx", "ndnvo", "gujjugwdkcglh")) - .withQuotaDimensions( - Arrays.asList(new QuotaDimension(), new QuotaDimension())) - .withPricingDetails( - Arrays - .asList( - new PricingDetail(), - new PricingDetail(), - new PricingDetail())))) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("gdtjixhbkuofqwey") - .withScope("menevfyexfwh") - .withPeriod("cibvyvdcsitynn") - .withQuota(87.51548F) - .withName("ectehf") - .withDescription("scjeypv") - .withUnit("zrkgqhcjrefovg") - .withUnitPlural("qsl"), - new QuotaDimension() - .withId("yvxyqjp") - .withScope("attpngjcrcczsq") - .withPeriod("hvmdajvnysounq") - .withQuota(2.2711873F) - .withName("oaeupfhyhltrpmo") - .withDescription("mcmatuokthfuiu") - .withUnit("dsfcpkvxodpuoz") - .withUnitPlural("zydagfuaxbezyiuo"), - new QuotaDimension() - .withId("twhrdxwzywqsm") - .withScope("ureximoryocfs") - .withPeriod("s") - .withQuota(76.61667F) - .withName("ys") - .withDescription("i") - .withUnit("xhqyudxorrqnb") - .withUnitPlural("czvyifq"))) - .withPricingDimensions( - Arrays - .asList( - new PricingDimension() - .withId("vjsllrmvvdfw") - .withName("kpnpulexxbczwtr"), - new PricingDimension() - .withId("iqzbq") - .withName("sovmyokacspkwl")))))) - .withNextLink("dobpxjmflbvvn"); + Arrays.asList("wckbasyypnd", "hsgcbacphejkot", "nqgoulzndli", "wyqkgfgibm")) + .withQuotaDimensions(Arrays.asList(new QuotaDimension(), new QuotaDimension())) + .withPricingDetails(Arrays.asList(new PricingDetail(), new PricingDetail(), + new PricingDetail(), new PricingDetail())))) + .withQuotaDimensions(Arrays.asList( + new QuotaDimension().withId("rxybz").withScope("e").withPeriod("ytb") + .withQuota(19.418764F).withName("ouf").withDescription("mnkzsmod") + .withUnit("lougpbkw").withUnitPlural("utduqktapspwgcu"), + new QuotaDimension() + .withId("tumkdosvqwhbm").withScope("bbjfddgmbmbexp").withPeriod("htqqrolfp") + .withQuota(1.6021609F).withName("lgbquxig").withDescription("jgzjaoyfhrtx") + .withUnit("n").withUnitPlural("kujysvlejuvfq"), + new QuotaDimension().withId("rlyxwjkcprbnw").withScope("gjvtbv") + .withPeriod("sszdnru").withQuota(66.73355F).withName("hmuouqfprwzwbn") + .withDescription("itnwuizgazxufi").withUnit("ckyfih") + .withUnitPlural("idf"))) + .withPricingDimensions( + Arrays.asList(new PricingDimension().withId("zuhtymwisdkfthwx").withName("t"), + new PricingDimension().withId("waopvkmijcmmxd") + .withName("fufsrpymzi"), + new PricingDimension().withId("sezcxtb").withName("gfycc")))), + new ProviderDescriptionInner().withId("ewmdw").withProperties(new ProviderProperties() + .withAad(new ProviderPropertiesAad()) + .withManagedApplication(new ProviderPropertiesManagedApplication()) + .withTargets(Arrays.asList( + new TargetDescription().withId("rzafbljjgpbtoqcj").withName("ljavbqid") + .withDescription("ajzyul").withAcceptedDataFormats(Arrays.asList("dj")) + .withAcceptedContentEncodings(Arrays.asList("khbzhfepgzg", "e")), + new TargetDescription().withId("locx").withName("paierh").withDescription("csglum") + .withAcceptedDataFormats( + Arrays.asList("tjaodxobnb", "xkqpxo", "ajionpimexgstxg", "po")) + .withAcceptedContentEncodings( + Arrays.asList("aajrm", "djwzrlov", "clwhijcoejctbz", "qsqsy")), + new TargetDescription().withId("kbfkg").withName("dkexxppofm").withDescription("x") + .withAcceptedDataFormats(Arrays.asList("pg")) + .withAcceptedContentEncodings(Arrays.asList("ocjjxhvpmouexh")))) + .withSkus(Arrays.asList( + new SkuDescription().withId("bqe").withName("nxqbzvddn").withVersion("ndei") + .withDescription("twnpzaoqvuhrhcf").withRestrictedAccessUri("yd") + .withAutoAdd(false) + .withTargets(Arrays.asList("t", "jqkwpyeicx", "qciwqvhkhixuigdt")) + .withQuotaDimensions(Arrays.asList(new QuotaDimension())) + .withPricingDetails( + Arrays.asList(new PricingDetail(), new PricingDetail(), new PricingDetail(), + new PricingDetail())), + new SkuDescription().withId("og").withName("e").withVersion("a") + .withDescription("uhrzayvvt").withRestrictedAccessUri("vdfgiotk") + .withAutoAdd(false).withTargets(Arrays.asList("xlngx", "efgugnxk")) + .withQuotaDimensions(Arrays.asList(new QuotaDimension(), new QuotaDimension())) + .withPricingDetails(Arrays.asList(new PricingDetail())), + new SkuDescription().withId("dt").withName("zrvqdr").withVersion("hjybigehoqfbo") + .withDescription("kanyktzlcuiywg").withRestrictedAccessUri("wgndrvynhzgpp") + .withAutoAdd(true) + .withTargets(Arrays.asList("nc", "cpecfvmmcoofs", "lzevgbmqjqab", "y")) + .withQuotaDimensions(Arrays.asList(new QuotaDimension(), new QuotaDimension(), + new QuotaDimension(), new QuotaDimension())) + .withPricingDetails(Arrays.asList(new PricingDetail(), new PricingDetail(), + new PricingDetail(), new PricingDetail())))) + .withQuotaDimensions( + Arrays.asList(new QuotaDimension().withId("uvcc").withScope("nfnbacfionlebxe") + .withPeriod("gtzxdpn").withQuota(19.734276F).withName("wxrjfeallnwsub") + .withDescription("njampm").withUnit("nzscxa").withUnitPlural("ooch"))) + .withPricingDimensions(Arrays + .asList(new PricingDimension().withId("qvpkvlrxnjeaseip").withName("oflokey")))))) + .withNextLink("enjbdlwtgrhp"); model = BinaryData.fromObject(model).toObject(OfferingsListResult.class); - Assertions.assertEquals("zdn", model.value().get(0).id()); - Assertions.assertEquals("sdkf", model.value().get(0).properties().targets().get(0).id()); - Assertions.assertEquals("wxmnteiwao", model.value().get(0).properties().targets().get(0).name()); - Assertions.assertEquals("km", model.value().get(0).properties().targets().get(0).description()); - Assertions - .assertEquals("mmxdcu", model.value().get(0).properties().targets().get(0).acceptedDataFormats().get(0)); - Assertions - .assertEquals("srp", model.value().get(0).properties().targets().get(0).acceptedContentEncodings().get(0)); - Assertions.assertEquals("bznorcjxvsnby", model.value().get(0).properties().skus().get(0).id()); - Assertions.assertEquals("abnmocpcyshu", model.value().get(0).properties().skus().get(0).name()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.value().get(0).properties().skus().get(0).version()); - Assertions.assertEquals("a", model.value().get(0).properties().skus().get(0).description()); - Assertions.assertEquals("qidtqajzyu", model.value().get(0).properties().skus().get(0).restrictedAccessUri()); - Assertions.assertEquals(true, model.value().get(0).properties().skus().get(0).autoAdd()); - Assertions.assertEquals("jkrlkhbzhfepg", model.value().get(0).properties().skus().get(0).targets().get(0)); - Assertions.assertEquals("c", model.value().get(0).properties().quotaDimensions().get(0).id()); - Assertions.assertEquals("c", model.value().get(0).properties().quotaDimensions().get(0).scope()); - Assertions.assertEquals("ierhhbcsglummaj", model.value().get(0).properties().quotaDimensions().get(0).period()); - Assertions.assertEquals(29.64415F, model.value().get(0).properties().quotaDimensions().get(0).quota()); - Assertions.assertEquals("dxob", model.value().get(0).properties().quotaDimensions().get(0).name()); - Assertions.assertEquals("dxkqpx", model.value().get(0).properties().quotaDimensions().get(0).description()); - Assertions.assertEquals("ajionpimexgstxg", model.value().get(0).properties().quotaDimensions().get(0).unit()); - Assertions - .assertEquals("odgmaajrmvdjwz", model.value().get(0).properties().quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("mcl", model.value().get(0).properties().pricingDimensions().get(0).id()); - Assertions.assertEquals("ijcoejctb", model.value().get(0).properties().pricingDimensions().get(0).name()); - Assertions.assertEquals("dobpxjmflbvvn", model.nextLink()); + Assertions.assertEquals("huxinpmqnj", model.value().get(0).id()); + Assertions.assertEquals("ojakhmsbzjhcrze", model.value().get(0).properties().targets().get(0).id()); + Assertions.assertEquals("phlxa", model.value().get(0).properties().targets().get(0).name()); + Assertions.assertEquals("thqt", model.value().get(0).properties().targets().get(0).description()); + Assertions.assertEquals("jbp", model.value().get(0).properties().targets().get(0).acceptedDataFormats().get(0)); + Assertions.assertEquals("felluwfzitonpe", + model.value().get(0).properties().targets().get(0).acceptedContentEncodings().get(0)); + Assertions.assertEquals("datqxhocdgeabl", model.value().get(0).properties().skus().get(0).id()); + Assertions.assertEquals("huticndvkao", model.value().get(0).properties().skus().get(0).name()); + Assertions.assertEquals("yiftyhxhuro", model.value().get(0).properties().skus().get(0).version()); + Assertions.assertEquals("tyxolniwpwc", model.value().get(0).properties().skus().get(0).description()); + Assertions.assertEquals("jfkgiawxk", model.value().get(0).properties().skus().get(0).restrictedAccessUri()); + Assertions.assertEquals(false, model.value().get(0).properties().skus().get(0).autoAdd()); + Assertions.assertEquals("wckbasyypnd", model.value().get(0).properties().skus().get(0).targets().get(0)); + Assertions.assertEquals("rxybz", model.value().get(0).properties().quotaDimensions().get(0).id()); + Assertions.assertEquals("e", model.value().get(0).properties().quotaDimensions().get(0).scope()); + Assertions.assertEquals("ytb", model.value().get(0).properties().quotaDimensions().get(0).period()); + Assertions.assertEquals(19.418764F, model.value().get(0).properties().quotaDimensions().get(0).quota()); + Assertions.assertEquals("ouf", model.value().get(0).properties().quotaDimensions().get(0).name()); + Assertions.assertEquals("mnkzsmod", model.value().get(0).properties().quotaDimensions().get(0).description()); + Assertions.assertEquals("lougpbkw", model.value().get(0).properties().quotaDimensions().get(0).unit()); + Assertions.assertEquals("utduqktapspwgcu", + model.value().get(0).properties().quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("zuhtymwisdkfthwx", model.value().get(0).properties().pricingDimensions().get(0).id()); + Assertions.assertEquals("t", model.value().get(0).properties().pricingDimensions().get(0).name()); + Assertions.assertEquals("enjbdlwtgrhp", model.nextLink()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationDisplayTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationDisplayTests.java index 227dc4ba15f7..e04aa4a6afbe 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationDisplayTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationDisplayTests.java @@ -11,29 +11,23 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"vypomgkopkwho\",\"resource\":\"pajqgxysm\",\"operation\":\"mbqfqvmk\",\"description\":\"oz\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("vypomgkopkwho", model.provider()); - Assertions.assertEquals("pajqgxysm", model.resource()); - Assertions.assertEquals("mbqfqvmk", model.operation()); - Assertions.assertEquals("oz", model.description()); + OperationDisplay model = BinaryData.fromString( + "{\"provider\":\"eotg\",\"resource\":\"l\",\"operation\":\"muwlauwzizxbm\",\"description\":\"cjefuzmu\"}") + .toObject(OperationDisplay.class); + Assertions.assertEquals("eotg", model.provider()); + Assertions.assertEquals("l", model.resource()); + Assertions.assertEquals("muwlauwzizxbm", model.operation()); + Assertions.assertEquals("cjefuzmu", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("vypomgkopkwho") - .withResource("pajqgxysm") - .withOperation("mbqfqvmk") - .withDescription("oz"); + OperationDisplay model = new OperationDisplay().withProvider("eotg").withResource("l") + .withOperation("muwlauwzizxbm").withDescription("cjefuzmu"); model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("vypomgkopkwho", model.provider()); - Assertions.assertEquals("pajqgxysm", model.resource()); - Assertions.assertEquals("mbqfqvmk", model.operation()); - Assertions.assertEquals("oz", model.description()); + Assertions.assertEquals("eotg", model.provider()); + Assertions.assertEquals("l", model.resource()); + Assertions.assertEquals("muwlauwzizxbm", model.operation()); + Assertions.assertEquals("cjefuzmu", model.description()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationInnerTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationInnerTests.java index af5a47524cb3..ace435935699 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationInnerTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationInnerTests.java @@ -12,37 +12,28 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"odfvuefywsbp\",\"isDataAction\":false,\"display\":{\"provider\":\"hrfou\",\"resource\":\"taakc\",\"operation\":\"iyzvqtmnub\",\"description\":\"kpzksmondjmq\"}}") - .toObject(OperationInner.class); - Assertions.assertEquals("odfvuefywsbp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("hrfou", model.display().provider()); - Assertions.assertEquals("taakc", model.display().resource()); - Assertions.assertEquals("iyzvqtmnub", model.display().operation()); - Assertions.assertEquals("kpzksmondjmq", model.display().description()); + OperationInner model = BinaryData.fromString( + "{\"name\":\"bqdxbx\",\"isDataAction\":true,\"display\":{\"provider\":\"gqxndlkzgxhuripl\",\"resource\":\"odxun\",\"operation\":\"ebxmubyynt\",\"description\":\"rbqtkoie\"}}") + .toObject(OperationInner.class); + Assertions.assertEquals("bqdxbx", model.name()); + Assertions.assertEquals(true, model.isDataAction()); + Assertions.assertEquals("gqxndlkzgxhuripl", model.display().provider()); + Assertions.assertEquals("odxun", model.display().resource()); + Assertions.assertEquals("ebxmubyynt", model.display().operation()); + Assertions.assertEquals("rbqtkoie", model.display().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("odfvuefywsbp") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("hrfou") - .withResource("taakc") - .withOperation("iyzvqtmnub") - .withDescription("kpzksmondjmq")); + OperationInner model = new OperationInner().withName("bqdxbx").withIsDataAction(true) + .withDisplay(new OperationDisplay().withProvider("gqxndlkzgxhuripl").withResource("odxun") + .withOperation("ebxmubyynt").withDescription("rbqtkoie")); model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("odfvuefywsbp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("hrfou", model.display().provider()); - Assertions.assertEquals("taakc", model.display().resource()); - Assertions.assertEquals("iyzvqtmnub", model.display().operation()); - Assertions.assertEquals("kpzksmondjmq", model.display().description()); + Assertions.assertEquals("bqdxbx", model.name()); + Assertions.assertEquals(true, model.isDataAction()); + Assertions.assertEquals("gqxndlkzgxhuripl", model.display().provider()); + Assertions.assertEquals("odxun", model.display().resource()); + Assertions.assertEquals("ebxmubyynt", model.display().operation()); + Assertions.assertEquals("rbqtkoie", model.display().description()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListMockTests.java index e6b5cabaea11..a54615584d27 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListMockTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListMockTests.java @@ -31,42 +31,31 @@ public void testList() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = - "{\"value\":[{\"name\":\"ivfxzsjabibsyst\",\"isDataAction\":true,\"display\":{\"provider\":\"jpvkvpbjxbkzbzkd\",\"resource\":\"cjabudurgkakmo\",\"operation\":\"hjjklff\",\"description\":\"ouw\"}}]}"; + String responseStr + = "{\"value\":[{\"name\":\"gkfpaga\",\"isDataAction\":true,\"display\":{\"provider\":\"pqblylsyxkqjnsj\",\"resource\":\"vti\",\"operation\":\"xsdszuempsb\",\"description\":\"f\"}}]}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + AzureQuantumManager manager = AzureQuantumManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("ivfxzsjabibsyst", response.iterator().next().name()); + Assertions.assertEquals("gkfpaga", response.iterator().next().name()); Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("jpvkvpbjxbkzbzkd", response.iterator().next().display().provider()); - Assertions.assertEquals("cjabudurgkakmo", response.iterator().next().display().resource()); - Assertions.assertEquals("hjjklff", response.iterator().next().display().operation()); - Assertions.assertEquals("ouw", response.iterator().next().display().description()); + Assertions.assertEquals("pqblylsyxkqjnsj", response.iterator().next().display().provider()); + Assertions.assertEquals("vti", response.iterator().next().display().resource()); + Assertions.assertEquals("xsdszuempsb", response.iterator().next().display().operation()); + Assertions.assertEquals("f", response.iterator().next().display().description()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListTests.java index fa22cb677cc0..f18faa9a682a 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/OperationsListTests.java @@ -14,53 +14,30 @@ public final class OperationsListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationsList model = - BinaryData - .fromString( - "{\"nextLink\":\"wkfvhqcrailvp\",\"value\":[{\"name\":\"fuflrwdmhdlx\",\"isDataAction\":true,\"display\":{\"provider\":\"agafcnihgwqap\",\"resource\":\"dgfbcvkcvqvpke\",\"operation\":\"cvdrhvoodsot\",\"description\":\"bzdopcj\"}},{\"name\":\"nhdldwmgxcx\",\"isDataAction\":true,\"display\":{\"provider\":\"utwu\",\"resource\":\"grpkhjwniyqs\",\"operation\":\"i\",\"description\":\"dggkzzlvmbmpa\"}}]}") - .toObject(OperationsList.class); - Assertions.assertEquals("wkfvhqcrailvp", model.nextLink()); - Assertions.assertEquals("fuflrwdmhdlx", model.value().get(0).name()); + OperationsList model = BinaryData.fromString( + "{\"nextLink\":\"gaokonzmnsikv\",\"value\":[{\"name\":\"ze\",\"isDataAction\":true,\"display\":{\"provider\":\"tfz\",\"resource\":\"hhvh\",\"operation\":\"r\",\"description\":\"dkwobdagx\"}}]}") + .toObject(OperationsList.class); + Assertions.assertEquals("gaokonzmnsikv", model.nextLink()); + Assertions.assertEquals("ze", model.value().get(0).name()); Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("agafcnihgwqap", model.value().get(0).display().provider()); - Assertions.assertEquals("dgfbcvkcvqvpke", model.value().get(0).display().resource()); - Assertions.assertEquals("cvdrhvoodsot", model.value().get(0).display().operation()); - Assertions.assertEquals("bzdopcj", model.value().get(0).display().description()); + Assertions.assertEquals("tfz", model.value().get(0).display().provider()); + Assertions.assertEquals("hhvh", model.value().get(0).display().resource()); + Assertions.assertEquals("r", model.value().get(0).display().operation()); + Assertions.assertEquals("dkwobdagx", model.value().get(0).display().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OperationsList model = - new OperationsList() - .withNextLink("wkfvhqcrailvp") - .withValue( - Arrays - .asList( - new OperationInner() - .withName("fuflrwdmhdlx") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("agafcnihgwqap") - .withResource("dgfbcvkcvqvpke") - .withOperation("cvdrhvoodsot") - .withDescription("bzdopcj")), - new OperationInner() - .withName("nhdldwmgxcx") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("utwu") - .withResource("grpkhjwniyqs") - .withOperation("i") - .withDescription("dggkzzlvmbmpa")))); + OperationsList model = new OperationsList().withNextLink("gaokonzmnsikv").withValue( + Arrays.asList(new OperationInner().withName("ze").withIsDataAction(true).withDisplay(new OperationDisplay() + .withProvider("tfz").withResource("hhvh").withOperation("r").withDescription("dkwobdagx")))); model = BinaryData.fromObject(model).toObject(OperationsList.class); - Assertions.assertEquals("wkfvhqcrailvp", model.nextLink()); - Assertions.assertEquals("fuflrwdmhdlx", model.value().get(0).name()); + Assertions.assertEquals("gaokonzmnsikv", model.nextLink()); + Assertions.assertEquals("ze", model.value().get(0).name()); Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("agafcnihgwqap", model.value().get(0).display().provider()); - Assertions.assertEquals("dgfbcvkcvqvpke", model.value().get(0).display().resource()); - Assertions.assertEquals("cvdrhvoodsot", model.value().get(0).display().operation()); - Assertions.assertEquals("bzdopcj", model.value().get(0).display().description()); + Assertions.assertEquals("tfz", model.value().get(0).display().provider()); + Assertions.assertEquals("hhvh", model.value().get(0).display().resource()); + Assertions.assertEquals("r", model.value().get(0).display().operation()); + Assertions.assertEquals("dkwobdagx", model.value().get(0).display().description()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDetailTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDetailTests.java index 068c64b88cb1..f661174e0f5f 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDetailTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDetailTests.java @@ -11,16 +11,17 @@ public final class PricingDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PricingDetail model = BinaryData.fromString("{\"id\":\"c\",\"value\":\"fwdsj\"}").toObject(PricingDetail.class); - Assertions.assertEquals("c", model.id()); - Assertions.assertEquals("fwdsj", model.value()); + PricingDetail model + = BinaryData.fromString("{\"id\":\"wab\",\"value\":\"tshhszhedp\"}").toObject(PricingDetail.class); + Assertions.assertEquals("wab", model.id()); + Assertions.assertEquals("tshhszhedp", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PricingDetail model = new PricingDetail().withId("c").withValue("fwdsj"); + PricingDetail model = new PricingDetail().withId("wab").withValue("tshhszhedp"); model = BinaryData.fromObject(model).toObject(PricingDetail.class); - Assertions.assertEquals("c", model.id()); - Assertions.assertEquals("fwdsj", model.value()); + Assertions.assertEquals("wab", model.id()); + Assertions.assertEquals("tshhszhedp", model.value()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDimensionTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDimensionTests.java index 6a3ebd498177..f52f4fd6c08f 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDimensionTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/PricingDimensionTests.java @@ -11,17 +11,17 @@ public final class PricingDimensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PricingDimension model = - BinaryData.fromString("{\"id\":\"aljutiiswac\",\"name\":\"gdkz\"}").toObject(PricingDimension.class); - Assertions.assertEquals("aljutiiswac", model.id()); - Assertions.assertEquals("gdkz", model.name()); + PricingDimension model = BinaryData.fromString("{\"id\":\"wiwubm\",\"name\":\"besldnkwwtppjflc\"}") + .toObject(PricingDimension.class); + Assertions.assertEquals("wiwubm", model.id()); + Assertions.assertEquals("besldnkwwtppjflc", model.name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PricingDimension model = new PricingDimension().withId("aljutiiswac").withName("gdkz"); + PricingDimension model = new PricingDimension().withId("wiwubm").withName("besldnkwwtppjflc"); model = BinaryData.fromObject(model).toObject(PricingDimension.class); - Assertions.assertEquals("aljutiiswac", model.id()); - Assertions.assertEquals("gdkz", model.name()); + Assertions.assertEquals("wiwubm", model.id()); + Assertions.assertEquals("besldnkwwtppjflc", model.name()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderDescriptionInnerTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderDescriptionInnerTests.java index 758e2bae0aac..d625dc658d9a 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderDescriptionInnerTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderDescriptionInnerTests.java @@ -20,187 +20,175 @@ public final class ProviderDescriptionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ProviderDescriptionInner model = - BinaryData - .fromString( - "{\"id\":\"rkcciwwzjuqk\",\"name\":\"sa\",\"properties\":{\"description\":\"ku\",\"providerType\":\"oskg\",\"company\":\"auu\",\"defaultEndpoint\":\"jmvxie\",\"aad\":{\"applicationId\":\"gidyjrrf\",\"tenantId\":\"aos\"},\"managedApplication\":{\"publisherId\":\"csonpclhoco\",\"offerId\":\"lkevle\"},\"targets\":[{\"id\":\"buhfmvfaxkffeiit\",\"name\":\"vmezy\",\"description\":\"hxmzsbbzoggig\",\"acceptedDataFormats\":[\"burvjxxjnspy\",\"ptkoenkoukn\",\"udwtiukbl\",\"ngkpocipazy\"],\"acceptedContentEncodings\":[\"gukgjnpiucgygevq\",\"ntypmrbpizcdrqj\",\"dpydn\"]},{\"id\":\"hxdeoejz\",\"name\":\"w\",\"description\":\"sjttgzfbish\",\"acceptedDataFormats\":[\"hajdeyeamdpha\"],\"acceptedContentEncodings\":[\"pbuxwgipwhon\",\"wkgshwa\",\"kix\",\"bin\"]}],\"skus\":[{\"id\":\"ttmrywnuzoqf\",\"name\":\"yqzrnkcqvyxlw\",\"version\":\"lsicohoqqnwv\",\"description\":\"yav\",\"restrictedAccessUri\":\"heun\",\"autoAdd\":true,\"targets\":[\"yxzk\",\"noc\"],\"quotaDimensions\":[{\"id\":\"lyaxuc\",\"scope\":\"uqszfk\",\"period\":\"ypewrmjmwvvjekt\",\"quota\":49.062435,\"name\":\"nhwlrsffrzpwvl\",\"description\":\"q\",\"unit\":\"iqylihkaetck\",\"unitPlural\":\"fcivfsnkym\"},{\"id\":\"tqhjfbebrjcx\",\"scope\":\"fuwutttxf\",\"period\":\"rbirphxe\",\"quota\":12.502766,\"name\":\"ahfn\",\"description\":\"kyqxjvuujqgidokg\",\"unit\":\"jyoxgvclt\",\"unitPlural\":\"sncghkjeszz\"},{\"id\":\"ijhtxf\",\"scope\":\"xbf\",\"period\":\"xnehmpvec\",\"quota\":79.49234,\"name\":\"ebfqkkrbm\",\"description\":\"kgriwflzlfbx\",\"unit\":\"uzycispnqza\",\"unitPlural\":\"gkbrpyyd\"}],\"pricingDetails\":[{\"id\":\"uqqkpik\",\"value\":\"rgvtqag\"},{\"id\":\"uynhijg\",\"value\":\"ebf\"},{\"id\":\"arbu\",\"value\":\"cvpnazzmhjrunmpx\"}]}],\"quotaDimensions\":[{\"id\":\"hrbnlankxmyskpbh\",\"scope\":\"btkcxywnytnrsyn\",\"period\":\"idybyxczf\",\"quota\":67.49647,\"name\":\"axdbabph\",\"description\":\"rqlfktsthsucocmn\",\"unit\":\"azt\",\"unitPlural\":\"twwrqp\"},{\"id\":\"dckzywbiexz\",\"scope\":\"yueaxibxujwb\",\"period\":\"walm\",\"quota\":22.792763,\"name\":\"xaepdkzjancuxr\",\"description\":\"wbavxbniwdj\",\"unit\":\"zt\",\"unitPlural\":\"bpg\"},{\"id\":\"ytxhp\",\"scope\":\"bzpfzab\",\"period\":\"cuh\",\"quota\":24.924797,\"name\":\"tyq\",\"description\":\"lbbovplw\",\"unit\":\"hvgyuguosvmk\",\"unitPlural\":\"sxqu\"}],\"pricingDimensions\":[{\"id\":\"l\",\"name\":\"gsxnkjzkdeslpv\"}]}}") - .toObject(ProviderDescriptionInner.class); - Assertions.assertEquals("rkcciwwzjuqk", model.id()); - Assertions.assertEquals("buhfmvfaxkffeiit", model.properties().targets().get(0).id()); - Assertions.assertEquals("vmezy", model.properties().targets().get(0).name()); - Assertions.assertEquals("hxmzsbbzoggig", model.properties().targets().get(0).description()); - Assertions.assertEquals("burvjxxjnspy", model.properties().targets().get(0).acceptedDataFormats().get(0)); - Assertions - .assertEquals("gukgjnpiucgygevq", model.properties().targets().get(0).acceptedContentEncodings().get(0)); - Assertions.assertEquals("ttmrywnuzoqf", model.properties().skus().get(0).id()); - Assertions.assertEquals("yqzrnkcqvyxlw", model.properties().skus().get(0).name()); - Assertions.assertEquals("lsicohoqqnwv", model.properties().skus().get(0).version()); - Assertions.assertEquals("yav", model.properties().skus().get(0).description()); - Assertions.assertEquals("heun", model.properties().skus().get(0).restrictedAccessUri()); - Assertions.assertEquals(true, model.properties().skus().get(0).autoAdd()); - Assertions.assertEquals("yxzk", model.properties().skus().get(0).targets().get(0)); - Assertions.assertEquals("lyaxuc", model.properties().skus().get(0).quotaDimensions().get(0).id()); - Assertions.assertEquals("uqszfk", model.properties().skus().get(0).quotaDimensions().get(0).scope()); - Assertions.assertEquals("ypewrmjmwvvjekt", model.properties().skus().get(0).quotaDimensions().get(0).period()); - Assertions.assertEquals(49.062435F, model.properties().skus().get(0).quotaDimensions().get(0).quota()); - Assertions.assertEquals("nhwlrsffrzpwvl", model.properties().skus().get(0).quotaDimensions().get(0).name()); - Assertions.assertEquals("q", model.properties().skus().get(0).quotaDimensions().get(0).description()); - Assertions.assertEquals("iqylihkaetck", model.properties().skus().get(0).quotaDimensions().get(0).unit()); - Assertions.assertEquals("fcivfsnkym", model.properties().skus().get(0).quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("uqqkpik", model.properties().skus().get(0).pricingDetails().get(0).id()); - Assertions.assertEquals("rgvtqag", model.properties().skus().get(0).pricingDetails().get(0).value()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.properties().quotaDimensions().get(0).id()); - Assertions.assertEquals("btkcxywnytnrsyn", model.properties().quotaDimensions().get(0).scope()); - Assertions.assertEquals("idybyxczf", model.properties().quotaDimensions().get(0).period()); - Assertions.assertEquals(67.49647F, model.properties().quotaDimensions().get(0).quota()); - Assertions.assertEquals("axdbabph", model.properties().quotaDimensions().get(0).name()); - Assertions.assertEquals("rqlfktsthsucocmn", model.properties().quotaDimensions().get(0).description()); - Assertions.assertEquals("azt", model.properties().quotaDimensions().get(0).unit()); - Assertions.assertEquals("twwrqp", model.properties().quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("l", model.properties().pricingDimensions().get(0).id()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.properties().pricingDimensions().get(0).name()); + ProviderDescriptionInner model = BinaryData.fromString( + "{\"id\":\"pj\",\"name\":\"asxazjpqyegualhb\",\"properties\":{\"description\":\"e\",\"providerType\":\"zzvdudgwds\",\"company\":\"hotwmcynpwlbjnp\",\"defaultEndpoint\":\"cftadeh\",\"aad\":{\"applicationId\":\"tyfsoppusuesn\",\"tenantId\":\"dejbavo\"},\"managedApplication\":{\"publisherId\":\"dmoh\",\"offerId\":\"bqvudwxdndn\"},\"targets\":[{\"id\":\"ujjugwdkcglh\",\"name\":\"azjdyggd\",\"description\":\"ixhbkuofqweykhm\",\"acceptedDataFormats\":[\"vfyexfw\",\"ybcibvyvdcsit\",\"nnaamdectehfiqsc\",\"eypvhezrkg\"],\"acceptedContentEncodings\":[\"jrefovgmkqsle\"]}],\"skus\":[{\"id\":\"yqjpkcatt\",\"name\":\"gjcrcczsqpjhvm\",\"version\":\"jvnysounqe\",\"description\":\"noae\",\"restrictedAccessUri\":\"fhyhltrpmopjmcma\",\"autoAdd\":false,\"targets\":[\"hfuiuaodsfc\",\"kvxod\",\"uozmyzydagfua\",\"bezy\"],\"quotaDimensions\":[{\"id\":\"ktwh\",\"scope\":\"xw\",\"period\":\"wqsmbsur\",\"quota\":85.49606,\"name\":\"o\",\"description\":\"ocfs\",\"unit\":\"s\",\"unitPlural\":\"ddystkiiuxhqy\"},{\"id\":\"xorrqnb\",\"scope\":\"czvyifq\",\"period\":\"kdvjsll\",\"quota\":80.76506,\"name\":\"d\",\"description\":\"atkpnp\",\"unit\":\"exxbczwtr\",\"unitPlural\":\"iqzbq\"},{\"id\":\"sovmyokacspkwl\",\"scope\":\"dobpxjmflbvvn\",\"period\":\"rkcciwwzjuqk\",\"quota\":7.702547,\"name\":\"jiwkuofoskghsau\",\"description\":\"mjmvxieduugidyjr\",\"unit\":\"byao\",\"unitPlural\":\"e\"}],\"pricingDetails\":[{\"id\":\"npc\",\"value\":\"ocohslkevleg\"},{\"id\":\"fbuhfmvfaxkffe\",\"value\":\"th\"},{\"id\":\"m\",\"value\":\"yvshxmz\"}]},{\"id\":\"bzoggigrx\",\"name\":\"ur\",\"version\":\"xxjnspydptk\",\"description\":\"nkoukn\",\"restrictedAccessUri\":\"dwtiukbldngkp\",\"autoAdd\":true,\"targets\":[\"z\",\"xoegukgjnpiucgy\",\"evqzntypmrbp\"],\"quotaDimensions\":[{\"id\":\"r\",\"scope\":\"sdpydnfyhxdeoejz\",\"period\":\"w\",\"quota\":67.792435,\"name\":\"ttgzfbis\",\"description\":\"bkh\",\"unit\":\"deyeamdphagalpbu\",\"unitPlural\":\"gipwhonowkg\"}],\"pricingDetails\":[{\"id\":\"nkixzbinj\",\"value\":\"uttmrywnuzoqft\"},{\"id\":\"qzrnkcqvyxlwhz\",\"value\":\"icohoqqnwvl\"},{\"id\":\"avwhheunm\",\"value\":\"hgyxzkonoc\"}]},{\"id\":\"oklyaxuconuq\",\"name\":\"fkbey\",\"version\":\"wrmjmwvvjektc\",\"description\":\"enhwlrs\",\"restrictedAccessUri\":\"rzpwvlqdqgbiq\",\"autoAdd\":true,\"targets\":[\"aetcktvfcivfs\"],\"quotaDimensions\":[{\"id\":\"uctqhjfbe\",\"scope\":\"jcxerfuwu\",\"period\":\"txfvjrbirph\",\"quota\":84.526054,\"name\":\"yva\",\"description\":\"nljky\",\"unit\":\"j\",\"unitPlural\":\"ujqgidok\"},{\"id\":\"ljyoxgvcltb\",\"scope\":\"ncghkje\",\"period\":\"zhbijhtxfv\",\"quota\":15.551442,\"name\":\"smx\",\"description\":\"hmpvecx\",\"unit\":\"debfqkkrbmpukgri\",\"unitPlural\":\"lzlfbxzpuz\"},{\"id\":\"ispnqzahmgkbrp\",\"scope\":\"dhibnuq\",\"period\":\"pikad\",\"quota\":14.613795,\"name\":\"qagnbuyn\",\"description\":\"jggmebfsiarbu\",\"unit\":\"cvpnazzmhjrunmpx\",\"unitPlural\":\"dbhrbnlankxm\"},{\"id\":\"k\",\"scope\":\"henbtkcxywnytn\",\"period\":\"yn\",\"quota\":52.88253,\"name\":\"ybyxc\",\"description\":\"clha\",\"unit\":\"dbabp\",\"unitPlural\":\"wrqlfktsthsuco\"}],\"pricingDetails\":[{\"id\":\"yazttbtwwrqpue\",\"value\":\"kzywbiex\"},{\"id\":\"eyueaxibxujwb\",\"value\":\"walm\"},{\"id\":\"yoxa\",\"value\":\"dkzjancuxrh\"},{\"id\":\"bavxbniwdjswzt\",\"value\":\"bpg\"}]},{\"id\":\"ytxhp\",\"name\":\"bzpfzab\",\"version\":\"cuh\",\"description\":\"tcty\",\"restrictedAccessUri\":\"klbb\",\"autoAdd\":true,\"targets\":[\"zbhvgyuguosv\",\"kfssxqukkf\",\"l\"],\"quotaDimensions\":[{\"id\":\"xnkjzkdesl\",\"scope\":\"lopwiyig\",\"period\":\"pkdwzbai\",\"quota\":69.34189,\"name\":\"a\",\"description\":\"nyqupedeojnabck\",\"unit\":\"mtxpsiebtfh\",\"unitPlural\":\"esap\"},{\"id\":\"rdqmhjjdhtldwkyz\",\"scope\":\"utknc\",\"period\":\"cwsvlxotog\",\"quota\":71.378235,\"name\":\"pqsxvnmicy\",\"description\":\"ceoveilovno\",\"unit\":\"fj\",\"unitPlural\":\"njbkcnxdhbttkph\"},{\"id\":\"pnvjtoqnermclf\",\"scope\":\"phoxus\",\"period\":\"pabgyeps\",\"quota\":95.976326,\"name\":\"zq\",\"description\":\"xywpmueefjzwfqkq\",\"unit\":\"ids\",\"unitPlural\":\"onobglaocqx\"},{\"id\":\"cmgyud\",\"scope\":\"tlmoyrx\",\"period\":\"fudwpznt\",\"quota\":32.9984,\"name\":\"hl\",\"description\":\"jbhckfrlhr\",\"unit\":\"bkyvp\",\"unitPlural\":\"anuzbpzkafkuw\"}],\"pricingDetails\":[{\"id\":\"wbme\",\"value\":\"seyvj\"}]}],\"quotaDimensions\":[{\"id\":\"slhs\",\"scope\":\"deemao\",\"period\":\"xagkvtmelmqkrh\",\"quota\":25.794971,\"name\":\"juahaquhcdhmdual\",\"description\":\"xqpvfadmw\",\"unit\":\"crgvxpvgom\",\"unitPlural\":\"fmisg\"}],\"pricingDimensions\":[{\"id\":\"beldawkzbaliourq\",\"name\":\"kauhashsfwxo\"},{\"id\":\"w\",\"name\":\"cugicjoox\"}]}}") + .toObject(ProviderDescriptionInner.class); + Assertions.assertEquals("pj", model.id()); + Assertions.assertEquals("ujjugwdkcglh", model.properties().targets().get(0).id()); + Assertions.assertEquals("azjdyggd", model.properties().targets().get(0).name()); + Assertions.assertEquals("ixhbkuofqweykhm", model.properties().targets().get(0).description()); + Assertions.assertEquals("vfyexfw", model.properties().targets().get(0).acceptedDataFormats().get(0)); + Assertions.assertEquals("jrefovgmkqsle", model.properties().targets().get(0).acceptedContentEncodings().get(0)); + Assertions.assertEquals("yqjpkcatt", model.properties().skus().get(0).id()); + Assertions.assertEquals("gjcrcczsqpjhvm", model.properties().skus().get(0).name()); + Assertions.assertEquals("jvnysounqe", model.properties().skus().get(0).version()); + Assertions.assertEquals("noae", model.properties().skus().get(0).description()); + Assertions.assertEquals("fhyhltrpmopjmcma", model.properties().skus().get(0).restrictedAccessUri()); + Assertions.assertEquals(false, model.properties().skus().get(0).autoAdd()); + Assertions.assertEquals("hfuiuaodsfc", model.properties().skus().get(0).targets().get(0)); + Assertions.assertEquals("ktwh", model.properties().skus().get(0).quotaDimensions().get(0).id()); + Assertions.assertEquals("xw", model.properties().skus().get(0).quotaDimensions().get(0).scope()); + Assertions.assertEquals("wqsmbsur", model.properties().skus().get(0).quotaDimensions().get(0).period()); + Assertions.assertEquals(85.49606F, model.properties().skus().get(0).quotaDimensions().get(0).quota()); + Assertions.assertEquals("o", model.properties().skus().get(0).quotaDimensions().get(0).name()); + Assertions.assertEquals("ocfs", model.properties().skus().get(0).quotaDimensions().get(0).description()); + Assertions.assertEquals("s", model.properties().skus().get(0).quotaDimensions().get(0).unit()); + Assertions.assertEquals("ddystkiiuxhqy", + model.properties().skus().get(0).quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("npc", model.properties().skus().get(0).pricingDetails().get(0).id()); + Assertions.assertEquals("ocohslkevleg", model.properties().skus().get(0).pricingDetails().get(0).value()); + Assertions.assertEquals("slhs", model.properties().quotaDimensions().get(0).id()); + Assertions.assertEquals("deemao", model.properties().quotaDimensions().get(0).scope()); + Assertions.assertEquals("xagkvtmelmqkrh", model.properties().quotaDimensions().get(0).period()); + Assertions.assertEquals(25.794971F, model.properties().quotaDimensions().get(0).quota()); + Assertions.assertEquals("juahaquhcdhmdual", model.properties().quotaDimensions().get(0).name()); + Assertions.assertEquals("xqpvfadmw", model.properties().quotaDimensions().get(0).description()); + Assertions.assertEquals("crgvxpvgom", model.properties().quotaDimensions().get(0).unit()); + Assertions.assertEquals("fmisg", model.properties().quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("beldawkzbaliourq", model.properties().pricingDimensions().get(0).id()); + Assertions.assertEquals("kauhashsfwxo", model.properties().pricingDimensions().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProviderDescriptionInner model = - new ProviderDescriptionInner() - .withId("rkcciwwzjuqk") + ProviderDescriptionInner model + = new ProviderDescriptionInner().withId("pj") .withProperties( new ProviderProperties() - .withAad(new ProviderPropertiesAad()) + .withAad( + new ProviderPropertiesAad()) .withManagedApplication(new ProviderPropertiesManagedApplication()) - .withTargets( - Arrays - .asList( - new TargetDescription() - .withId("buhfmvfaxkffeiit") - .withName("vmezy") - .withDescription("hxmzsbbzoggig") - .withAcceptedDataFormats( - Arrays.asList("burvjxxjnspy", "ptkoenkoukn", "udwtiukbl", "ngkpocipazy")) - .withAcceptedContentEncodings( - Arrays.asList("gukgjnpiucgygevq", "ntypmrbpizcdrqj", "dpydn")), - new TargetDescription() - .withId("hxdeoejz") - .withName("w") - .withDescription("sjttgzfbish") - .withAcceptedDataFormats(Arrays.asList("hajdeyeamdpha")) - .withAcceptedContentEncodings( - Arrays.asList("pbuxwgipwhon", "wkgshwa", "kix", "bin")))) - .withSkus( - Arrays - .asList( - new SkuDescription() - .withId("ttmrywnuzoqf") - .withName("yqzrnkcqvyxlw") - .withVersion("lsicohoqqnwv") - .withDescription("yav") - .withRestrictedAccessUri("heun") - .withAutoAdd(true) - .withTargets(Arrays.asList("yxzk", "noc")) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("lyaxuc") - .withScope("uqszfk") - .withPeriod("ypewrmjmwvvjekt") - .withQuota(49.062435F) - .withName("nhwlrsffrzpwvl") - .withDescription("q") - .withUnit("iqylihkaetck") - .withUnitPlural("fcivfsnkym"), - new QuotaDimension() - .withId("tqhjfbebrjcx") - .withScope("fuwutttxf") - .withPeriod("rbirphxe") - .withQuota(12.502766F) - .withName("ahfn") - .withDescription("kyqxjvuujqgidokg") - .withUnit("jyoxgvclt") - .withUnitPlural("sncghkjeszz"), - new QuotaDimension() - .withId("ijhtxf") - .withScope("xbf") - .withPeriod("xnehmpvec") - .withQuota(79.49234F) - .withName("ebfqkkrbm") - .withDescription("kgriwflzlfbx") - .withUnit("uzycispnqza") - .withUnitPlural("gkbrpyyd"))) - .withPricingDetails( - Arrays - .asList( - new PricingDetail().withId("uqqkpik").withValue("rgvtqag"), - new PricingDetail().withId("uynhijg").withValue("ebf"), - new PricingDetail().withId("arbu").withValue("cvpnazzmhjrunmpx"))))) - .withQuotaDimensions( - Arrays - .asList( + .withTargets(Arrays.asList(new TargetDescription().withId("ujjugwdkcglh").withName("azjdyggd") + .withDescription("ixhbkuofqweykhm") + .withAcceptedDataFormats( + Arrays.asList("vfyexfw", "ybcibvyvdcsit", "nnaamdectehfiqsc", "eypvhezrkg")) + .withAcceptedContentEncodings(Arrays.asList("jrefovgmkqsle")))) + .withSkus(Arrays.asList( + new SkuDescription() + .withId("yqjpkcatt").withName("gjcrcczsqpjhvm").withVersion("jvnysounqe") + .withDescription("noae").withRestrictedAccessUri("fhyhltrpmopjmcma").withAutoAdd(false) + .withTargets(Arrays.asList("hfuiuaodsfc", "kvxod", "uozmyzydagfua", "bezy")) + .withQuotaDimensions(Arrays + .asList( + new QuotaDimension().withId("ktwh").withScope("xw").withPeriod("wqsmbsur") + .withQuota(85.49606F).withName("o").withDescription("ocfs").withUnit("s") + .withUnitPlural("ddystkiiuxhqy"), + new QuotaDimension().withId("xorrqnb").withScope("czvyifq") + .withPeriod("kdvjsll").withQuota(80.76506F).withName("d") + .withDescription("atkpnp").withUnit("exxbczwtr").withUnitPlural("iqzbq"), + new QuotaDimension().withId("sovmyokacspkwl").withScope("dobpxjmflbvvn") + .withPeriod("rkcciwwzjuqk").withQuota(7.702547F).withName("jiwkuofoskghsau") + .withDescription("mjmvxieduugidyjr").withUnit("byao").withUnitPlural("e"))) + .withPricingDetails(Arrays.asList(new PricingDetail() + .withId("npc").withValue("ocohslkevleg"), + new PricingDetail().withId("fbuhfmvfaxkffe").withValue("th"), + new PricingDetail().withId("m").withValue("yvshxmz"))), + new SkuDescription().withId("bzoggigrx").withName("ur").withVersion("xxjnspydptk") + .withDescription("nkoukn").withRestrictedAccessUri("dwtiukbldngkp").withAutoAdd(true) + .withTargets(Arrays.asList("z", "xoegukgjnpiucgy", "evqzntypmrbp")) + .withQuotaDimensions(Arrays + .asList( + new QuotaDimension().withId("r").withScope("sdpydnfyhxdeoejz").withPeriod("w") + .withQuota(67.792435F).withName("ttgzfbis").withDescription("bkh") + .withUnit("deyeamdphagalpbu").withUnitPlural("gipwhonowkg"))) + .withPricingDetails(Arrays + .asList( + new PricingDetail().withId("nkixzbinj").withValue("uttmrywnuzoqft"), + new PricingDetail().withId("qzrnkcqvyxlwhz").withValue("icohoqqnwvl"), + new PricingDetail().withId("avwhheunm").withValue("hgyxzkonoc"))), + new SkuDescription().withId("oklyaxuconuq").withName("fkbey").withVersion("wrmjmwvvjektc") + .withDescription("enhwlrs").withRestrictedAccessUri("rzpwvlqdqgbiq").withAutoAdd(true) + .withTargets(Arrays.asList("aetcktvfcivfs")) + .withQuotaDimensions(Arrays + .asList(new QuotaDimension().withId("uctqhjfbe").withScope("jcxerfuwu") + .withPeriod("txfvjrbirph").withQuota(84.526054F).withName("yva") + .withDescription("nljky").withUnit("j").withUnitPlural("ujqgidok"), + new QuotaDimension().withId("ljyoxgvcltb").withScope("ncghkje") + .withPeriod("zhbijhtxfv").withQuota(15.551442F).withName("smx") + .withDescription("hmpvecx").withUnit("debfqkkrbmpukgri") + .withUnitPlural("lzlfbxzpuz"), + new QuotaDimension() + .withId("ispnqzahmgkbrp").withScope("dhibnuq").withPeriod("pikad") + .withQuota(14.613795F).withName("qagnbuyn").withDescription("jggmebfsiarbu") + .withUnit("cvpnazzmhjrunmpx").withUnitPlural("dbhrbnlankxm"), + new QuotaDimension().withId("k").withScope("henbtkcxywnytn").withPeriod("yn") + .withQuota(52.88253F).withName("ybyxc").withDescription("clha") + .withUnit("dbabp").withUnitPlural("wrqlfktsthsuco"))) + .withPricingDetails(Arrays + .asList( + new PricingDetail().withId("yazttbtwwrqpue").withValue("kzywbiex"), + new PricingDetail().withId("eyueaxibxujwb").withValue("walm"), + new PricingDetail().withId("yoxa").withValue("dkzjancuxrh"), + new PricingDetail().withId("bavxbniwdjswzt").withValue("bpg"))), + new SkuDescription().withId("ytxhp").withName("bzpfzab").withVersion("cuh") + .withDescription("tcty").withRestrictedAccessUri("klbb").withAutoAdd(true) + .withTargets(Arrays.asList("zbhvgyuguosv", "kfssxqukkf", "l")) + .withQuotaDimensions(Arrays.asList(new QuotaDimension().withId("xnkjzkdesl") + .withScope("lopwiyig").withPeriod("pkdwzbai").withQuota(69.34189F).withName("a") + .withDescription("nyqupedeojnabck").withUnit("mtxpsiebtfh").withUnitPlural("esap"), new QuotaDimension() - .withId("hrbnlankxmyskpbh") - .withScope("btkcxywnytnrsyn") - .withPeriod("idybyxczf") - .withQuota(67.49647F) - .withName("axdbabph") - .withDescription("rqlfktsthsucocmn") - .withUnit("azt") - .withUnitPlural("twwrqp"), - new QuotaDimension() - .withId("dckzywbiexz") - .withScope("yueaxibxujwb") - .withPeriod("walm") - .withQuota(22.792763F) - .withName("xaepdkzjancuxr") - .withDescription("wbavxbniwdj") - .withUnit("zt") - .withUnitPlural("bpg"), - new QuotaDimension() - .withId("ytxhp") - .withScope("bzpfzab") - .withPeriod("cuh") - .withQuota(24.924797F) - .withName("tyq") - .withDescription("lbbovplw") - .withUnit("hvgyuguosvmk") - .withUnitPlural("sxqu"))) + .withId("rdqmhjjdhtldwkyz").withScope("utknc").withPeriod("cwsvlxotog") + .withQuota(71.378235F).withName("pqsxvnmicy").withDescription("ceoveilovno") + .withUnit("fj").withUnitPlural("njbkcnxdhbttkph"), + new QuotaDimension().withId("pnvjtoqnermclf").withScope("phoxus") + .withPeriod("pabgyeps").withQuota(95.976326F).withName("zq") + .withDescription("xywpmueefjzwfqkq").withUnit("ids") + .withUnitPlural("onobglaocqx"), + new QuotaDimension().withId("cmgyud").withScope("tlmoyrx").withPeriod("fudwpznt") + .withQuota(32.9984F).withName("hl").withDescription("jbhckfrlhr") + .withUnit("bkyvp").withUnitPlural("anuzbpzkafkuw"))) + .withPricingDetails( + Arrays.asList(new PricingDetail().withId("wbme").withValue("seyvj"))))) + .withQuotaDimensions(Arrays.asList(new QuotaDimension().withId("slhs").withScope("deemao") + .withPeriod("xagkvtmelmqkrh").withQuota(25.794971F).withName("juahaquhcdhmdual") + .withDescription("xqpvfadmw").withUnit("crgvxpvgom").withUnitPlural("fmisg"))) .withPricingDimensions( - Arrays.asList(new PricingDimension().withId("l").withName("gsxnkjzkdeslpv")))); + Arrays.asList(new PricingDimension().withId("beldawkzbaliourq").withName("kauhashsfwxo"), + new PricingDimension().withId("w").withName("cugicjoox")))); model = BinaryData.fromObject(model).toObject(ProviderDescriptionInner.class); - Assertions.assertEquals("rkcciwwzjuqk", model.id()); - Assertions.assertEquals("buhfmvfaxkffeiit", model.properties().targets().get(0).id()); - Assertions.assertEquals("vmezy", model.properties().targets().get(0).name()); - Assertions.assertEquals("hxmzsbbzoggig", model.properties().targets().get(0).description()); - Assertions.assertEquals("burvjxxjnspy", model.properties().targets().get(0).acceptedDataFormats().get(0)); - Assertions - .assertEquals("gukgjnpiucgygevq", model.properties().targets().get(0).acceptedContentEncodings().get(0)); - Assertions.assertEquals("ttmrywnuzoqf", model.properties().skus().get(0).id()); - Assertions.assertEquals("yqzrnkcqvyxlw", model.properties().skus().get(0).name()); - Assertions.assertEquals("lsicohoqqnwv", model.properties().skus().get(0).version()); - Assertions.assertEquals("yav", model.properties().skus().get(0).description()); - Assertions.assertEquals("heun", model.properties().skus().get(0).restrictedAccessUri()); - Assertions.assertEquals(true, model.properties().skus().get(0).autoAdd()); - Assertions.assertEquals("yxzk", model.properties().skus().get(0).targets().get(0)); - Assertions.assertEquals("lyaxuc", model.properties().skus().get(0).quotaDimensions().get(0).id()); - Assertions.assertEquals("uqszfk", model.properties().skus().get(0).quotaDimensions().get(0).scope()); - Assertions.assertEquals("ypewrmjmwvvjekt", model.properties().skus().get(0).quotaDimensions().get(0).period()); - Assertions.assertEquals(49.062435F, model.properties().skus().get(0).quotaDimensions().get(0).quota()); - Assertions.assertEquals("nhwlrsffrzpwvl", model.properties().skus().get(0).quotaDimensions().get(0).name()); - Assertions.assertEquals("q", model.properties().skus().get(0).quotaDimensions().get(0).description()); - Assertions.assertEquals("iqylihkaetck", model.properties().skus().get(0).quotaDimensions().get(0).unit()); - Assertions.assertEquals("fcivfsnkym", model.properties().skus().get(0).quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("uqqkpik", model.properties().skus().get(0).pricingDetails().get(0).id()); - Assertions.assertEquals("rgvtqag", model.properties().skus().get(0).pricingDetails().get(0).value()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.properties().quotaDimensions().get(0).id()); - Assertions.assertEquals("btkcxywnytnrsyn", model.properties().quotaDimensions().get(0).scope()); - Assertions.assertEquals("idybyxczf", model.properties().quotaDimensions().get(0).period()); - Assertions.assertEquals(67.49647F, model.properties().quotaDimensions().get(0).quota()); - Assertions.assertEquals("axdbabph", model.properties().quotaDimensions().get(0).name()); - Assertions.assertEquals("rqlfktsthsucocmn", model.properties().quotaDimensions().get(0).description()); - Assertions.assertEquals("azt", model.properties().quotaDimensions().get(0).unit()); - Assertions.assertEquals("twwrqp", model.properties().quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("l", model.properties().pricingDimensions().get(0).id()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.properties().pricingDimensions().get(0).name()); + Assertions.assertEquals("pj", model.id()); + Assertions.assertEquals("ujjugwdkcglh", model.properties().targets().get(0).id()); + Assertions.assertEquals("azjdyggd", model.properties().targets().get(0).name()); + Assertions.assertEquals("ixhbkuofqweykhm", model.properties().targets().get(0).description()); + Assertions.assertEquals("vfyexfw", model.properties().targets().get(0).acceptedDataFormats().get(0)); + Assertions.assertEquals("jrefovgmkqsle", model.properties().targets().get(0).acceptedContentEncodings().get(0)); + Assertions.assertEquals("yqjpkcatt", model.properties().skus().get(0).id()); + Assertions.assertEquals("gjcrcczsqpjhvm", model.properties().skus().get(0).name()); + Assertions.assertEquals("jvnysounqe", model.properties().skus().get(0).version()); + Assertions.assertEquals("noae", model.properties().skus().get(0).description()); + Assertions.assertEquals("fhyhltrpmopjmcma", model.properties().skus().get(0).restrictedAccessUri()); + Assertions.assertEquals(false, model.properties().skus().get(0).autoAdd()); + Assertions.assertEquals("hfuiuaodsfc", model.properties().skus().get(0).targets().get(0)); + Assertions.assertEquals("ktwh", model.properties().skus().get(0).quotaDimensions().get(0).id()); + Assertions.assertEquals("xw", model.properties().skus().get(0).quotaDimensions().get(0).scope()); + Assertions.assertEquals("wqsmbsur", model.properties().skus().get(0).quotaDimensions().get(0).period()); + Assertions.assertEquals(85.49606F, model.properties().skus().get(0).quotaDimensions().get(0).quota()); + Assertions.assertEquals("o", model.properties().skus().get(0).quotaDimensions().get(0).name()); + Assertions.assertEquals("ocfs", model.properties().skus().get(0).quotaDimensions().get(0).description()); + Assertions.assertEquals("s", model.properties().skus().get(0).quotaDimensions().get(0).unit()); + Assertions.assertEquals("ddystkiiuxhqy", + model.properties().skus().get(0).quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("npc", model.properties().skus().get(0).pricingDetails().get(0).id()); + Assertions.assertEquals("ocohslkevleg", model.properties().skus().get(0).pricingDetails().get(0).value()); + Assertions.assertEquals("slhs", model.properties().quotaDimensions().get(0).id()); + Assertions.assertEquals("deemao", model.properties().quotaDimensions().get(0).scope()); + Assertions.assertEquals("xagkvtmelmqkrh", model.properties().quotaDimensions().get(0).period()); + Assertions.assertEquals(25.794971F, model.properties().quotaDimensions().get(0).quota()); + Assertions.assertEquals("juahaquhcdhmdual", model.properties().quotaDimensions().get(0).name()); + Assertions.assertEquals("xqpvfadmw", model.properties().quotaDimensions().get(0).description()); + Assertions.assertEquals("crgvxpvgom", model.properties().quotaDimensions().get(0).unit()); + Assertions.assertEquals("fmisg", model.properties().quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("beldawkzbaliourq", model.properties().pricingDimensions().get(0).id()); + Assertions.assertEquals("kauhashsfwxo", model.properties().pricingDimensions().get(0).name()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesAadTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesAadTests.java index 9d630a75dd85..e4c662264c05 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesAadTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesAadTests.java @@ -10,10 +10,8 @@ public final class ProviderPropertiesAadTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ProviderPropertiesAad model = - BinaryData - .fromString("{\"applicationId\":\"qolbgyc\",\"tenantId\":\"iertgccymvaolp\"}") - .toObject(ProviderPropertiesAad.class); + ProviderPropertiesAad model = BinaryData.fromString("{\"applicationId\":\"z\",\"tenantId\":\"hzxct\"}") + .toObject(ProviderPropertiesAad.class); } @org.junit.jupiter.api.Test diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesManagedApplicationTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesManagedApplicationTests.java index 1568d26fdd1a..1c3626843b44 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesManagedApplicationTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesManagedApplicationTests.java @@ -10,9 +10,8 @@ public final class ProviderPropertiesManagedApplicationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ProviderPropertiesManagedApplication model = - BinaryData - .fromString("{\"publisherId\":\"lqlfm\",\"offerId\":\"n\"}") + ProviderPropertiesManagedApplication model + = BinaryData.fromString("{\"publisherId\":\"gbkdmoizpos\",\"offerId\":\"grcfb\"}") .toObject(ProviderPropertiesManagedApplication.class); } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesTests.java index 49c54f117c67..603f64b453f2 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderPropertiesTests.java @@ -19,223 +19,101 @@ public final class ProviderPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ProviderProperties model = - BinaryData - .fromString( - "{\"description\":\"pwiyig\",\"providerType\":\"pkdwzbai\",\"company\":\"bbaumnyquped\",\"defaultEndpoint\":\"jn\",\"aad\":{\"applicationId\":\"khsmtxpsiebt\",\"tenantId\":\"vpesapskrdqmhjjd\"},\"managedApplication\":{\"publisherId\":\"dwkyzxuu\",\"offerId\":\"ncwscwsvlxoto\"},\"targets\":[{\"id\":\"upqsx\",\"name\":\"micykvceoveilo\",\"description\":\"oty\",\"acceptedDataFormats\":[\"cnjbkcnxdhbt\"],\"acceptedContentEncodings\":[\"h\",\"wpn\"]},{\"id\":\"t\",\"name\":\"nermcl\",\"description\":\"lphox\",\"acceptedDataFormats\":[\"rpabg\",\"epsbjtazqu\"],\"acceptedContentEncodings\":[\"wpmueefj\",\"wfqkquj\",\"dsuyonobgla\",\"cq\"]},{\"id\":\"ccm\",\"name\":\"udxytlmoyrx\",\"description\":\"fudwpznt\",\"acceptedDataFormats\":[\"zhlrqjb\",\"ck\"],\"acceptedContentEncodings\":[\"hrxsbk\",\"vpycanuzbp\",\"kafkuwbcrnwbm\"]},{\"id\":\"hseyvju\",\"name\":\"tslhspkdeem\",\"description\":\"fm\",\"acceptedDataFormats\":[\"kv\",\"melmqkrha\",\"vljua\",\"aquhcdhm\"],\"acceptedContentEncodings\":[\"laexqp\",\"fadmws\",\"crgvxpvgom\",\"lf\"]}],\"skus\":[{\"id\":\"wbnb\",\"name\":\"ldawkzbaliourqha\",\"version\":\"uhashsfwx\",\"description\":\"owzxcu\",\"restrictedAccessUri\":\"cjooxdjebwpucwwf\",\"autoAdd\":false,\"targets\":[\"meue\",\"ivyhzceuojgjrwju\"],\"quotaDimensions\":[{\"id\":\"wmcdytdxwi\",\"scope\":\"nrjawgqwg\",\"period\":\"ni\",\"quota\":5.4993095,\"name\":\"bkpyc\",\"description\":\"lwn\",\"unit\":\"hjdauwhvylwz\",\"unitPlural\":\"dhxujznbmpo\"},{\"id\":\"wpr\",\"scope\":\"lve\",\"period\":\"lupj\",\"quota\":80.70111,\"name\":\"xobbcswsrt\",\"description\":\"iplrbpbewtghfgb\",\"unit\":\"gw\",\"unitPlural\":\"vlvqhjkbegi\"}],\"pricingDetails\":[{\"id\":\"xiebwwaloayqcg\",\"value\":\"tzjuzgwyzmhtxo\"},{\"id\":\"mtsavjcbpwxqp\",\"value\":\"knftguvriuh\"},{\"id\":\"wmdyvxqtay\",\"value\":\"ww\"},{\"id\":\"yqbexrmcqibycno\",\"value\":\"knme\"}]},{\"id\":\"sgzvahapjyzhpv\",\"name\":\"zcjrvxdjzlmwlx\",\"version\":\"ug\",\"description\":\"zovawjvz\",\"restrictedAccessUri\":\"luthn\",\"autoAdd\":false,\"targets\":[\"i\",\"eilpjzuaejxdu\",\"tskzbbtdzumveek\",\"pwo\"],\"quotaDimensions\":[{\"id\":\"fpbsjyofdxl\",\"scope\":\"sd\",\"period\":\"ouwaboekqvkeln\",\"quota\":63.19878,\"name\":\"xwyjsflhhc\",\"description\":\"lnjixisxya\",\"unit\":\"oyaqcslyjpkiid\",\"unitPlural\":\"exznelixhnr\"},{\"id\":\"folhbnxknal\",\"scope\":\"lp\",\"period\":\"gdtpnapnyiro\",\"quota\":27.694834,\"name\":\"igvpgylg\",\"description\":\"itxmedjvcslynqww\",\"unit\":\"wzz\",\"unitPlural\":\"gktrmgucnapkte\"}],\"pricingDetails\":[{\"id\":\"wptfdy\",\"value\":\"fqbuaceopzf\"},{\"id\":\"hhuao\",\"value\":\"pcqeqx\"}]},{\"id\":\"z\",\"name\":\"hzxct\",\"version\":\"gbkdmoizpos\",\"description\":\"grcfb\",\"restrictedAccessUri\":\"rmfqjhhkxbpvj\",\"autoAdd\":false,\"targets\":[\"xjyngudivk\",\"tswb\",\"qzvszjf\",\"uvjfdxxive\"],\"quotaDimensions\":[{\"id\":\"qaqtdoqmcbxvwvxy\",\"scope\":\"qbhsfxobl\",\"period\":\"k\",\"quota\":19.958847,\"name\":\"ewwwfbkrvrnsv\",\"description\":\"q\",\"unit\":\"hxcr\",\"unitPlural\":\"fovasr\"}],\"pricingDetails\":[{\"id\":\"bhsqfsubcgjbirxb\",\"value\":\"bsrfbj\"}]}],\"quotaDimensions\":[{\"id\":\"ssotftpv\",\"scope\":\"bexilzznfqqnv\",\"period\":\"mqtaruoujmkcjh\",\"quota\":83.08001,\"name\":\"jrybnwjewgdrjer\",\"description\":\"aen\",\"unit\":\"eh\",\"unitPlural\":\"doy\"}],\"pricingDimensions\":[{\"id\":\"thnzd\",\"name\":\"sl\"},{\"id\":\"ayqigynduhav\",\"name\":\"lkthu\"}]}") - .toObject(ProviderProperties.class); - Assertions.assertEquals("upqsx", model.targets().get(0).id()); - Assertions.assertEquals("micykvceoveilo", model.targets().get(0).name()); - Assertions.assertEquals("oty", model.targets().get(0).description()); - Assertions.assertEquals("cnjbkcnxdhbt", model.targets().get(0).acceptedDataFormats().get(0)); - Assertions.assertEquals("h", model.targets().get(0).acceptedContentEncodings().get(0)); - Assertions.assertEquals("wbnb", model.skus().get(0).id()); - Assertions.assertEquals("ldawkzbaliourqha", model.skus().get(0).name()); - Assertions.assertEquals("uhashsfwx", model.skus().get(0).version()); - Assertions.assertEquals("owzxcu", model.skus().get(0).description()); - Assertions.assertEquals("cjooxdjebwpucwwf", model.skus().get(0).restrictedAccessUri()); + ProviderProperties model = BinaryData.fromString( + "{\"description\":\"ebwpucwwfvo\",\"providerType\":\"vmeueci\",\"company\":\"hzceuojgjrwjue\",\"defaultEndpoint\":\"twm\",\"aad\":{\"applicationId\":\"tdx\",\"tenantId\":\"txnrjaw\"},\"managedApplication\":{\"publisherId\":\"gxhnisk\",\"offerId\":\"bkpyc\"},\"targets\":[{\"id\":\"ndnhj\",\"name\":\"uwhvylwzbtdhxujz\",\"description\":\"mpowuwpr\",\"acceptedDataFormats\":[\"veual\"],\"acceptedContentEncodings\":[\"mkh\"]}],\"skus\":[{\"id\":\"bcswsrt\",\"name\":\"iplrbpbewtghfgb\",\"version\":\"gw\",\"description\":\"vlvqhjkbegi\",\"restrictedAccessUri\":\"nmxiebwwaloayqc\",\"autoAdd\":false,\"targets\":[\"j\",\"zg\"],\"quotaDimensions\":[{\"id\":\"htxongmtsavjc\",\"scope\":\"wxqpsrknftguvri\",\"period\":\"prwmdyvxqt\",\"quota\":42.644672,\"name\":\"ww\",\"description\":\"yqbexrmcqibycno\",\"unit\":\"knme\",\"unitPlural\":\"sgzvahapjyzhpv\"}],\"pricingDetails\":[{\"id\":\"j\",\"value\":\"xdjzlmwlxk\"},{\"id\":\"gfhzovawjvzunlut\",\"value\":\"n\"},{\"id\":\"nxipeil\",\"value\":\"zuaejxd\"},{\"id\":\"tskzbbtdzumveek\",\"value\":\"wozuhkf\"}]}],\"quotaDimensions\":[{\"id\":\"yofd\",\"scope\":\"uusdttouwa\",\"period\":\"ekqvkeln\",\"quota\":63.19878,\"name\":\"xwyjsflhhc\",\"description\":\"lnjixisxya\",\"unit\":\"oyaqcslyjpkiid\",\"unitPlural\":\"exznelixhnr\"},{\"id\":\"folhbnxknal\",\"scope\":\"lp\",\"period\":\"gdtpnapnyiro\",\"quota\":27.694834,\"name\":\"igvpgylg\",\"description\":\"itxmedjvcslynqww\",\"unit\":\"wzz\",\"unitPlural\":\"gktrmgucnapkte\"}],\"pricingDimensions\":[{\"id\":\"wptfdy\",\"name\":\"fqbuaceopzf\"},{\"id\":\"hhuao\",\"name\":\"pcqeqx\"}]}") + .toObject(ProviderProperties.class); + Assertions.assertEquals("ndnhj", model.targets().get(0).id()); + Assertions.assertEquals("uwhvylwzbtdhxujz", model.targets().get(0).name()); + Assertions.assertEquals("mpowuwpr", model.targets().get(0).description()); + Assertions.assertEquals("veual", model.targets().get(0).acceptedDataFormats().get(0)); + Assertions.assertEquals("mkh", model.targets().get(0).acceptedContentEncodings().get(0)); + Assertions.assertEquals("bcswsrt", model.skus().get(0).id()); + Assertions.assertEquals("iplrbpbewtghfgb", model.skus().get(0).name()); + Assertions.assertEquals("gw", model.skus().get(0).version()); + Assertions.assertEquals("vlvqhjkbegi", model.skus().get(0).description()); + Assertions.assertEquals("nmxiebwwaloayqc", model.skus().get(0).restrictedAccessUri()); Assertions.assertEquals(false, model.skus().get(0).autoAdd()); - Assertions.assertEquals("meue", model.skus().get(0).targets().get(0)); - Assertions.assertEquals("wmcdytdxwi", model.skus().get(0).quotaDimensions().get(0).id()); - Assertions.assertEquals("nrjawgqwg", model.skus().get(0).quotaDimensions().get(0).scope()); - Assertions.assertEquals("ni", model.skus().get(0).quotaDimensions().get(0).period()); - Assertions.assertEquals(5.4993095F, model.skus().get(0).quotaDimensions().get(0).quota()); - Assertions.assertEquals("bkpyc", model.skus().get(0).quotaDimensions().get(0).name()); - Assertions.assertEquals("lwn", model.skus().get(0).quotaDimensions().get(0).description()); - Assertions.assertEquals("hjdauwhvylwz", model.skus().get(0).quotaDimensions().get(0).unit()); - Assertions.assertEquals("dhxujznbmpo", model.skus().get(0).quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("xiebwwaloayqcg", model.skus().get(0).pricingDetails().get(0).id()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.skus().get(0).pricingDetails().get(0).value()); - Assertions.assertEquals("ssotftpv", model.quotaDimensions().get(0).id()); - Assertions.assertEquals("bexilzznfqqnv", model.quotaDimensions().get(0).scope()); - Assertions.assertEquals("mqtaruoujmkcjh", model.quotaDimensions().get(0).period()); - Assertions.assertEquals(83.08001F, model.quotaDimensions().get(0).quota()); - Assertions.assertEquals("jrybnwjewgdrjer", model.quotaDimensions().get(0).name()); - Assertions.assertEquals("aen", model.quotaDimensions().get(0).description()); - Assertions.assertEquals("eh", model.quotaDimensions().get(0).unit()); - Assertions.assertEquals("doy", model.quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("thnzd", model.pricingDimensions().get(0).id()); - Assertions.assertEquals("sl", model.pricingDimensions().get(0).name()); + Assertions.assertEquals("j", model.skus().get(0).targets().get(0)); + Assertions.assertEquals("htxongmtsavjc", model.skus().get(0).quotaDimensions().get(0).id()); + Assertions.assertEquals("wxqpsrknftguvri", model.skus().get(0).quotaDimensions().get(0).scope()); + Assertions.assertEquals("prwmdyvxqt", model.skus().get(0).quotaDimensions().get(0).period()); + Assertions.assertEquals(42.644672F, model.skus().get(0).quotaDimensions().get(0).quota()); + Assertions.assertEquals("ww", model.skus().get(0).quotaDimensions().get(0).name()); + Assertions.assertEquals("yqbexrmcqibycno", model.skus().get(0).quotaDimensions().get(0).description()); + Assertions.assertEquals("knme", model.skus().get(0).quotaDimensions().get(0).unit()); + Assertions.assertEquals("sgzvahapjyzhpv", model.skus().get(0).quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("j", model.skus().get(0).pricingDetails().get(0).id()); + Assertions.assertEquals("xdjzlmwlxk", model.skus().get(0).pricingDetails().get(0).value()); + Assertions.assertEquals("yofd", model.quotaDimensions().get(0).id()); + Assertions.assertEquals("uusdttouwa", model.quotaDimensions().get(0).scope()); + Assertions.assertEquals("ekqvkeln", model.quotaDimensions().get(0).period()); + Assertions.assertEquals(63.19878F, model.quotaDimensions().get(0).quota()); + Assertions.assertEquals("xwyjsflhhc", model.quotaDimensions().get(0).name()); + Assertions.assertEquals("lnjixisxya", model.quotaDimensions().get(0).description()); + Assertions.assertEquals("oyaqcslyjpkiid", model.quotaDimensions().get(0).unit()); + Assertions.assertEquals("exznelixhnr", model.quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("wptfdy", model.pricingDimensions().get(0).id()); + Assertions.assertEquals("fqbuaceopzf", model.pricingDimensions().get(0).name()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ProviderProperties model = - new ProviderProperties() - .withAad(new ProviderPropertiesAad()) - .withManagedApplication(new ProviderPropertiesManagedApplication()) - .withTargets( - Arrays - .asList( - new TargetDescription() - .withId("upqsx") - .withName("micykvceoveilo") - .withDescription("oty") - .withAcceptedDataFormats(Arrays.asList("cnjbkcnxdhbt")) - .withAcceptedContentEncodings(Arrays.asList("h", "wpn")), - new TargetDescription() - .withId("t") - .withName("nermcl") - .withDescription("lphox") - .withAcceptedDataFormats(Arrays.asList("rpabg", "epsbjtazqu")) - .withAcceptedContentEncodings( - Arrays.asList("wpmueefj", "wfqkquj", "dsuyonobgla", "cq")), - new TargetDescription() - .withId("ccm") - .withName("udxytlmoyrx") - .withDescription("fudwpznt") - .withAcceptedDataFormats(Arrays.asList("zhlrqjb", "ck")) - .withAcceptedContentEncodings(Arrays.asList("hrxsbk", "vpycanuzbp", "kafkuwbcrnwbm")), - new TargetDescription() - .withId("hseyvju") - .withName("tslhspkdeem") - .withDescription("fm") - .withAcceptedDataFormats(Arrays.asList("kv", "melmqkrha", "vljua", "aquhcdhm")) - .withAcceptedContentEncodings(Arrays.asList("laexqp", "fadmws", "crgvxpvgom", "lf")))) - .withSkus( - Arrays - .asList( - new SkuDescription() - .withId("wbnb") - .withName("ldawkzbaliourqha") - .withVersion("uhashsfwx") - .withDescription("owzxcu") - .withRestrictedAccessUri("cjooxdjebwpucwwf") - .withAutoAdd(false) - .withTargets(Arrays.asList("meue", "ivyhzceuojgjrwju")) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("wmcdytdxwi") - .withScope("nrjawgqwg") - .withPeriod("ni") - .withQuota(5.4993095F) - .withName("bkpyc") - .withDescription("lwn") - .withUnit("hjdauwhvylwz") - .withUnitPlural("dhxujznbmpo"), - new QuotaDimension() - .withId("wpr") - .withScope("lve") - .withPeriod("lupj") - .withQuota(80.70111F) - .withName("xobbcswsrt") - .withDescription("iplrbpbewtghfgb") - .withUnit("gw") - .withUnitPlural("vlvqhjkbegi"))) - .withPricingDetails( - Arrays - .asList( - new PricingDetail().withId("xiebwwaloayqcg").withValue("tzjuzgwyzmhtxo"), - new PricingDetail().withId("mtsavjcbpwxqp").withValue("knftguvriuh"), - new PricingDetail().withId("wmdyvxqtay").withValue("ww"), - new PricingDetail().withId("yqbexrmcqibycno").withValue("knme"))), - new SkuDescription() - .withId("sgzvahapjyzhpv") - .withName("zcjrvxdjzlmwlx") - .withVersion("ug") - .withDescription("zovawjvz") - .withRestrictedAccessUri("luthn") - .withAutoAdd(false) - .withTargets(Arrays.asList("i", "eilpjzuaejxdu", "tskzbbtdzumveek", "pwo")) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("fpbsjyofdxl") - .withScope("sd") - .withPeriod("ouwaboekqvkeln") - .withQuota(63.19878F) - .withName("xwyjsflhhc") - .withDescription("lnjixisxya") - .withUnit("oyaqcslyjpkiid") - .withUnitPlural("exznelixhnr"), - new QuotaDimension() - .withId("folhbnxknal") - .withScope("lp") - .withPeriod("gdtpnapnyiro") - .withQuota(27.694834F) - .withName("igvpgylg") - .withDescription("itxmedjvcslynqww") - .withUnit("wzz") - .withUnitPlural("gktrmgucnapkte"))) - .withPricingDetails( - Arrays - .asList( - new PricingDetail().withId("wptfdy").withValue("fqbuaceopzf"), - new PricingDetail().withId("hhuao").withValue("pcqeqx"))), - new SkuDescription() - .withId("z") - .withName("hzxct") - .withVersion("gbkdmoizpos") - .withDescription("grcfb") - .withRestrictedAccessUri("rmfqjhhkxbpvj") - .withAutoAdd(false) - .withTargets(Arrays.asList("xjyngudivk", "tswb", "qzvszjf", "uvjfdxxive")) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("qaqtdoqmcbxvwvxy") - .withScope("qbhsfxobl") - .withPeriod("k") - .withQuota(19.958847F) - .withName("ewwwfbkrvrnsv") - .withDescription("q") - .withUnit("hxcr") - .withUnitPlural("fovasr"))) - .withPricingDetails( - Arrays.asList(new PricingDetail().withId("bhsqfsubcgjbirxb").withValue("bsrfbj"))))) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("ssotftpv") - .withScope("bexilzznfqqnv") - .withPeriod("mqtaruoujmkcjh") - .withQuota(83.08001F) - .withName("jrybnwjewgdrjer") - .withDescription("aen") - .withUnit("eh") - .withUnitPlural("doy"))) - .withPricingDimensions( - Arrays - .asList( - new PricingDimension().withId("thnzd").withName("sl"), - new PricingDimension().withId("ayqigynduhav").withName("lkthu"))); + ProviderProperties model = new ProviderProperties().withAad(new ProviderPropertiesAad()) + .withManagedApplication(new ProviderPropertiesManagedApplication()) + .withTargets(Arrays.asList(new TargetDescription().withId("ndnhj").withName("uwhvylwzbtdhxujz") + .withDescription("mpowuwpr").withAcceptedDataFormats(Arrays.asList("veual")) + .withAcceptedContentEncodings(Arrays.asList("mkh")))) + .withSkus(Arrays.asList(new SkuDescription().withId("bcswsrt").withName("iplrbpbewtghfgb").withVersion("gw") + .withDescription("vlvqhjkbegi").withRestrictedAccessUri("nmxiebwwaloayqc").withAutoAdd(false) + .withTargets(Arrays.asList("j", "zg")) + .withQuotaDimensions(Arrays.asList(new QuotaDimension().withId("htxongmtsavjc") + .withScope("wxqpsrknftguvri").withPeriod("prwmdyvxqt").withQuota(42.644672F).withName("ww") + .withDescription("yqbexrmcqibycno").withUnit("knme").withUnitPlural("sgzvahapjyzhpv"))) + .withPricingDetails(Arrays.asList(new PricingDetail().withId("j").withValue("xdjzlmwlxk"), + new PricingDetail().withId("gfhzovawjvzunlut").withValue("n"), + new PricingDetail().withId("nxipeil").withValue("zuaejxd"), + new PricingDetail().withId("tskzbbtdzumveek").withValue("wozuhkf"))))) + .withQuotaDimensions(Arrays.asList( + new QuotaDimension().withId("yofd").withScope("uusdttouwa").withPeriod("ekqvkeln").withQuota(63.19878F) + .withName("xwyjsflhhc").withDescription("lnjixisxya").withUnit("oyaqcslyjpkiid") + .withUnitPlural("exznelixhnr"), + new QuotaDimension().withId("folhbnxknal").withScope("lp").withPeriod("gdtpnapnyiro") + .withQuota(27.694834F).withName("igvpgylg").withDescription("itxmedjvcslynqww").withUnit("wzz") + .withUnitPlural("gktrmgucnapkte"))) + .withPricingDimensions(Arrays.asList(new PricingDimension().withId("wptfdy").withName("fqbuaceopzf"), + new PricingDimension().withId("hhuao").withName("pcqeqx"))); model = BinaryData.fromObject(model).toObject(ProviderProperties.class); - Assertions.assertEquals("upqsx", model.targets().get(0).id()); - Assertions.assertEquals("micykvceoveilo", model.targets().get(0).name()); - Assertions.assertEquals("oty", model.targets().get(0).description()); - Assertions.assertEquals("cnjbkcnxdhbt", model.targets().get(0).acceptedDataFormats().get(0)); - Assertions.assertEquals("h", model.targets().get(0).acceptedContentEncodings().get(0)); - Assertions.assertEquals("wbnb", model.skus().get(0).id()); - Assertions.assertEquals("ldawkzbaliourqha", model.skus().get(0).name()); - Assertions.assertEquals("uhashsfwx", model.skus().get(0).version()); - Assertions.assertEquals("owzxcu", model.skus().get(0).description()); - Assertions.assertEquals("cjooxdjebwpucwwf", model.skus().get(0).restrictedAccessUri()); + Assertions.assertEquals("ndnhj", model.targets().get(0).id()); + Assertions.assertEquals("uwhvylwzbtdhxujz", model.targets().get(0).name()); + Assertions.assertEquals("mpowuwpr", model.targets().get(0).description()); + Assertions.assertEquals("veual", model.targets().get(0).acceptedDataFormats().get(0)); + Assertions.assertEquals("mkh", model.targets().get(0).acceptedContentEncodings().get(0)); + Assertions.assertEquals("bcswsrt", model.skus().get(0).id()); + Assertions.assertEquals("iplrbpbewtghfgb", model.skus().get(0).name()); + Assertions.assertEquals("gw", model.skus().get(0).version()); + Assertions.assertEquals("vlvqhjkbegi", model.skus().get(0).description()); + Assertions.assertEquals("nmxiebwwaloayqc", model.skus().get(0).restrictedAccessUri()); Assertions.assertEquals(false, model.skus().get(0).autoAdd()); - Assertions.assertEquals("meue", model.skus().get(0).targets().get(0)); - Assertions.assertEquals("wmcdytdxwi", model.skus().get(0).quotaDimensions().get(0).id()); - Assertions.assertEquals("nrjawgqwg", model.skus().get(0).quotaDimensions().get(0).scope()); - Assertions.assertEquals("ni", model.skus().get(0).quotaDimensions().get(0).period()); - Assertions.assertEquals(5.4993095F, model.skus().get(0).quotaDimensions().get(0).quota()); - Assertions.assertEquals("bkpyc", model.skus().get(0).quotaDimensions().get(0).name()); - Assertions.assertEquals("lwn", model.skus().get(0).quotaDimensions().get(0).description()); - Assertions.assertEquals("hjdauwhvylwz", model.skus().get(0).quotaDimensions().get(0).unit()); - Assertions.assertEquals("dhxujznbmpo", model.skus().get(0).quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("xiebwwaloayqcg", model.skus().get(0).pricingDetails().get(0).id()); - Assertions.assertEquals("tzjuzgwyzmhtxo", model.skus().get(0).pricingDetails().get(0).value()); - Assertions.assertEquals("ssotftpv", model.quotaDimensions().get(0).id()); - Assertions.assertEquals("bexilzznfqqnv", model.quotaDimensions().get(0).scope()); - Assertions.assertEquals("mqtaruoujmkcjh", model.quotaDimensions().get(0).period()); - Assertions.assertEquals(83.08001F, model.quotaDimensions().get(0).quota()); - Assertions.assertEquals("jrybnwjewgdrjer", model.quotaDimensions().get(0).name()); - Assertions.assertEquals("aen", model.quotaDimensions().get(0).description()); - Assertions.assertEquals("eh", model.quotaDimensions().get(0).unit()); - Assertions.assertEquals("doy", model.quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("thnzd", model.pricingDimensions().get(0).id()); - Assertions.assertEquals("sl", model.pricingDimensions().get(0).name()); + Assertions.assertEquals("j", model.skus().get(0).targets().get(0)); + Assertions.assertEquals("htxongmtsavjc", model.skus().get(0).quotaDimensions().get(0).id()); + Assertions.assertEquals("wxqpsrknftguvri", model.skus().get(0).quotaDimensions().get(0).scope()); + Assertions.assertEquals("prwmdyvxqt", model.skus().get(0).quotaDimensions().get(0).period()); + Assertions.assertEquals(42.644672F, model.skus().get(0).quotaDimensions().get(0).quota()); + Assertions.assertEquals("ww", model.skus().get(0).quotaDimensions().get(0).name()); + Assertions.assertEquals("yqbexrmcqibycno", model.skus().get(0).quotaDimensions().get(0).description()); + Assertions.assertEquals("knme", model.skus().get(0).quotaDimensions().get(0).unit()); + Assertions.assertEquals("sgzvahapjyzhpv", model.skus().get(0).quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("j", model.skus().get(0).pricingDetails().get(0).id()); + Assertions.assertEquals("xdjzlmwlxk", model.skus().get(0).pricingDetails().get(0).value()); + Assertions.assertEquals("yofd", model.quotaDimensions().get(0).id()); + Assertions.assertEquals("uusdttouwa", model.quotaDimensions().get(0).scope()); + Assertions.assertEquals("ekqvkeln", model.quotaDimensions().get(0).period()); + Assertions.assertEquals(63.19878F, model.quotaDimensions().get(0).quota()); + Assertions.assertEquals("xwyjsflhhc", model.quotaDimensions().get(0).name()); + Assertions.assertEquals("lnjixisxya", model.quotaDimensions().get(0).description()); + Assertions.assertEquals("oyaqcslyjpkiid", model.quotaDimensions().get(0).unit()); + Assertions.assertEquals("exznelixhnr", model.quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("wptfdy", model.pricingDimensions().get(0).id()); + Assertions.assertEquals("fqbuaceopzf", model.pricingDimensions().get(0).name()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderTests.java index a5ff8076d0c5..3f43a0a184c1 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/ProviderTests.java @@ -12,35 +12,27 @@ public final class ProviderTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Provider model = - BinaryData - .fromString( - "{\"providerId\":\"lhmwhfpmrqobm\",\"providerSku\":\"kknryrtihf\",\"instanceUri\":\"ijbpzvgnwzsymgl\",\"applicationName\":\"fcyzkohdbihanufh\",\"provisioningState\":\"Updating\",\"resourceUsageId\":\"y\"}") - .toObject(Provider.class); - Assertions.assertEquals("lhmwhfpmrqobm", model.providerId()); - Assertions.assertEquals("kknryrtihf", model.providerSku()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.instanceUri()); - Assertions.assertEquals("fcyzkohdbihanufh", model.applicationName()); - Assertions.assertEquals(Status.UPDATING, model.provisioningState()); + Provider model = BinaryData.fromString( + "{\"providerId\":\"mofcq\",\"providerSku\":\"my\",\"instanceUri\":\"kdtmlxhekuk\",\"applicationName\":\"txukcdmp\",\"provisioningState\":\"Failed\",\"resourceUsageId\":\"y\"}") + .toObject(Provider.class); + Assertions.assertEquals("mofcq", model.providerId()); + Assertions.assertEquals("my", model.providerSku()); + Assertions.assertEquals("kdtmlxhekuk", model.instanceUri()); + Assertions.assertEquals("txukcdmp", model.applicationName()); + Assertions.assertEquals(Status.FAILED, model.provisioningState()); Assertions.assertEquals("y", model.resourceUsageId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Provider model = - new Provider() - .withProviderId("lhmwhfpmrqobm") - .withProviderSku("kknryrtihf") - .withInstanceUri("ijbpzvgnwzsymgl") - .withApplicationName("fcyzkohdbihanufh") - .withProvisioningState(Status.UPDATING) - .withResourceUsageId("y"); + Provider model = new Provider().withProviderId("mofcq").withProviderSku("my").withInstanceUri("kdtmlxhekuk") + .withApplicationName("txukcdmp").withProvisioningState(Status.FAILED).withResourceUsageId("y"); model = BinaryData.fromObject(model).toObject(Provider.class); - Assertions.assertEquals("lhmwhfpmrqobm", model.providerId()); - Assertions.assertEquals("kknryrtihf", model.providerSku()); - Assertions.assertEquals("ijbpzvgnwzsymgl", model.instanceUri()); - Assertions.assertEquals("fcyzkohdbihanufh", model.applicationName()); - Assertions.assertEquals(Status.UPDATING, model.provisioningState()); + Assertions.assertEquals("mofcq", model.providerId()); + Assertions.assertEquals("my", model.providerSku()); + Assertions.assertEquals("kdtmlxhekuk", model.instanceUri()); + Assertions.assertEquals("txukcdmp", model.applicationName()); + Assertions.assertEquals(Status.FAILED, model.provisioningState()); Assertions.assertEquals("y", model.resourceUsageId()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuantumWorkspaceIdentityTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuantumWorkspaceIdentityTests.java index 61f01ad36955..8bb2736853bd 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuantumWorkspaceIdentityTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuantumWorkspaceIdentityTests.java @@ -12,9 +12,8 @@ public final class QuantumWorkspaceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - QuantumWorkspaceIdentity model = - BinaryData - .fromString("{\"principalId\":\"git\",\"tenantId\":\"qhabifpikxwcz\",\"type\":\"None\"}") + QuantumWorkspaceIdentity model + = BinaryData.fromString("{\"principalId\":\"nzwuxzd\",\"tenantId\":\"a\",\"type\":\"None\"}") .toObject(QuantumWorkspaceIdentity.class); Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuantumWorkspaceInnerTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuantumWorkspaceInnerTests.java deleted file mode 100644 index e36406f76ced..000000000000 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuantumWorkspaceInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quantum.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quantum.fluent.models.QuantumWorkspaceInner; -import com.azure.resourcemanager.quantum.models.Provider; -import com.azure.resourcemanager.quantum.models.QuantumWorkspaceIdentity; -import com.azure.resourcemanager.quantum.models.ResourceIdentityType; -import com.azure.resourcemanager.quantum.models.Status; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class QuantumWorkspaceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuantumWorkspaceInner model = - BinaryData - .fromString( - "{\"properties\":{\"providers\":[{\"providerId\":\"uv\",\"providerSku\":\"xpyb\",\"instanceUri\":\"m\",\"applicationName\":\"mtz\",\"provisioningState\":\"Launching\",\"resourceUsageId\":\"phrupidgsybbejhp\"}],\"usable\":\"Partial\",\"provisioningState\":\"ProviderUpdating\",\"storageAccount\":\"xaobhdxbmtqioqjz\",\"endpointUri\":\"tbmufpo\"},\"identity\":{\"principalId\":\"izhwlrxy\",\"tenantId\":\"soqijg\",\"type\":\"None\"},\"location\":\"pazlobcufpdz\",\"tags\":{\"qqjnqgl\":\"t\",\"foooj\":\"qgn\"},\"id\":\"wifsq\",\"name\":\"saagdf\",\"type\":\"glzlhjxrifkwmrv\"}") - .toObject(QuantumWorkspaceInner.class); - Assertions.assertEquals("pazlobcufpdz", model.location()); - Assertions.assertEquals("t", model.tags().get("qqjnqgl")); - Assertions.assertEquals(ResourceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("uv", model.providers().get(0).providerId()); - Assertions.assertEquals("xpyb", model.providers().get(0).providerSku()); - Assertions.assertEquals("m", model.providers().get(0).instanceUri()); - Assertions.assertEquals("mtz", model.providers().get(0).applicationName()); - Assertions.assertEquals(Status.LAUNCHING, model.providers().get(0).provisioningState()); - Assertions.assertEquals("phrupidgsybbejhp", model.providers().get(0).resourceUsageId()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.storageAccount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuantumWorkspaceInner model = - new QuantumWorkspaceInner() - .withLocation("pazlobcufpdz") - .withTags(mapOf("qqjnqgl", "t", "foooj", "qgn")) - .withIdentity(new QuantumWorkspaceIdentity().withType(ResourceIdentityType.NONE)) - .withProviders( - Arrays - .asList( - new Provider() - .withProviderId("uv") - .withProviderSku("xpyb") - .withInstanceUri("m") - .withApplicationName("mtz") - .withProvisioningState(Status.LAUNCHING) - .withResourceUsageId("phrupidgsybbejhp"))) - .withStorageAccount("xaobhdxbmtqioqjz"); - model = BinaryData.fromObject(model).toObject(QuantumWorkspaceInner.class); - Assertions.assertEquals("pazlobcufpdz", model.location()); - Assertions.assertEquals("t", model.tags().get("qqjnqgl")); - Assertions.assertEquals(ResourceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("uv", model.providers().get(0).providerId()); - Assertions.assertEquals("xpyb", model.providers().get(0).providerSku()); - Assertions.assertEquals("m", model.providers().get(0).instanceUri()); - Assertions.assertEquals("mtz", model.providers().get(0).applicationName()); - Assertions.assertEquals(Status.LAUNCHING, model.providers().get(0).provisioningState()); - Assertions.assertEquals("phrupidgsybbejhp", model.providers().get(0).resourceUsageId()); - Assertions.assertEquals("xaobhdxbmtqioqjz", model.storageAccount()); - } - - @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/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuotaDimensionTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuotaDimensionTests.java index 03c9f791e098..d2c3a6d0277c 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuotaDimensionTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/QuotaDimensionTests.java @@ -11,41 +11,32 @@ public final class QuotaDimensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - QuotaDimension model = - BinaryData - .fromString( - "{\"id\":\"cjefuzmu\",\"scope\":\"bttdumorppxe\",\"period\":\"nzbtbhj\",\"quota\":21.287733,\"name\":\"fgohdneuelfphs\",\"description\":\"htozfikdow\",\"unit\":\"uuvxz\",\"unitPlural\":\"lvithhqzonosgg\"}") - .toObject(QuotaDimension.class); - Assertions.assertEquals("cjefuzmu", model.id()); - Assertions.assertEquals("bttdumorppxe", model.scope()); - Assertions.assertEquals("nzbtbhj", model.period()); - Assertions.assertEquals(21.287733F, model.quota()); - Assertions.assertEquals("fgohdneuelfphs", model.name()); - Assertions.assertEquals("htozfikdow", model.description()); - Assertions.assertEquals("uuvxz", model.unit()); - Assertions.assertEquals("lvithhqzonosgg", model.unitPlural()); + QuotaDimension model = BinaryData.fromString( + "{\"id\":\"hzdxssadbzm\",\"scope\":\"dfznudaodv\",\"period\":\"bncblylpstdbhhx\",\"quota\":95.43601,\"name\":\"zucerscdntnev\",\"description\":\"wjmy\",\"unit\":\"dsslswt\",\"unitPlural\":\"eriofzpyqs\"}") + .toObject(QuotaDimension.class); + Assertions.assertEquals("hzdxssadbzm", model.id()); + Assertions.assertEquals("dfznudaodv", model.scope()); + Assertions.assertEquals("bncblylpstdbhhx", model.period()); + Assertions.assertEquals(95.43601F, model.quota()); + Assertions.assertEquals("zucerscdntnev", model.name()); + Assertions.assertEquals("wjmy", model.description()); + Assertions.assertEquals("dsslswt", model.unit()); + Assertions.assertEquals("eriofzpyqs", model.unitPlural()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - QuotaDimension model = - new QuotaDimension() - .withId("cjefuzmu") - .withScope("bttdumorppxe") - .withPeriod("nzbtbhj") - .withQuota(21.287733F) - .withName("fgohdneuelfphs") - .withDescription("htozfikdow") - .withUnit("uuvxz") - .withUnitPlural("lvithhqzonosgg"); + QuotaDimension model = new QuotaDimension().withId("hzdxssadbzm").withScope("dfznudaodv") + .withPeriod("bncblylpstdbhhx").withQuota(95.43601F).withName("zucerscdntnev").withDescription("wjmy") + .withUnit("dsslswt").withUnitPlural("eriofzpyqs"); model = BinaryData.fromObject(model).toObject(QuotaDimension.class); - Assertions.assertEquals("cjefuzmu", model.id()); - Assertions.assertEquals("bttdumorppxe", model.scope()); - Assertions.assertEquals("nzbtbhj", model.period()); - Assertions.assertEquals(21.287733F, model.quota()); - Assertions.assertEquals("fgohdneuelfphs", model.name()); - Assertions.assertEquals("htozfikdow", model.description()); - Assertions.assertEquals("uuvxz", model.unit()); - Assertions.assertEquals("lvithhqzonosgg", model.unitPlural()); + Assertions.assertEquals("hzdxssadbzm", model.id()); + Assertions.assertEquals("dfznudaodv", model.scope()); + Assertions.assertEquals("bncblylpstdbhhx", model.period()); + Assertions.assertEquals(95.43601F, model.quota()); + Assertions.assertEquals("zucerscdntnev", model.name()); + Assertions.assertEquals("wjmy", model.description()); + Assertions.assertEquals("dsslswt", model.unit()); + Assertions.assertEquals("eriofzpyqs", model.unitPlural()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/SkuDescriptionTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/SkuDescriptionTests.java index 28d1960d3ec3..881d7cb830fe 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/SkuDescriptionTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/SkuDescriptionTests.java @@ -14,71 +14,57 @@ public final class SkuDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SkuDescription model = - BinaryData - .fromString( - "{\"id\":\"ets\",\"name\":\"szhedplvw\",\"version\":\"ubmwmbesld\",\"description\":\"wwtppj\",\"restrictedAccessUri\":\"cxogaokonzm\",\"autoAdd\":true,\"targets\":[\"mkqzeqqkdltfzxmh\",\"v\"],\"quotaDimensions\":[{\"id\":\"eodkwobda\",\"scope\":\"tibqdxbxwakb\",\"period\":\"qxn\",\"quota\":52.112804,\"name\":\"gxhuriplbp\",\"description\":\"xunkbebxmubyynt\",\"unit\":\"rbqtkoie\",\"unitPlural\":\"eotg\"}],\"pricingDetails\":[{\"id\":\"tmuwlauwzi\",\"value\":\"bm\"}]}") - .toObject(SkuDescription.class); - Assertions.assertEquals("ets", model.id()); - Assertions.assertEquals("szhedplvw", model.name()); - Assertions.assertEquals("ubmwmbesld", model.version()); - Assertions.assertEquals("wwtppj", model.description()); - Assertions.assertEquals("cxogaokonzm", model.restrictedAccessUri()); - Assertions.assertEquals(true, model.autoAdd()); - Assertions.assertEquals("mkqzeqqkdltfzxmh", model.targets().get(0)); - Assertions.assertEquals("eodkwobda", model.quotaDimensions().get(0).id()); - Assertions.assertEquals("tibqdxbxwakb", model.quotaDimensions().get(0).scope()); - Assertions.assertEquals("qxn", model.quotaDimensions().get(0).period()); - Assertions.assertEquals(52.112804F, model.quotaDimensions().get(0).quota()); - Assertions.assertEquals("gxhuriplbp", model.quotaDimensions().get(0).name()); - Assertions.assertEquals("xunkbebxmubyynt", model.quotaDimensions().get(0).description()); - Assertions.assertEquals("rbqtkoie", model.quotaDimensions().get(0).unit()); - Assertions.assertEquals("eotg", model.quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("tmuwlauwzi", model.pricingDetails().get(0).id()); - Assertions.assertEquals("bm", model.pricingDetails().get(0).value()); + SkuDescription model = BinaryData.fromString( + "{\"id\":\"mcbxvwvxysl\",\"name\":\"hsfxoblytkb\",\"version\":\"pe\",\"description\":\"wfbkrvrns\",\"restrictedAccessUri\":\"hqjohxcrsbfova\",\"autoAdd\":false,\"targets\":[\"wbhsqfsub\"],\"quotaDimensions\":[{\"id\":\"irx\",\"scope\":\"ybsrfbjfdtwss\",\"period\":\"ftpvjzbexil\",\"quota\":45.3637,\"name\":\"qqnvwpmq\",\"description\":\"ruoujmk\",\"unit\":\"hwqytj\",\"unitPlural\":\"bnw\"}],\"pricingDetails\":[{\"id\":\"drjervnaenqpehin\",\"value\":\"ygmi\"},{\"id\":\"hnzdndslgnayqi\",\"value\":\"nduhavhqlkthum\"},{\"id\":\"olbgycduiertgccy\",\"value\":\"aolps\"},{\"id\":\"qlfmmdnbb\",\"value\":\"zpswiydmc\"}]}") + .toObject(SkuDescription.class); + Assertions.assertEquals("mcbxvwvxysl", model.id()); + Assertions.assertEquals("hsfxoblytkb", model.name()); + Assertions.assertEquals("pe", model.version()); + Assertions.assertEquals("wfbkrvrns", model.description()); + Assertions.assertEquals("hqjohxcrsbfova", model.restrictedAccessUri()); + Assertions.assertEquals(false, model.autoAdd()); + Assertions.assertEquals("wbhsqfsub", model.targets().get(0)); + Assertions.assertEquals("irx", model.quotaDimensions().get(0).id()); + Assertions.assertEquals("ybsrfbjfdtwss", model.quotaDimensions().get(0).scope()); + Assertions.assertEquals("ftpvjzbexil", model.quotaDimensions().get(0).period()); + Assertions.assertEquals(45.3637F, model.quotaDimensions().get(0).quota()); + Assertions.assertEquals("qqnvwpmq", model.quotaDimensions().get(0).name()); + Assertions.assertEquals("ruoujmk", model.quotaDimensions().get(0).description()); + Assertions.assertEquals("hwqytj", model.quotaDimensions().get(0).unit()); + Assertions.assertEquals("bnw", model.quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("drjervnaenqpehin", model.pricingDetails().get(0).id()); + Assertions.assertEquals("ygmi", model.pricingDetails().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SkuDescription model = - new SkuDescription() - .withId("ets") - .withName("szhedplvw") - .withVersion("ubmwmbesld") - .withDescription("wwtppj") - .withRestrictedAccessUri("cxogaokonzm") - .withAutoAdd(true) - .withTargets(Arrays.asList("mkqzeqqkdltfzxmh", "v")) - .withQuotaDimensions( - Arrays - .asList( - new QuotaDimension() - .withId("eodkwobda") - .withScope("tibqdxbxwakb") - .withPeriod("qxn") - .withQuota(52.112804F) - .withName("gxhuriplbp") - .withDescription("xunkbebxmubyynt") - .withUnit("rbqtkoie") - .withUnitPlural("eotg"))) - .withPricingDetails(Arrays.asList(new PricingDetail().withId("tmuwlauwzi").withValue("bm"))); + SkuDescription model = new SkuDescription().withId("mcbxvwvxysl").withName("hsfxoblytkb").withVersion("pe") + .withDescription("wfbkrvrns").withRestrictedAccessUri("hqjohxcrsbfova").withAutoAdd(false) + .withTargets(Arrays.asList("wbhsqfsub")) + .withQuotaDimensions(Arrays.asList(new QuotaDimension().withId("irx").withScope("ybsrfbjfdtwss") + .withPeriod("ftpvjzbexil").withQuota(45.3637F).withName("qqnvwpmq").withDescription("ruoujmk") + .withUnit("hwqytj").withUnitPlural("bnw"))) + .withPricingDetails(Arrays.asList(new PricingDetail().withId("drjervnaenqpehin").withValue("ygmi"), + new PricingDetail().withId("hnzdndslgnayqi").withValue("nduhavhqlkthum"), + new PricingDetail().withId("olbgycduiertgccy").withValue("aolps"), + new PricingDetail().withId("qlfmmdnbb").withValue("zpswiydmc"))); model = BinaryData.fromObject(model).toObject(SkuDescription.class); - Assertions.assertEquals("ets", model.id()); - Assertions.assertEquals("szhedplvw", model.name()); - Assertions.assertEquals("ubmwmbesld", model.version()); - Assertions.assertEquals("wwtppj", model.description()); - Assertions.assertEquals("cxogaokonzm", model.restrictedAccessUri()); - Assertions.assertEquals(true, model.autoAdd()); - Assertions.assertEquals("mkqzeqqkdltfzxmh", model.targets().get(0)); - Assertions.assertEquals("eodkwobda", model.quotaDimensions().get(0).id()); - Assertions.assertEquals("tibqdxbxwakb", model.quotaDimensions().get(0).scope()); - Assertions.assertEquals("qxn", model.quotaDimensions().get(0).period()); - Assertions.assertEquals(52.112804F, model.quotaDimensions().get(0).quota()); - Assertions.assertEquals("gxhuriplbp", model.quotaDimensions().get(0).name()); - Assertions.assertEquals("xunkbebxmubyynt", model.quotaDimensions().get(0).description()); - Assertions.assertEquals("rbqtkoie", model.quotaDimensions().get(0).unit()); - Assertions.assertEquals("eotg", model.quotaDimensions().get(0).unitPlural()); - Assertions.assertEquals("tmuwlauwzi", model.pricingDetails().get(0).id()); - Assertions.assertEquals("bm", model.pricingDetails().get(0).value()); + Assertions.assertEquals("mcbxvwvxysl", model.id()); + Assertions.assertEquals("hsfxoblytkb", model.name()); + Assertions.assertEquals("pe", model.version()); + Assertions.assertEquals("wfbkrvrns", model.description()); + Assertions.assertEquals("hqjohxcrsbfova", model.restrictedAccessUri()); + Assertions.assertEquals(false, model.autoAdd()); + Assertions.assertEquals("wbhsqfsub", model.targets().get(0)); + Assertions.assertEquals("irx", model.quotaDimensions().get(0).id()); + Assertions.assertEquals("ybsrfbjfdtwss", model.quotaDimensions().get(0).scope()); + Assertions.assertEquals("ftpvjzbexil", model.quotaDimensions().get(0).period()); + Assertions.assertEquals(45.3637F, model.quotaDimensions().get(0).quota()); + Assertions.assertEquals("qqnvwpmq", model.quotaDimensions().get(0).name()); + Assertions.assertEquals("ruoujmk", model.quotaDimensions().get(0).description()); + Assertions.assertEquals("hwqytj", model.quotaDimensions().get(0).unit()); + Assertions.assertEquals("bnw", model.quotaDimensions().get(0).unitPlural()); + Assertions.assertEquals("drjervnaenqpehin", model.pricingDetails().get(0).id()); + Assertions.assertEquals("ygmi", model.pricingDetails().get(0).value()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TagsObjectTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TagsObjectTests.java index 6cfd4c088436..9576ff221164 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TagsObjectTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TagsObjectTests.java @@ -13,20 +13,19 @@ public final class TagsObjectTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TagsObject model = - BinaryData - .fromString("{\"tags\":{\"ivyqniwbybrkxvd\":\"pqxu\",\"fwvuk\":\"mjgr\"}}") - .toObject(TagsObject.class); - Assertions.assertEquals("pqxu", model.tags().get("ivyqniwbybrkxvd")); + TagsObject model + = BinaryData.fromString("{\"tags\":{\"knryrtihfxtij\":\"whfpmrqobmtu\"}}").toObject(TagsObject.class); + Assertions.assertEquals("whfpmrqobmtu", model.tags().get("knryrtihfxtij")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TagsObject model = new TagsObject().withTags(mapOf("ivyqniwbybrkxvd", "pqxu", "fwvuk", "mjgr")); + TagsObject model = new TagsObject().withTags(mapOf("knryrtihfxtij", "whfpmrqobmtu")); model = BinaryData.fromObject(model).toObject(TagsObject.class); - Assertions.assertEquals("pqxu", model.tags().get("ivyqniwbybrkxvd")); + Assertions.assertEquals("whfpmrqobmtu", model.tags().get("knryrtihfxtij")); } + // Use "Map.of" if available @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TargetDescriptionTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TargetDescriptionTests.java index e7930997040f..c8515fbc389d 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TargetDescriptionTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/TargetDescriptionTests.java @@ -12,32 +12,26 @@ public final class TargetDescriptionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - TargetDescription model = - BinaryData - .fromString( - "{\"id\":\"glzpswiydm\",\"name\":\"yhz\",\"description\":\"ss\",\"acceptedDataFormats\":[\"zmnvdfznudaod\",\"xzb\",\"cblylpstdbhhxsr\"],\"acceptedContentEncodings\":[\"ucerscdntnevfi\",\"jmygtdsslswtmwer\",\"ofz\",\"yqsemwa\"]}") - .toObject(TargetDescription.class); - Assertions.assertEquals("glzpswiydm", model.id()); - Assertions.assertEquals("yhz", model.name()); - Assertions.assertEquals("ss", model.description()); - Assertions.assertEquals("zmnvdfznudaod", model.acceptedDataFormats().get(0)); - Assertions.assertEquals("ucerscdntnevfi", model.acceptedContentEncodings().get(0)); + TargetDescription model = BinaryData.fromString( + "{\"id\":\"rmfqjhhkxbpvj\",\"name\":\"jhxxjyn\",\"description\":\"divkrt\",\"acceptedDataFormats\":[\"xqzvszjfa\"],\"acceptedContentEncodings\":[\"fdxxivetvtcqaqtd\"]}") + .toObject(TargetDescription.class); + Assertions.assertEquals("rmfqjhhkxbpvj", model.id()); + Assertions.assertEquals("jhxxjyn", model.name()); + Assertions.assertEquals("divkrt", model.description()); + Assertions.assertEquals("xqzvszjfa", model.acceptedDataFormats().get(0)); + Assertions.assertEquals("fdxxivetvtcqaqtd", model.acceptedContentEncodings().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TargetDescription model = - new TargetDescription() - .withId("glzpswiydm") - .withName("yhz") - .withDescription("ss") - .withAcceptedDataFormats(Arrays.asList("zmnvdfznudaod", "xzb", "cblylpstdbhhxsr")) - .withAcceptedContentEncodings(Arrays.asList("ucerscdntnevfi", "jmygtdsslswtmwer", "ofz", "yqsemwa")); + TargetDescription model = new TargetDescription().withId("rmfqjhhkxbpvj").withName("jhxxjyn") + .withDescription("divkrt").withAcceptedDataFormats(Arrays.asList("xqzvszjfa")) + .withAcceptedContentEncodings(Arrays.asList("fdxxivetvtcqaqtd")); model = BinaryData.fromObject(model).toObject(TargetDescription.class); - Assertions.assertEquals("glzpswiydm", model.id()); - Assertions.assertEquals("yhz", model.name()); - Assertions.assertEquals("ss", model.description()); - Assertions.assertEquals("zmnvdfznudaod", model.acceptedDataFormats().get(0)); - Assertions.assertEquals("ucerscdntnevfi", model.acceptedContentEncodings().get(0)); + Assertions.assertEquals("rmfqjhhkxbpvj", model.id()); + Assertions.assertEquals("jhxxjyn", model.name()); + Assertions.assertEquals("divkrt", model.description()); + Assertions.assertEquals("xqzvszjfa", model.acceptedDataFormats().get(0)); + Assertions.assertEquals("fdxxivetvtcqaqtd", model.acceptedContentEncodings().get(0)); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceListResultTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceListResultTests.java deleted file mode 100644 index 005d2678a135..000000000000 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceListResultTests.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quantum.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quantum.fluent.models.QuantumWorkspaceInner; -import com.azure.resourcemanager.quantum.models.Provider; -import com.azure.resourcemanager.quantum.models.QuantumWorkspaceIdentity; -import com.azure.resourcemanager.quantum.models.ResourceIdentityType; -import com.azure.resourcemanager.quantum.models.Status; -import com.azure.resourcemanager.quantum.models.WorkspaceListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"providers\":[{\"providerId\":\"snhsjcnyejhkryh\",\"providerSku\":\"apcz\",\"instanceUri\":\"okjye\",\"applicationName\":\"kvnipjoxz\",\"provisioningState\":\"Launching\",\"resourceUsageId\":\"gejspodmailzyde\"},{\"providerId\":\"jwyahuxinpmqnja\",\"providerSku\":\"ixjsprozvcputeg\",\"instanceUri\":\"wmfdatscmdvpjhul\",\"applicationName\":\"uvm\",\"provisioningState\":\"Deleting\",\"resourceUsageId\":\"k\"}],\"usable\":\"Partial\",\"provisioningState\":\"ProviderLaunching\",\"storageAccount\":\"odjpslwejd\",\"endpointUri\":\"wryoqpsoacc\"},\"identity\":{\"principalId\":\"akl\",\"tenantId\":\"ahbc\",\"type\":\"None\"},\"location\":\"dfdosygexp\",\"tags\":{\"vdphlxaolthqtr\":\"akhmsbzjhcrz\",\"gvfcj\":\"qjbpfzfsin\",\"xjtfelluwfzit\":\"wzo\"},\"id\":\"np\",\"name\":\"qfpjk\",\"type\":\"lxofpdvhpfxxypin\"},{\"properties\":{\"providers\":[{\"providerId\":\"huyb\",\"providerSku\":\"podepoo\",\"instanceUri\":\"nuvamiheogna\",\"applicationName\":\"zxtheotusivyevcc\",\"provisioningState\":\"Succeeded\",\"resourceUsageId\":\"nhungbw\"},{\"providerId\":\"rnfygxgispem\",\"providerSku\":\"zfkufubljofx\",\"instanceUri\":\"ofjaeqjhqjb\",\"applicationName\":\"v\",\"provisioningState\":\"Succeeded\",\"resourceUsageId\":\"qulngsntnbybkzgc\"}],\"usable\":\"Yes\",\"provisioningState\":\"Succeeded\",\"storageAccount\":\"xwrljdouskcqvkoc\",\"endpointUri\":\"jdkwtnhxbnjb\"},\"identity\":{\"principalId\":\"qrglssainqpjwn\",\"tenantId\":\"ljfmppee\",\"type\":\"SystemAssigned\"},\"location\":\"xsabkyqdu\",\"tags\":{\"zdzevndh\":\"tcj\",\"feusnhut\":\"rwpdappdsbdkvwrw\"},\"id\":\"eltmrldhugjzzdat\",\"name\":\"xhocdgeablgphuti\",\"type\":\"ndv\"},{\"properties\":{\"providers\":[{\"providerId\":\"yiftyhxhuro\",\"providerSku\":\"tyxolniwpwc\",\"instanceUri\":\"jfkgiawxk\",\"applicationName\":\"ypl\",\"provisioningState\":\"Updating\",\"resourceUsageId\":\"asy\"},{\"providerId\":\"nddhsgcbacph\",\"providerSku\":\"koty\",\"instanceUri\":\"gou\",\"applicationName\":\"ndlik\",\"provisioningState\":\"Updating\",\"resourceUsageId\":\"gfgibm\"},{\"providerId\":\"gakeqsr\",\"providerSku\":\"bzqqedqytbciq\",\"instanceUri\":\"uflmm\",\"applicationName\":\"zsm\",\"provisioningState\":\"Failed\",\"resourceUsageId\":\"lougpbkw\"}],\"usable\":\"No\",\"provisioningState\":\"Failed\",\"storageAccount\":\"qktapspwgcuert\",\"endpointUri\":\"kdosvqw\"},\"identity\":{\"principalId\":\"dgbb\",\"tenantId\":\"ddgmb\",\"type\":\"SystemAssigned\"},\"location\":\"ppbhtqqrolfp\",\"tags\":{\"jaoyfhrtx\":\"algbquxigjyjg\"},\"id\":\"lnerkujysvleju\",\"name\":\"fqawrlyxw\",\"type\":\"kcprbnw\"}],\"nextLink\":\"gjvtbv\"}") - .toObject(WorkspaceListResult.class); - Assertions.assertEquals("dfdosygexp", model.value().get(0).location()); - Assertions.assertEquals("akhmsbzjhcrz", model.value().get(0).tags().get("vdphlxaolthqtr")); - Assertions.assertEquals(ResourceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("snhsjcnyejhkryh", model.value().get(0).providers().get(0).providerId()); - Assertions.assertEquals("apcz", model.value().get(0).providers().get(0).providerSku()); - Assertions.assertEquals("okjye", model.value().get(0).providers().get(0).instanceUri()); - Assertions.assertEquals("kvnipjoxz", model.value().get(0).providers().get(0).applicationName()); - Assertions.assertEquals(Status.LAUNCHING, model.value().get(0).providers().get(0).provisioningState()); - Assertions.assertEquals("gejspodmailzyde", model.value().get(0).providers().get(0).resourceUsageId()); - Assertions.assertEquals("odjpslwejd", model.value().get(0).storageAccount()); - Assertions.assertEquals("gjvtbv", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceListResult model = - new WorkspaceListResult() - .withValue( - Arrays - .asList( - new QuantumWorkspaceInner() - .withLocation("dfdosygexp") - .withTags( - mapOf( - "vdphlxaolthqtr", - "akhmsbzjhcrz", - "gvfcj", - "qjbpfzfsin", - "xjtfelluwfzit", - "wzo")) - .withIdentity(new QuantumWorkspaceIdentity().withType(ResourceIdentityType.NONE)) - .withProviders( - Arrays - .asList( - new Provider() - .withProviderId("snhsjcnyejhkryh") - .withProviderSku("apcz") - .withInstanceUri("okjye") - .withApplicationName("kvnipjoxz") - .withProvisioningState(Status.LAUNCHING) - .withResourceUsageId("gejspodmailzyde"), - new Provider() - .withProviderId("jwyahuxinpmqnja") - .withProviderSku("ixjsprozvcputeg") - .withInstanceUri("wmfdatscmdvpjhul") - .withApplicationName("uvm") - .withProvisioningState(Status.DELETING) - .withResourceUsageId("k"))) - .withStorageAccount("odjpslwejd"), - new QuantumWorkspaceInner() - .withLocation("xsabkyqdu") - .withTags(mapOf("zdzevndh", "tcj", "feusnhut", "rwpdappdsbdkvwrw")) - .withIdentity( - new QuantumWorkspaceIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withProviders( - Arrays - .asList( - new Provider() - .withProviderId("huyb") - .withProviderSku("podepoo") - .withInstanceUri("nuvamiheogna") - .withApplicationName("zxtheotusivyevcc") - .withProvisioningState(Status.SUCCEEDED) - .withResourceUsageId("nhungbw"), - new Provider() - .withProviderId("rnfygxgispem") - .withProviderSku("zfkufubljofx") - .withInstanceUri("ofjaeqjhqjb") - .withApplicationName("v") - .withProvisioningState(Status.SUCCEEDED) - .withResourceUsageId("qulngsntnbybkzgc"))) - .withStorageAccount("xwrljdouskcqvkoc"), - new QuantumWorkspaceInner() - .withLocation("ppbhtqqrolfp") - .withTags(mapOf("jaoyfhrtx", "algbquxigjyjg")) - .withIdentity( - new QuantumWorkspaceIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withProviders( - Arrays - .asList( - new Provider() - .withProviderId("yiftyhxhuro") - .withProviderSku("tyxolniwpwc") - .withInstanceUri("jfkgiawxk") - .withApplicationName("ypl") - .withProvisioningState(Status.UPDATING) - .withResourceUsageId("asy"), - new Provider() - .withProviderId("nddhsgcbacph") - .withProviderSku("koty") - .withInstanceUri("gou") - .withApplicationName("ndlik") - .withProvisioningState(Status.UPDATING) - .withResourceUsageId("gfgibm"), - new Provider() - .withProviderId("gakeqsr") - .withProviderSku("bzqqedqytbciq") - .withInstanceUri("uflmm") - .withApplicationName("zsm") - .withProvisioningState(Status.FAILED) - .withResourceUsageId("lougpbkw"))) - .withStorageAccount("qktapspwgcuert"))) - .withNextLink("gjvtbv"); - model = BinaryData.fromObject(model).toObject(WorkspaceListResult.class); - Assertions.assertEquals("dfdosygexp", model.value().get(0).location()); - Assertions.assertEquals("akhmsbzjhcrz", model.value().get(0).tags().get("vdphlxaolthqtr")); - Assertions.assertEquals(ResourceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("snhsjcnyejhkryh", model.value().get(0).providers().get(0).providerId()); - Assertions.assertEquals("apcz", model.value().get(0).providers().get(0).providerSku()); - Assertions.assertEquals("okjye", model.value().get(0).providers().get(0).instanceUri()); - Assertions.assertEquals("kvnipjoxz", model.value().get(0).providers().get(0).applicationName()); - Assertions.assertEquals(Status.LAUNCHING, model.value().get(0).providers().get(0).provisioningState()); - Assertions.assertEquals("gejspodmailzyde", model.value().get(0).providers().get(0).resourceUsageId()); - Assertions.assertEquals("odjpslwejd", model.value().get(0).storageAccount()); - Assertions.assertEquals("gjvtbv", model.nextLink()); - } - - @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/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationsCheckNameAvailabilityWithResponseMockTests.java index b2ba4d2ee15f..2c4e0e513af5 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationsCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceOperationsCheckNameAvailabilityWithResponseMockTests.java @@ -31,44 +31,30 @@ public void testCheckNameAvailabilityWithResponse() throws Exception { HttpResponse httpResponse = Mockito.mock(HttpResponse.class); ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - String responseStr = "{\"nameAvailable\":true,\"reason\":\"gmfpgvmp\",\"message\":\"as\"}"; + String responseStr = "{\"nameAvailable\":true,\"reason\":\"ncckw\",\"message\":\"zqwhxxbuyqaxzfeq\"}"; Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + AzureQuantumManager manager = AzureQuantumManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); - CheckNameAvailabilityResult response = - manager - .workspaceOperations() - .checkNameAvailabilityWithResponse( - "lgzrfzeeyeb", - new CheckNameAvailabilityParameters().withName("ikayuhqlbjbsybb").withType("r"), - com.azure.core.util.Context.NONE) - .getValue(); + CheckNameAvailabilityResult response = manager.workspaceOperations() + .checkNameAvailabilityWithResponse("beyvpnqicvinvkjj", + new CheckNameAvailabilityParameters().withName("xrbuukzclew").withType("mlwpazt"), + com.azure.core.util.Context.NONE) + .getValue(); Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("gmfpgvmp", response.reason()); + Assertions.assertEquals("ncckw", response.reason()); } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceResourcePropertiesTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceResourcePropertiesTests.java deleted file mode 100644 index 6000ff0deb9a..000000000000 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspaceResourcePropertiesTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quantum.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quantum.fluent.models.WorkspaceResourceProperties; -import com.azure.resourcemanager.quantum.models.Provider; -import com.azure.resourcemanager.quantum.models.Status; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceResourceProperties model = - BinaryData - .fromString( - "{\"providers\":[{\"providerId\":\"zntocipaouajps\",\"providerSku\":\"cmpoyfdkfogkny\",\"instanceUri\":\"ofjdde\",\"applicationName\":\"rd\",\"provisioningState\":\"Deleted\",\"resourceUsageId\":\"wnw\"},{\"providerId\":\"itjz\",\"providerSku\":\"lusarh\",\"instanceUri\":\"fcqhsmyurkd\",\"applicationName\":\"lx\",\"provisioningState\":\"Succeeded\",\"resourceUsageId\":\"k\"}],\"usable\":\"Partial\",\"provisioningState\":\"ProviderDeleting\",\"storageAccount\":\"cdm\",\"endpointUri\":\"rcryuanzwuxzdxta\"}") - .toObject(WorkspaceResourceProperties.class); - Assertions.assertEquals("zntocipaouajps", model.providers().get(0).providerId()); - Assertions.assertEquals("cmpoyfdkfogkny", model.providers().get(0).providerSku()); - Assertions.assertEquals("ofjdde", model.providers().get(0).instanceUri()); - Assertions.assertEquals("rd", model.providers().get(0).applicationName()); - Assertions.assertEquals(Status.DELETED, model.providers().get(0).provisioningState()); - Assertions.assertEquals("wnw", model.providers().get(0).resourceUsageId()); - Assertions.assertEquals("cdm", model.storageAccount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceResourceProperties model = - new WorkspaceResourceProperties() - .withProviders( - Arrays - .asList( - new Provider() - .withProviderId("zntocipaouajps") - .withProviderSku("cmpoyfdkfogkny") - .withInstanceUri("ofjdde") - .withApplicationName("rd") - .withProvisioningState(Status.DELETED) - .withResourceUsageId("wnw"), - new Provider() - .withProviderId("itjz") - .withProviderSku("lusarh") - .withInstanceUri("fcqhsmyurkd") - .withApplicationName("lx") - .withProvisioningState(Status.SUCCEEDED) - .withResourceUsageId("k"))) - .withStorageAccount("cdm"); - model = BinaryData.fromObject(model).toObject(WorkspaceResourceProperties.class); - Assertions.assertEquals("zntocipaouajps", model.providers().get(0).providerId()); - Assertions.assertEquals("cmpoyfdkfogkny", model.providers().get(0).providerSku()); - Assertions.assertEquals("ofjdde", model.providers().get(0).instanceUri()); - Assertions.assertEquals("rd", model.providers().get(0).applicationName()); - Assertions.assertEquals(Status.DELETED, model.providers().get(0).provisioningState()); - Assertions.assertEquals("wnw", model.providers().get(0).resourceUsageId()); - Assertions.assertEquals("cdm", model.storageAccount()); - } -} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesCreateOrUpdateMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesCreateOrUpdateMockTests.java deleted file mode 100644 index c78dd8e622c6..000000000000 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quantum.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.quantum.AzureQuantumManager; -import com.azure.resourcemanager.quantum.models.Provider; -import com.azure.resourcemanager.quantum.models.QuantumWorkspace; -import com.azure.resourcemanager.quantum.models.QuantumWorkspaceIdentity; -import com.azure.resourcemanager.quantum.models.ResourceIdentityType; -import com.azure.resourcemanager.quantum.models.Status; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"providers\":[{\"providerId\":\"tncormrlxqtvco\",\"providerSku\":\"dflvkg\",\"instanceUri\":\"bgdknnqv\",\"applicationName\":\"znqntoru\",\"provisioningState\":\"Updating\",\"resourceUsageId\":\"a\"}],\"usable\":\"Partial\",\"provisioningState\":\"Succeeded\",\"storageAccount\":\"rauwjuetaebu\",\"endpointUri\":\"vdmovsmzlxwabm\"},\"identity\":{\"principalId\":\"fkifr\",\"tenantId\":\"puqujmqlgkfbtn\",\"type\":\"SystemAssigned\"},\"location\":\"n\",\"tags\":{\"ujitcjedftww\":\"cn\",\"foqouicybx\":\"ezkojvdcp\"},\"id\":\"rzgszufoxci\",\"name\":\"opidoamciodh\",\"type\":\"haz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - QuantumWorkspace response = - manager - .workspaces() - .define("vfdnwnwmewzsyyce") - .withRegion("yfzqwhxxbu") - .withExistingResourceGroup("exn") - .withTags(mapOf("ztppriolxorjalto", "xzfe")) - .withIdentity(new QuantumWorkspaceIdentity().withType(ResourceIdentityType.NONE)) - .withProviders( - Arrays - .asList( - new Provider() - .withProviderId("bjudpfrxtrthzv") - .withProviderSku("tdwkqbrq") - .withInstanceUri("paxh") - .withApplicationName("iilivpdtiirqtd") - .withProvisioningState(Status.SUCCEEDED) - .withResourceUsageId("oruzfgsquyfxrxx"), - new Provider() - .withProviderId("ptramxj") - .withProviderSku("wlwnwxuqlcv") - .withInstanceUri("ypatdooaojkniod") - .withApplicationName("oebwnujhemms") - .withProvisioningState(Status.DELETING) - .withResourceUsageId("c"), - new Provider() - .withProviderId("dtjinfw") - .withProviderSku("fltkacjv") - .withInstanceUri("kdlfoa") - .withApplicationName("gkfpaga") - .withProvisioningState(Status.UPDATING) - .withResourceUsageId("lpqblylsyxk"), - new Provider() - .withProviderId("nsj") - .withProviderSku("vti") - .withInstanceUri("xsdszuempsb") - .withApplicationName("f") - .withProvisioningState(Status.FAILED) - .withResourceUsageId("v"))) - .withStorageAccount("invkjjxdxrbuu") - .create(); - - Assertions.assertEquals("n", response.location()); - Assertions.assertEquals("cn", response.tags().get("ujitcjedftww")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("tncormrlxqtvco", response.providers().get(0).providerId()); - Assertions.assertEquals("dflvkg", response.providers().get(0).providerSku()); - Assertions.assertEquals("bgdknnqv", response.providers().get(0).instanceUri()); - Assertions.assertEquals("znqntoru", response.providers().get(0).applicationName()); - Assertions.assertEquals(Status.UPDATING, response.providers().get(0).provisioningState()); - Assertions.assertEquals("a", response.providers().get(0).resourceUsageId()); - Assertions.assertEquals("rauwjuetaebu", response.storageAccount()); - } - - @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/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteMockTests.java index 1fd691eae2d4..9112c03b3f64 100644 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteMockTests.java +++ b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesDeleteMockTests.java @@ -32,30 +32,20 @@ public void testDelete() throws Exception { Mockito.when(httpResponse.getStatusCode()).thenReturn(200); Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) + Mockito.when(httpResponse.getBody()) .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) + Mockito.when(httpResponse.getBodyAsByteArray()) .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().delete("wznm", "biknsorgjhxbld", com.azure.core.util.Context.NONE); + Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { + Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); + return Mono.just(httpResponse); + })); + + AzureQuantumManager manager = AzureQuantumManager.configure().withHttpClient(httpClient).authenticate( + tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureEnvironment.AZURE)); + + manager.workspaces().delete("uxvypomgkopkwh", "jvp", com.azure.core.util.Context.NONE); + } } diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 0b8a93e712a3..000000000000 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quantum.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.quantum.AzureQuantumManager; -import com.azure.resourcemanager.quantum.models.QuantumWorkspace; -import com.azure.resourcemanager.quantum.models.ResourceIdentityType; -import com.azure.resourcemanager.quantum.models.Status; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"providers\":[{\"providerId\":\"qacpiex\",\"providerSku\":\"tg\",\"instanceUri\":\"bwoenwashrt\",\"applicationName\":\"kcnqxwbpo\",\"provisioningState\":\"Succeeded\",\"resourceUsageId\":\"iujwa\"},{\"providerId\":\"ipqiiobyuqerpq\",\"providerSku\":\"qwcciuqg\",\"instanceUri\":\"butauvfb\",\"applicationName\":\"uwhhmhykojoxafn\",\"provisioningState\":\"Launching\",\"resourceUsageId\":\"ichkoymkcdyhb\"},{\"providerId\":\"kpw\",\"providerSku\":\"eqnovvqfovl\",\"instanceUri\":\"ywsuwsy\",\"applicationName\":\"ndsytgadg\",\"provisioningState\":\"Launching\",\"resourceUsageId\":\"aeneqnzarrwl\"}],\"usable\":\"No\",\"provisioningState\":\"ProviderProvisioning\",\"storageAccount\":\"qkacewii\",\"endpointUri\":\"pubjibw\"},\"identity\":{\"principalId\":\"tohqkvpuvksgp\",\"tenantId\":\"aknynfsynljphuop\",\"type\":\"None\"},\"location\":\"qiy\",\"tags\":{\"hleosjsw\":\"rz\",\"qioxi\":\"rmslyzrpzbchckqq\"},\"id\":\"suiizynkedyat\",\"name\":\"wyhqmibzyhwits\",\"type\":\"ypyynpcdpumnzg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - QuantumWorkspace response = - manager - .workspaces() - .getByResourceGroupWithResponse("wfluszdt", "hrkwo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("qiy", response.location()); - Assertions.assertEquals("rz", response.tags().get("hleosjsw")); - Assertions.assertEquals(ResourceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("qacpiex", response.providers().get(0).providerId()); - Assertions.assertEquals("tg", response.providers().get(0).providerSku()); - Assertions.assertEquals("bwoenwashrt", response.providers().get(0).instanceUri()); - Assertions.assertEquals("kcnqxwbpo", response.providers().get(0).applicationName()); - Assertions.assertEquals(Status.SUCCEEDED, response.providers().get(0).provisioningState()); - Assertions.assertEquals("iujwa", response.providers().get(0).resourceUsageId()); - Assertions.assertEquals("qkacewii", response.storageAccount()); - } -} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesListByResourceGroupMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesListByResourceGroupMockTests.java deleted file mode 100644 index 2fd7d9da4e3e..000000000000 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesListByResourceGroupMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quantum.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.quantum.AzureQuantumManager; -import com.azure.resourcemanager.quantum.models.QuantumWorkspace; -import com.azure.resourcemanager.quantum.models.ResourceIdentityType; -import com.azure.resourcemanager.quantum.models.Status; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"providers\":[{\"providerId\":\"kzikfjawneaivxwc\",\"providerSku\":\"lpcirelsf\",\"instanceUri\":\"enwabfatk\",\"applicationName\":\"dxbjhwuaanozj\",\"provisioningState\":\"Updating\",\"resourceUsageId\":\"youlp\"},{\"providerId\":\"v\",\"providerSku\":\"glrvimjwosytxi\",\"instanceUri\":\"skfc\",\"applicationName\":\"qumiek\",\"provisioningState\":\"Deleted\",\"resourceUsageId\":\"ikh\"}],\"usable\":\"No\",\"provisioningState\":\"Failed\",\"storageAccount\":\"gqggebdunygae\",\"endpointUri\":\"db\"},\"identity\":{\"principalId\":\"t\",\"tenantId\":\"llrxcyjmoad\",\"type\":\"None\"},\"location\":\"r\",\"tags\":{\"hhyxxrw\":\"dmjsjqb\",\"duhpk\":\"yc\",\"hky\":\"kgymareqnajxqug\",\"sofwqmzqalkrmnji\":\"ubeddg\"},\"id\":\"pxacqqudfn\",\"name\":\"yxbaaabjyvayf\",\"type\":\"imrzrtuzqog\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workspaces().listByResourceGroup("fnjhfjxwmszkkfo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("r", response.iterator().next().location()); - Assertions.assertEquals("dmjsjqb", response.iterator().next().tags().get("hhyxxrw")); - Assertions.assertEquals(ResourceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("kzikfjawneaivxwc", response.iterator().next().providers().get(0).providerId()); - Assertions.assertEquals("lpcirelsf", response.iterator().next().providers().get(0).providerSku()); - Assertions.assertEquals("enwabfatk", response.iterator().next().providers().get(0).instanceUri()); - Assertions.assertEquals("dxbjhwuaanozj", response.iterator().next().providers().get(0).applicationName()); - Assertions.assertEquals(Status.UPDATING, response.iterator().next().providers().get(0).provisioningState()); - Assertions.assertEquals("youlp", response.iterator().next().providers().get(0).resourceUsageId()); - Assertions.assertEquals("gqggebdunygae", response.iterator().next().storageAccount()); - } -} diff --git a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesListMockTests.java b/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesListMockTests.java deleted file mode 100644 index 86c21d798c05..000000000000 --- a/sdk/quantum/azure-resourcemanager-quantum/src/test/java/com/azure/resourcemanager/quantum/generated/WorkspacesListMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quantum.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.quantum.AzureQuantumManager; -import com.azure.resourcemanager.quantum.models.QuantumWorkspace; -import com.azure.resourcemanager.quantum.models.ResourceIdentityType; -import com.azure.resourcemanager.quantum.models.Status; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"providers\":[{\"providerId\":\"lkdmtncvokotllxd\",\"providerSku\":\"gsyocogj\",\"instanceUri\":\"dtbnnha\",\"applicationName\":\"ocrkvcikh\",\"provisioningState\":\"Failed\",\"resourceUsageId\":\"mqg\"},{\"providerId\":\"queziky\",\"providerSku\":\"gxk\",\"instanceUri\":\"la\",\"applicationName\":\"elwuipi\",\"provisioningState\":\"Deleted\",\"resourceUsageId\":\"kzivgvvcnayrh\"}],\"usable\":\"Partial\",\"provisioningState\":\"ProviderDeleting\",\"storageAccount\":\"ueedndrdvs\",\"endpointUri\":\"wq\"},\"identity\":{\"principalId\":\"healmfmtda\",\"tenantId\":\"gdv\",\"type\":\"None\"},\"location\":\"iohgwxrtfud\",\"tags\":{\"qagvrvm\":\"xg\"},\"id\":\"pkukghi\",\"name\":\"dblx\",\"type\":\"wi\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - AzureQuantumManager manager = - AzureQuantumManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.workspaces().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("iohgwxrtfud", response.iterator().next().location()); - Assertions.assertEquals("xg", response.iterator().next().tags().get("qagvrvm")); - Assertions.assertEquals(ResourceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("lkdmtncvokotllxd", response.iterator().next().providers().get(0).providerId()); - Assertions.assertEquals("gsyocogj", response.iterator().next().providers().get(0).providerSku()); - Assertions.assertEquals("dtbnnha", response.iterator().next().providers().get(0).instanceUri()); - Assertions.assertEquals("ocrkvcikh", response.iterator().next().providers().get(0).applicationName()); - Assertions.assertEquals(Status.FAILED, response.iterator().next().providers().get(0).provisioningState()); - Assertions.assertEquals("mqg", response.iterator().next().providers().get(0).resourceUsageId()); - Assertions.assertEquals("ueedndrdvs", response.iterator().next().storageAccount()); - } -}