Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Automation] Generate Fluent Lite from quantum#package-2023-11-13-preview #39245

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions sdk/quantum/azure-resourcemanager-quantum/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.2 (2024-03-15)

- Azure Resource Manager AzureQuantum client library for Java. This package contains Microsoft Azure SDK for AzureQuantum Management SDK. Package tag package-2023-11-13-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

### Breaking Changes
* `models.ApiKey` was added

* `models.ApiKeys` was added

* `models.ListKeysResult` was added

* `models.KeyType` was added

#### `models.QuantumWorkspace$Definition` was modified

* `withApiKeyEnabled(java.lang.Boolean)` was added

#### `models.WorkspaceOperations` was modified

* `regenerateKeysWithResponse(java.lang.String,java.lang.String,models.ApiKeys,com.azure.core.util.Context)` was added
* `listKeys(java.lang.String,java.lang.String)` was added
* `listKeysWithResponse(java.lang.String,java.lang.String,com.azure.core.util.Context)` was added
* `regenerateKeys(java.lang.String,java.lang.String,models.ApiKeys)` was added

### Bugs Fixed
#### `models.QuantumWorkspace` was modified

### Other Changes
* `apiKeyEnabled()` was added

## 1.0.0-beta.1 (2023-07-21)

Expand Down
8 changes: 4 additions & 4 deletions sdk/quantum/azure-resourcemanager-quantum/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager AzureQuantum client library for Java.

This package contains Microsoft Azure SDK for AzureQuantum Management SDK. Package tag package-2022-01-10-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for AzureQuantum Management SDK. Package tag package-2023-11-13-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-quantum</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
Expand Down
187 changes: 127 additions & 60 deletions sdk/quantum/azure-resourcemanager-quantum/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
## WorkspaceOperation

