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