Skip to content
Closed
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
4 changes: 3 additions & 1 deletion sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2023-04-17)

- Azure Resource Manager Healthbot client library for Java. This package contains Microsoft Azure SDK for Healthbot Management SDK. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2022-08-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
27 changes: 15 additions & 12 deletions sdk/healthbot/azure-resourcemanager-healthbot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Healthbot client library for Java.

This package contains Microsoft Azure SDK for Healthbot Management SDK. Microsoft Healthcare Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2020-12-08. 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 Healthbot Management SDK. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2022-08-08. 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-healthbot</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -41,19 +41,19 @@ Various documentation is available to help you get started

Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.

[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.

### Authentication

By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
By default, Azure Active Directory 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.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.

In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

With above configuration, `azure` client can be authenticated by following code:
With above configuration, `azure` client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on

## Contributing

For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
For details on contributing to this repository, see the [contributing guide][cg].

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.microsoft.com>.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact <opencode@microsoft.com> with any additional questions or comments.

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
Expand All @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
109 changes: 85 additions & 24 deletions sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- [GetByResourceGroup](#bots_getbyresourcegroup)
- [List](#bots_list)
- [ListByResourceGroup](#bots_listbyresourcegroup)
- [ListSecrets](#bots_listsecrets)
- [RegenerateApiJwtSecret](#bots_regenerateapijwtsecret)
- [Update](#bots_update)

## Operations
Expand All @@ -16,13 +18,18 @@
### Bots_Create

```java
import com.azure.resourcemanager.healthbot.models.Identity;
import com.azure.resourcemanager.healthbot.models.ResourceIdentityType;
import com.azure.resourcemanager.healthbot.models.Sku;
import com.azure.resourcemanager.healthbot.models.SkuName;
import com.azure.resourcemanager.healthbot.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;

/** Samples for Bots Create. */
public final class BotsCreateSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/ResourceCreationPut.json
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceCreationPut.json
*/
/**
* Sample code: BotCreate.
Expand All @@ -36,107 +43,160 @@ public final class BotsCreateSamples {
.withRegion("East US")
.withExistingResourceGroup("healthbotClient")
.withSku(new Sku().withName(SkuName.F0))
.withIdentity(
new Identity()
.withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
.withUserAssignedIdentities(
mapOf(
"/subscriptions/subscription-id/resourcegroups/myrg/providers/microsoft.managedidentity/userassignedidentities/my-mi",
new UserAssignedIdentity(),
"/subscriptions/subscription-id/resourcegroups/myrg/providers/microsoft.managedidentity/userassignedidentities/my-mi2",
new UserAssignedIdentity())))
.create();
}

@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
```

### Bots_Delete

```java
import com.azure.core.util.Context;

/** Samples for Bots Delete. */
public final class BotsDeleteSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/ResourceDeletionDelete.json
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceDeletionDelete.json
*/
/**
* Sample code: BotDelete.
*
* @param manager Entry point to HealthbotManager.
*/
public static void botDelete(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
manager.bots().delete("healthbotClient", "samplebotname", Context.NONE);
manager.bots().delete("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
}
}
```

### Bots_GetByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for Bots GetByResourceGroup. */
public final class BotsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/ResourceInfoGet.json
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceInfoGet.json
*/
/**
* Sample code: ResourceInfoGet.
*
* @param manager Entry point to HealthbotManager.
*/
public static void resourceInfoGet(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
manager.bots().getByResourceGroupWithResponse("healthbotClient", "samplebotname", Context.NONE);
manager
.bots()
.getByResourceGroupWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
}
}
```

### Bots_List

```java
import com.azure.core.util.Context;

/** Samples for Bots List. */
public final class BotsListSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/ListBotsBySubscription.json
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ListBotsBySubscription.json
*/
/**
* Sample code: List Bots by Subscription.
*
* @param manager Entry point to HealthbotManager.
*/
public static void listBotsBySubscription(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
manager.bots().list(Context.NONE);
manager.bots().list(com.azure.core.util.Context.NONE);
}
}
```

### Bots_ListByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for Bots ListByResourceGroup. */
public final class BotsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/ListBotsByResourceGroup.json
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ListBotsByResourceGroup.json
*/
/**
* Sample code: List Bots by Resource Group.
*
* @param manager Entry point to HealthbotManager.
*/
public static void listBotsByResourceGroup(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
manager.bots().listByResourceGroup("OneResourceGroupName", Context.NONE);
manager.bots().listByResourceGroup("OneResourceGroupName", com.azure.core.util.Context.NONE);
}
}
```

### Bots_ListSecrets

```java
/** Samples for Bots ListSecrets. */
public final class BotsListSecretsSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ListSecrets.json
*/
/**
* Sample code: Bot List Secrets.
*
* @param manager Entry point to HealthbotManager.
*/
public static void botListSecrets(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
manager.bots().listSecretsWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
}
}
```

### Bots_RegenerateApiJwtSecret

```java
/** Samples for Bots RegenerateApiJwtSecret. */
public final class BotsRegenerateApiJwtSecretSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/RegenerateApiJwtSecret.json
*/
/**
* Sample code: Bot Regenerate API JWT Secret.
*
* @param manager Entry point to HealthbotManager.
*/
public static void botRegenerateAPIJWTSecret(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
manager
.bots()
.regenerateApiJwtSecretWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
}
}
```

### Bots_Update

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.healthbot.models.HealthBot;
import com.azure.resourcemanager.healthbot.models.Sku;
import com.azure.resourcemanager.healthbot.models.SkuName;

/** Samples for Bots Update. */
public final class BotsUpdateSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/ResourceUpdatePatch.json
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceUpdatePatch.json
*/
/**
* Sample code: BotUpdate.
Expand All @@ -145,7 +205,10 @@ public final class BotsUpdateSamples {
*/
public static void botUpdate(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
HealthBot resource =
manager.bots().getByResourceGroupWithResponse("healthbotClient", "samplebotname", Context.NONE).getValue();
manager
.bots()
.getByResourceGroupWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withSku(new Sku().withName(SkuName.F0)).apply();
}
}
Expand All @@ -154,20 +217,18 @@ public final class BotsUpdateSamples {
### Operations_List

```java
import com.azure.core.util.Context;

/** Samples for Operations List. */
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/GetOperations.json
* x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/GetOperations.json
*/
/**
* Sample code: Get Operations.
*
* @param manager Entry point to HealthbotManager.
*/
public static void getOperations(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
manager.operations().list(Context.NONE);
manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```
Expand Down
10 changes: 8 additions & 2 deletions sdk/healthbot/azure-resourcemanager-healthbot/pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand All @@ -13,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Healthbot Management</name>
<description>This package contains Microsoft Azure SDK for Healthbot Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft Healthcare Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2020-12-08.</description>
<description>This package contains Microsoft Azure SDK for Healthbot Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2022-08-08.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -38,7 +43,8 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import java.util.stream.Collectors;

/**
* Entry point to HealthbotManager. Microsoft Healthcare Bot is a cloud platform that empowers developers in Healthcare
* Entry point to HealthbotManager. Azure Health Bot is a cloud platform that empowers developers in Healthcare
* organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help
* them improve processes and reduce costs.
*/
Expand Down Expand Up @@ -211,7 +211,7 @@ public HealthbotManager authenticate(TokenCredential credential, AzureProfile pr
.append("-")
.append("com.azure.resourcemanager.healthbot")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Loading