- [CheckNameAvailability](#workspaceoperation_checknameavailability)
- [ListKeys](#workspaceoperation_listkeys)
- [RegenerateKeys](#workspaceoperation_regeneratekeys)

## Workspaces

Expand All @@ -24,14 +26,17 @@
### Offerings_List

```java
/** Samples for Offerings List. */
/**
* Samples for Offerings List.
*/
public final class OfferingsListSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/offeringsList.json
* x-ms-original-file:
* specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/offeringsList.json
*/
/**
* Sample code: OfferingsList.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void offeringsList(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
Expand All @@ -43,14 +48,17 @@ public final class OfferingsListSamples {
### Operations_List

```java
/** Samples for Operations List. */
/**
* Samples for Operations List.
*/
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/operations.json
* x-ms-original-file:
* specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/operations.json
*/
/**
* Sample code: Operations.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void operations(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
Expand All @@ -64,58 +72,106 @@ public final class OperationsListSamples {
```java
import com.azure.resourcemanager.quantum.models.CheckNameAvailabilityParameters;

/** Samples for WorkspaceOperation CheckNameAvailability. */
/**
* Samples for WorkspaceOperation CheckNameAvailability.
*/
public final class WorkspaceOperationCheckNameAvailabilitySamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesCheckNameAvailability.json
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/
* quantumWorkspacesCheckNameAvailability.json
*/
/**
* Sample code: QuantumWorkspacesCheckNameAvailability.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void quantumWorkspacesCheckNameAvailability(
com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager
.workspaceOperations()
.checkNameAvailabilityWithResponse(
"westus2",
new CheckNameAvailabilityParameters()
.withName("sample-workspace-name")
.withType("Microsoft.Quantum/Workspaces"),
public static void
quantumWorkspacesCheckNameAvailability(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager.workspaceOperations()
.checkNameAvailabilityWithResponse("westus2", new CheckNameAvailabilityParameters()
.withName("sample-workspace-name").withType("Microsoft.Quantum/Workspaces"),
com.azure.core.util.Context.NONE);
}
}
```

### WorkspaceOperation_ListKeys

```java
/**
* Samples for WorkspaceOperation ListKeys.
*/
public final class WorkspaceOperationListKeysSamples {
/*
* x-ms-original-file:
* specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/listKeys.json
*/
/**
* Sample code: ListKeys.
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void listKeys(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager.workspaceOperations().listKeysWithResponse("quantumResourcegroup", "quantumworkspace1",
com.azure.core.util.Context.NONE);
}
}
```

### WorkspaceOperation_RegenerateKeys

```java
import com.azure.resourcemanager.quantum.models.ApiKeys;
import com.azure.resourcemanager.quantum.models.KeyType;
import java.util.Arrays;

/**
* Samples for WorkspaceOperation RegenerateKeys.
*/
public final class WorkspaceOperationRegenerateKeysSamples {
/*
* x-ms-original-file:
* specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/regenerateKey.json
*/
/**
* Sample code: RegenerateKey.
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void regenerateKey(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager.workspaceOperations().regenerateKeysWithResponse("quantumResourcegroup", "quantumworkspace1",
new ApiKeys().withKeys(Arrays.asList(KeyType.PRIMARY, KeyType.SECONDARY)),
com.azure.core.util.Context.NONE);
}
}
```

### Workspaces_CreateOrUpdate

```java
import com.azure.resourcemanager.quantum.models.Provider;
import java.util.Arrays;

/** Samples for Workspaces CreateOrUpdate. */
/**
* Samples for Workspaces CreateOrUpdate.
*/
public final class WorkspacesCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesPut.json
* x-ms-original-file:
* specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/quantumWorkspacesPut
* .json
*/
/**
* Sample code: QuantumWorkspacesPut.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void quantumWorkspacesPut(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager
.workspaces()
.define("quantumworkspace1")
.withRegion("West US")
manager.workspaces().define("quantumworkspace1").withRegion("West US")
.withExistingResourceGroup("quantumResourcegroup")
.withProviders(
Arrays
.asList(
new Provider().withProviderId("Honeywell").withProviderSku("Basic"),
new Provider().withProviderId("IonQ").withProviderSku("Basic"),
new Provider().withProviderId("OneQBit").withProviderSku("Basic")))
.withProviders(Arrays.asList(new Provider().withProviderId("Honeywell").withProviderSku("Basic"),
new Provider().withProviderId("IonQ").withProviderSku("Basic"),
new Provider().withProviderId("OneQBit").withProviderSku("Basic")))
.withStorageAccount(
"/subscriptions/1C4B2828-7D49-494F-933D-061373BE28C2/resourceGroups/quantumResourcegroup/providers/Microsoft.Storage/storageAccounts/testStorageAccount")
.create();
Expand All @@ -126,14 +182,17 @@ public final class WorkspacesCreateOrUpdateSamples {
### Workspaces_Delete

```java
/** Samples for Workspaces Delete. */
/**
* Samples for Workspaces Delete.
*/
public final class WorkspacesDeleteSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesDelete.json
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/
* quantumWorkspacesDelete.json
*/
/**
* Sample code: QuantumWorkspacesDelete.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void quantumWorkspacesDelete(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
Expand All @@ -145,40 +204,45 @@ public final class WorkspacesDeleteSamples {
### Workspaces_GetByResourceGroup

```java
/** Samples for Workspaces GetByResourceGroup. */
/**
* Samples for Workspaces GetByResourceGroup.
*/
public final class WorkspacesGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesGet.json
* x-ms-original-file:
* specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/quantumWorkspacesGet
* .json
*/
/**
* Sample code: QuantumWorkspacesGet.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void quantumWorkspacesGet(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager
.workspaces()
.getByResourceGroupWithResponse(
"quantumResourcegroup", "quantumworkspace1", com.azure.core.util.Context.NONE);
manager.workspaces().getByResourceGroupWithResponse("quantumResourcegroup", "quantumworkspace1",
com.azure.core.util.Context.NONE);
}
}
```

### Workspaces_List

```java
/** Samples for Workspaces List. */
/**
* Samples for Workspaces List.
*/
public final class WorkspacesListSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesListSubscription.json
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/
* quantumWorkspacesListSubscription.json
*/
/**
* Sample code: QuantumWorkspacesListBySubscription.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void quantumWorkspacesListBySubscription(
com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
public static void
quantumWorkspacesListBySubscription(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager.workspaces().list(com.azure.core.util.Context.NONE);
}
}
Expand All @@ -187,18 +251,21 @@ public final class WorkspacesListSamples {
### Workspaces_ListByResourceGroup

```java
/** Samples for Workspaces ListByResourceGroup. */
/**
* Samples for Workspaces ListByResourceGroup.
*/
public final class WorkspacesListByResourceGroupSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesListResourceGroup.json
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/
* quantumWorkspacesListResourceGroup.json
*/
/**
* Sample code: QuantumWorkspacesListByResourceGroup.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void quantumWorkspacesListByResourceGroup(
com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
public static void
quantumWorkspacesListByResourceGroup(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
manager.workspaces().listByResourceGroup("quantumResourcegroup", com.azure.core.util.Context.NONE);
}
}
Expand All @@ -211,26 +278,26 @@ import com.azure.resourcemanager.quantum.models.QuantumWorkspace;
import java.util.HashMap;
import java.util.Map;

/** Samples for Workspaces UpdateTags. */
/**
* Samples for Workspaces UpdateTags.
*/
public final class WorkspacesUpdateTagsSamples {
/*
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2022-01-10-preview/examples/quantumWorkspacesPatch.json
* x-ms-original-file: specification/quantum/resource-manager/Microsoft.Quantum/preview/2023-11-13-preview/examples/
* quantumWorkspacesPatch.json
*/
/**
* Sample code: QuantumWorkspacesPatchTags.
*
*
* @param manager Entry point to AzureQuantumManager.
*/
public static void quantumWorkspacesPatchTags(com.azure.resourcemanager.quantum.AzureQuantumManager manager) {
QuantumWorkspace resource =
manager
.workspaces()
.getByResourceGroupWithResponse(
"quantumResourcegroup", "quantumworkspace1", com.azure.core.util.Context.NONE)
.getValue();
QuantumWorkspace resource = manager.workspaces().getByResourceGroupWithResponse("quantumResourcegroup",
"quantumworkspace1", com.azure.core.util.Context.NONE).getValue();
resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
Expand Down
Loading