diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md b/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md
index 6ab2980031345..055ad24d548ba 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md
@@ -1,5 +1,9 @@
# Release History
+## 1.0.0-beta.1 (2022-01-05)
+
+- 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-2021-06-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
## 1.0.0-beta.2 (2021-02-09)
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/README.md b/sdk/healthbot/azure-resourcemanager-healthbot/README.md
index 3b982e52b9d1c..f3d35d828c11d 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/README.md
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/README.md
@@ -2,7 +2,21 @@
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-2021-06-10. 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
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
## Getting started
@@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for Healthbot Management SDK. Microsof
com.azure.resourcemanager
azure-resourcemanager-healthbot
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -60,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
@@ -75,6 +92,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request
+[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/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md b/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md
new file mode 100644
index 0000000000000..4894a7c36d30c
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md
@@ -0,0 +1,199 @@
+# Code snippets and samples
+
+
+## Bots
+
+- [Create](#bots_create)
+- [Delete](#bots_delete)
+- [GetByResourceGroup](#bots_getbyresourcegroup)
+- [List](#bots_list)
+- [ListByResourceGroup](#bots_listbyresourcegroup)
+- [Update](#bots_update)
+
+## Operations
+
+- [List](#operations_list)
+### 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/2021-06-10/examples/ResourceCreationPut.json
+ */
+ /**
+ * Sample code: BotCreate.
+ *
+ * @param manager Entry point to HealthbotManager.
+ */
+ public static void botCreate(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
+ manager
+ .bots()
+ .define("samplebotname")
+ .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 Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### 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/2021-06-10/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);
+ }
+}
+```
+
+### 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/2021-06-10/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);
+ }
+}
+```
+
+### 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/2021-06-10/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);
+ }
+}
+```
+
+### 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/2021-06-10/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);
+ }
+}
+```
+
+### 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/2021-06-10/examples/ResourceUpdatePatch.json
+ */
+ /**
+ * Sample code: BotUpdate.
+ *
+ * @param manager Entry point to HealthbotManager.
+ */
+ public static void botUpdate(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
+ HealthBot resource =
+ manager.bots().getByResourceGroupWithResponse("healthbotClient", "samplebotname", Context.NONE).getValue();
+ resource.update().withSku(new Sku().withName(SkuName.F0)).apply();
+ }
+}
+```
+
+### 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/2021-06-10/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);
+ }
+}
+```
+
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml b/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml
index 0b7475005ea04..f2147fc4a216b 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml
@@ -1,53 +1,81 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-healthbot
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-healthbot
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for Healthbot Management
- 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 https://aka.ms/azsdk/java/mgmt
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for Healthbot Management
+ 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-2021-06-10.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
false
-
-
-
- com.azure
- azure-core-management
- 1.4.4
-
-
+
+
+
+ com.azure
+ azure-core
+ 1.23.1
+
+
+ com.azure
+ azure-core-management
+ 1.4.4
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java
index 483026bec231a..856215351355e 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -31,9 +32,10 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+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.
*/
@@ -85,6 +87,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -124,6 +127,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -160,25 +174,53 @@ public HealthbotManager authenticate(TokenCredential credential, AzureProfile pr
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.healthbot")
+ .append("/")
+ .append("1.0.0-beta.1");
+ 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)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
- policies
- .add(
- new UserAgentPolicy(
- null,
- "com.azure.resourcemanager.healthbot",
- "1.0.0-beta.1",
- Configuration.getGlobalConfiguration()));
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ 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
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java
index 344b867f20d94..90572c41813e8 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java
@@ -17,61 +17,61 @@
/** An instance of this class provides access to all the operations defined in BotsClient. */
public interface BotsClient {
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, HealthBotInner> beginCreate(
String resourceGroupName, String botName, HealthBotInner parameters);
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, HealthBotInner> beginCreate(
String resourceGroupName, String botName, HealthBotInner parameters, Context context);
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
HealthBotInner create(String resourceGroupName, String botName, HealthBotInner parameters);
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
HealthBotInner create(String resourceGroupName, String botName, HealthBotInner parameters, Context context);
@@ -108,11 +108,11 @@ SyncPoller, HealthBotInner> beginCreate(
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the required bot.
+ * @param parameters The parameters to provide for the required Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
HealthBotInner update(String resourceGroupName, String botName, HealthBotUpdateParameters parameters);
@@ -122,12 +122,12 @@ SyncPoller, HealthBotInner> beginCreate(
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the required bot.
+ * @param parameters The parameters to provide for the required Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
@@ -143,7 +143,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String botName);
/**
@@ -157,7 +157,7 @@ Response updateWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String botName, Context context);
/**
@@ -192,7 +192,7 @@ Response updateWithResponse(
* @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 list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -205,7 +205,7 @@ Response updateWithResponse(
* @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 list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -215,7 +215,7 @@ Response updateWithResponse(
*
* @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 Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -227,7 +227,7 @@ Response updateWithResponse(
* @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 list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java
index 10d4170d5bc0a..ed51ac032ef23 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java
@@ -13,7 +13,7 @@
/** An instance of this class provides access to all the operations defined in OperationsClient. */
public interface OperationsClient {
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot 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.
@@ -23,7 +23,7 @@ public interface OperationsClient {
PagedIterable list();
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotInner.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotInner.java
index 52180a9249f5c..da21956202ce2 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotInner.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotInner.java
@@ -8,30 +8,38 @@
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.healthbot.models.HealthBotProperties;
+import com.azure.resourcemanager.healthbot.models.Identity;
import com.azure.resourcemanager.healthbot.models.Sku;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** HealthBot resource definition. */
+/** Azure Health Bot resource definition. */
@Fluent
public final class HealthBotInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(HealthBotInner.class);
/*
- * SKU of the HealthBot.
+ * SKU of the Azure Health Bot.
*/
@JsonProperty(value = "sku", required = true)
private Sku sku;
/*
- * The set of properties specific to Healthbot resource.
+ * The identity of the Azure Health Bot.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /*
+ * HealthBotProperties The set of properties specific to Azure Health Bot
+ * resource.
*/
@JsonProperty(value = "properties")
private HealthBotProperties properties;
/**
- * Get the sku property: SKU of the HealthBot.
+ * Get the sku property: SKU of the Azure Health Bot.
*
* @return the sku value.
*/
@@ -40,7 +48,7 @@ public Sku sku() {
}
/**
- * Set the sku property: SKU of the HealthBot.
+ * Set the sku property: SKU of the Azure Health Bot.
*
* @param sku the sku value to set.
* @return the HealthBotInner object itself.
@@ -51,7 +59,27 @@ public HealthBotInner withSku(Sku sku) {
}
/**
- * Get the properties property: The set of properties specific to Healthbot resource.
+ * Get the identity property: The identity of the Azure Health Bot.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the Azure Health Bot.
+ *
+ * @param identity the identity value to set.
+ * @return the HealthBotInner object itself.
+ */
+ public HealthBotInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the properties property: HealthBotProperties The set of properties specific to Azure Health Bot resource.
*
* @return the properties value.
*/
@@ -60,7 +88,7 @@ public HealthBotProperties properties() {
}
/**
- * Set the properties property: The set of properties specific to Healthbot resource.
+ * Set the properties property: HealthBotProperties The set of properties specific to Azure Health Bot resource.
*
* @param properties the properties value to set.
* @return the HealthBotInner object itself.
@@ -97,6 +125,9 @@ public void validate() {
} else {
sku().validate();
}
+ if (identity() != null) {
+ identity().validate();
+ }
if (properties() != null) {
properties().validate();
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/package-info.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/package-info.java
index 54b6d2f08cd3b..b0fc562deb155 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/package-info.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/package-info.java
@@ -3,8 +3,8 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the inner data models for HealthbotClient. 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 containing the inner data models for HealthbotClient. 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 com.azure.resourcemanager.healthbot.fluent.models;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/package-info.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/package-info.java
index ba5755fdd6fe9..82366856f48fb 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/package-info.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/package-info.java
@@ -3,8 +3,8 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the service clients for HealthbotClient. 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 containing the service clients for HealthbotClient. 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 com.azure.resourcemanager.healthbot.fluent;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsClientImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsClientImpl.java
index 8564037ef467c..cb74e45d692b1 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsClientImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsClientImpl.java
@@ -177,15 +177,15 @@ Mono> listNext(
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -228,20 +228,20 @@ private Mono>> createWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -285,39 +285,43 @@ private Mono>> createWithResponseAsync(
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, HealthBotInner> beginCreateAsync(
String resourceGroupName, String botName, HealthBotInner parameters) {
Mono>> mono = createWithResponseAsync(resourceGroupName, botName, parameters);
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), HealthBotInner.class, HealthBotInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ HealthBotInner.class,
+ HealthBotInner.class,
+ this.client.getContext());
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, HealthBotInner> beginCreateAsync(
String resourceGroupName, String botName, HealthBotInner parameters, Context context) {
context = this.client.mergeContext(context);
@@ -330,50 +334,50 @@ private PollerFlux, HealthBotInner> beginCreateAsync(
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, HealthBotInner> beginCreate(
String resourceGroupName, String botName, HealthBotInner parameters) {
return beginCreateAsync(resourceGroupName, botName, parameters).getSyncPoller();
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, HealthBotInner> beginCreate(
String resourceGroupName, String botName, HealthBotInner parameters, Context context) {
return beginCreateAsync(resourceGroupName, botName, parameters, context).getSyncPoller();
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(String resourceGroupName, String botName, HealthBotInner parameters) {
@@ -383,16 +387,16 @@ private Mono createAsync(String resourceGroupName, String botNam
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -403,15 +407,15 @@ private Mono createAsync(
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public HealthBotInner create(String resourceGroupName, String botName, HealthBotInner parameters) {
@@ -419,16 +423,16 @@ public HealthBotInner create(String resourceGroupName, String botName, HealthBot
}
/**
- * Create a new HealthBot.
+ * Create a new Azure Health Bot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the created bot.
+ * @param parameters The parameters to provide for the created Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public HealthBotInner create(String resourceGroupName, String botName, HealthBotInner parameters, Context context) {
@@ -480,7 +484,7 @@ private Mono> getByResourceGroupWithResponseAsync(
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -589,11 +593,11 @@ public Response getByResourceGroupWithResponse(
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the required bot.
+ * @param parameters The parameters to provide for the required Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -636,7 +640,7 @@ private Mono> updateWithResponseAsync(
parameters,
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -644,12 +648,12 @@ private Mono> updateWithResponseAsync(
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the required bot.
+ * @param parameters The parameters to provide for the required Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> updateWithResponseAsync(
@@ -697,11 +701,11 @@ private Mono> updateWithResponseAsync(
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the required bot.
+ * @param parameters The parameters to provide for the required Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -722,11 +726,11 @@ private Mono updateAsync(
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the required bot.
+ * @param parameters The parameters to provide for the required Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public HealthBotInner update(String resourceGroupName, String botName, HealthBotUpdateParameters parameters) {
@@ -738,12 +742,12 @@ public HealthBotInner update(String resourceGroupName, String botName, HealthBot
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param parameters The parameters to provide for the required bot.
+ * @param parameters The parameters to provide for the required Azure Health Bot.
* @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 healthBot resource definition.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response updateWithResponse(
@@ -795,7 +799,7 @@ private Mono>> deleteWithResponseAsync(String resource
this.client.getApiVersion(),
accept,
context))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -854,12 +858,13 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String botName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, botName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -873,7 +878,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String botName, Context context) {
context = this.client.mergeContext(context);
@@ -893,7 +898,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String botName) {
return beginDeleteAsync(resourceGroupName, botName).getSyncPoller();
}
@@ -909,7 +914,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String botName, Context context) {
return beginDeleteAsync(resourceGroupName, botName, context).getSyncPoller();
}
@@ -983,7 +988,7 @@ public void delete(String resourceGroupName, String botName, Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -1024,7 +1029,7 @@ private Mono> listByResourceGroupSinglePageAsync(S
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1035,7 +1040,7 @@ private Mono> listByResourceGroupSinglePageAsync(S
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -1084,7 +1089,7 @@ private Mono> listByResourceGroupSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -1101,7 +1106,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -1117,7 +1122,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupN
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -1132,7 +1137,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -1144,7 +1149,7 @@ public PagedIterable listByResourceGroup(String resourceGroupNam
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -1180,7 +1185,7 @@ private Mono> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1190,7 +1195,7 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -1231,7 +1236,7 @@ private Mono> listSinglePageAsync(Context context)
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -1245,7 +1250,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -1258,7 +1263,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -1272,7 +1277,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -1286,7 +1291,7 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -1312,7 +1317,7 @@ private Mono> listByResourceGroupNextSinglePageAsy
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1323,7 +1328,7 @@ private Mono> listByResourceGroupNextSinglePageAsy
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(
@@ -1359,7 +1364,7 @@ private Mono> listByResourceGroupNextSinglePageAsy
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -1384,7 +1389,7 @@ private Mono> listNextSinglePageAsync(String nextL
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -1395,7 +1400,7 @@ private Mono> listNextSinglePageAsync(String nextL
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink, Context context) {
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsImpl.java
index 83dbe3ea18022..7a454609d1415 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/BotsImpl.java
@@ -9,7 +9,6 @@
import com.azure.core.http.rest.SimpleResponse;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.healthbot.HealthbotManager;
import com.azure.resourcemanager.healthbot.fluent.BotsClient;
import com.azure.resourcemanager.healthbot.fluent.models.HealthBotInner;
import com.azure.resourcemanager.healthbot.models.Bots;
@@ -21,9 +20,9 @@ public final class BotsImpl implements Bots {
private final BotsClient innerClient;
- private final HealthbotManager serviceManager;
+ private final com.azure.resourcemanager.healthbot.HealthbotManager serviceManager;
- public BotsImpl(BotsClient innerClient, HealthbotManager serviceManager) {
+ public BotsImpl(BotsClient innerClient, com.azure.resourcemanager.healthbot.HealthbotManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -62,22 +61,22 @@ public void delete(String resourceGroupName, String botName, Context context) {
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return inner.mapPage(inner1 -> new HealthBotImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return inner.mapPage(inner1 -> new HealthBotImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return inner.mapPage(inner1 -> new HealthBotImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return inner.mapPage(inner1 -> new HealthBotImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
}
public HealthBot getById(String id) {
@@ -160,7 +159,7 @@ private BotsClient serviceClient() {
return this.innerClient;
}
- private HealthbotManager manager() {
+ private com.azure.resourcemanager.healthbot.HealthbotManager manager() {
return this.serviceManager;
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotImpl.java
index 70344df49af8b..091ac2b420512 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotImpl.java
@@ -6,11 +6,11 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
-import com.azure.resourcemanager.healthbot.HealthbotManager;
import com.azure.resourcemanager.healthbot.fluent.models.HealthBotInner;
import com.azure.resourcemanager.healthbot.models.HealthBot;
import com.azure.resourcemanager.healthbot.models.HealthBotProperties;
import com.azure.resourcemanager.healthbot.models.HealthBotUpdateParameters;
+import com.azure.resourcemanager.healthbot.models.Identity;
import com.azure.resourcemanager.healthbot.models.Sku;
import java.util.Collections;
import java.util.Map;
@@ -18,7 +18,7 @@
public final class HealthBotImpl implements HealthBot, HealthBot.Definition, HealthBot.Update {
private HealthBotInner innerObject;
- private final HealthbotManager serviceManager;
+ private final com.azure.resourcemanager.healthbot.HealthbotManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -49,6 +49,10 @@ public Sku sku() {
return this.innerModel().sku();
}
+ public Identity identity() {
+ return this.innerModel().identity();
+ }
+
public HealthBotProperties properties() {
return this.innerModel().properties();
}
@@ -65,7 +69,7 @@ public HealthBotInner innerModel() {
return this.innerObject;
}
- private HealthbotManager manager() {
+ private com.azure.resourcemanager.healthbot.HealthbotManager manager() {
return this.serviceManager;
}
@@ -95,7 +99,7 @@ public HealthBot create(Context context) {
return this;
}
- HealthBotImpl(String name, HealthbotManager serviceManager) {
+ HealthBotImpl(String name, com.azure.resourcemanager.healthbot.HealthbotManager serviceManager) {
this.innerObject = new HealthBotInner();
this.serviceManager = serviceManager;
this.botName = name;
@@ -126,7 +130,7 @@ public HealthBot apply(Context context) {
return this;
}
- HealthBotImpl(HealthBotInner innerObject, HealthbotManager serviceManager) {
+ HealthBotImpl(HealthBotInner innerObject, com.azure.resourcemanager.healthbot.HealthbotManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
@@ -183,6 +187,16 @@ public HealthBotImpl withTags(Map tags) {
}
}
+ public HealthBotImpl withIdentity(Identity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateParameters.withIdentity(identity);
+ return this;
+ }
+ }
+
public HealthBotImpl withProperties(HealthBotProperties properties) {
this.innerModel().withProperties(properties);
return this;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientImpl.java
index 52486036b2337..9aa2215f9a7c3 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientImpl.java
@@ -157,7 +157,7 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2020-12-08";
+ this.apiVersion = "2021-06-10";
this.bots = new BotsClientImpl(this);
this.operations = new OperationsClientImpl(this);
}
@@ -244,7 +244,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse,
if (managementError.getCode() == null || managementError.getMessage() == null) {
managementError = null;
}
- } catch (IOException ioe) {
+ } catch (IOException | RuntimeException ioe) {
logger.logThrowableAsWarning(ioe);
}
}
@@ -273,7 +273,7 @@ private static final class HttpResponseImpl extends HttpResponse {
super(null);
this.statusCode = statusCode;
this.httpHeaders = httpHeaders;
- this.responseBody = responseBody.getBytes(StandardCharsets.UTF_8);
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
}
public int getStatusCode() {
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java
index 877ca542a4d57..5cc7a8d40bef8 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java
@@ -4,7 +4,6 @@
package com.azure.resourcemanager.healthbot.implementation;
-import com.azure.resourcemanager.healthbot.HealthbotManager;
import com.azure.resourcemanager.healthbot.fluent.models.OperationDetailInner;
import com.azure.resourcemanager.healthbot.models.OperationDetail;
import com.azure.resourcemanager.healthbot.models.OperationDisplay;
@@ -12,9 +11,10 @@
public final class OperationDetailImpl implements OperationDetail {
private OperationDetailInner innerObject;
- private final HealthbotManager serviceManager;
+ private final com.azure.resourcemanager.healthbot.HealthbotManager serviceManager;
- OperationDetailImpl(OperationDetailInner innerObject, HealthbotManager serviceManager) {
+ OperationDetailImpl(
+ OperationDetailInner innerObject, com.azure.resourcemanager.healthbot.HealthbotManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -43,7 +43,7 @@ public OperationDetailInner innerModel() {
return this.innerObject;
}
- private HealthbotManager manager() {
+ private com.azure.resourcemanager.healthbot.HealthbotManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsClientImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsClientImpl.java
index 74568aa0459e1..5f0c659059cb7 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsClientImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsClientImpl.java
@@ -81,7 +81,7 @@ Mono> listNext(
}
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot 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.
@@ -108,11 +108,11 @@ private Mono> listSinglePageAsync() {
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -144,7 +144,7 @@ private Mono> listSinglePageAsync(Context co
}
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot 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.
@@ -156,7 +156,7 @@ private PagedFlux listAsync() {
}
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -171,7 +171,7 @@ private PagedFlux listAsync(Context context) {
}
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot 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.
@@ -183,7 +183,7 @@ public PagedIterable list() {
}
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -228,7 +228,7 @@ private Mono> listNextSinglePageAsync(String
res.getValue().value(),
res.getValue().nextLink(),
null))
- .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java
index 05bd0f14e232a..7c6e8bca43c8d 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java
@@ -7,7 +7,6 @@
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.util.Context;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.healthbot.HealthbotManager;
import com.azure.resourcemanager.healthbot.fluent.OperationsClient;
import com.azure.resourcemanager.healthbot.fluent.models.OperationDetailInner;
import com.azure.resourcemanager.healthbot.models.OperationDetail;
@@ -19,28 +18,29 @@ public final class OperationsImpl implements Operations {
private final OperationsClient innerClient;
- private final HealthbotManager serviceManager;
+ private final com.azure.resourcemanager.healthbot.HealthbotManager serviceManager;
- public OperationsImpl(OperationsClient innerClient, HealthbotManager serviceManager) {
+ public OperationsImpl(
+ OperationsClient innerClient, com.azure.resourcemanager.healthbot.HealthbotManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return inner.mapPage(inner1 -> new OperationDetailImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return inner.mapPage(inner1 -> new OperationDetailImpl(inner1, this.manager()));
+ return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
return this.innerClient;
}
- private HealthbotManager manager() {
+ private com.azure.resourcemanager.healthbot.HealthbotManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/Utils.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/Utils.java
index bbe96c315d487..d92f83363a7be 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/Utils.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/Utils.java
@@ -4,12 +4,20 @@
package com.azure.resourcemanager.healthbot.implementation;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.util.CoreUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
final class Utils {
static String getValueFromIdByName(String id, String name) {
@@ -64,4 +72,133 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri
}
return null;
}
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function 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);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl, PagedResponse>(
+ pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl(iterable.iterator(), mapper);
+ }
+ }
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/package-info.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/package-info.java
index 548de7c70b124..7148b31d5985a 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/package-info.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/package-info.java
@@ -3,8 +3,8 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the implementations for HealthbotClient. 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 containing the implementations for HealthbotClient. 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 com.azure.resourcemanager.healthbot.implementation;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/BotResponseList.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/BotResponseList.java
index 9ca0b1f5b545b..aacef5a0e5ae8 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/BotResponseList.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/BotResponseList.java
@@ -11,7 +11,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
-/** The list of Healthbot operation response. */
+/** The list of Azure Health Bot operation response. */
@Immutable
public final class BotResponseList {
@JsonIgnore private final ClientLogger logger = new ClientLogger(BotResponseList.class);
@@ -23,7 +23,7 @@ public final class BotResponseList {
private String nextLink;
/*
- * Gets the list of Healthbot results and their properties.
+ * Gets the list of Azure Health Bot results and their properties.
*/
@JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
private List value;
@@ -38,7 +38,7 @@ public String nextLink() {
}
/**
- * Get the value property: Gets the list of Healthbot results and their properties.
+ * Get the value property: Gets the list of Azure Health Bot results and their properties.
*
* @return the value value.
*/
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Bots.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Bots.java
index 689fe669fe929..0bdcadfb6a45a 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Bots.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Bots.java
@@ -65,7 +65,7 @@ public interface Bots {
* @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 list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -77,7 +77,7 @@ public interface Bots {
* @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 list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -86,7 +86,7 @@ public interface Bots {
*
* @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 Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
PagedIterable list();
@@ -97,7 +97,7 @@ public interface Bots {
* @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 list of Healthbot operation response.
+ * @return the list of Azure Health Bot operation response.
*/
PagedIterable list(Context context);
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/ErrorAdditionalInfo.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/ErrorAdditionalInfo.java
deleted file mode 100644
index 025b7ca8a6816..0000000000000
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/ErrorAdditionalInfo.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.healthbot.models;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The resource management error additional info. */
-@Immutable
-public final class ErrorAdditionalInfo {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ErrorAdditionalInfo.class);
-
- /*
- * The additional info type.
- */
- @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
- private String type;
-
- /*
- * The additional info.
- */
- @JsonProperty(value = "info", access = JsonProperty.Access.WRITE_ONLY)
- private Object info;
-
- /**
- * Get the type property: The additional info type.
- *
- * @return the type value.
- */
- public String type() {
- return this.type;
- }
-
- /**
- * Get the info property: The additional info.
- *
- * @return the info value.
- */
- public Object info() {
- return this.info;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBot.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBot.java
index dde07c5129b02..5dc3ae3ae0370 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBot.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBot.java
@@ -47,14 +47,21 @@ public interface HealthBot {
Map tags();
/**
- * Gets the sku property: SKU of the HealthBot.
+ * Gets the sku property: SKU of the Azure Health Bot.
*
* @return the sku value.
*/
Sku sku();
/**
- * Gets the properties property: The set of properties specific to Healthbot resource.
+ * Gets the identity property: The identity of the Azure Health Bot.
+ *
+ * @return the identity value.
+ */
+ Identity identity();
+
+ /**
+ * Gets the properties property: HealthBotProperties The set of properties specific to Azure Health Bot resource.
*
* @return the properties value.
*/
@@ -125,9 +132,9 @@ interface WithResourceGroup {
/** The stage of the HealthBot definition allowing to specify sku. */
interface WithSku {
/**
- * Specifies the sku property: SKU of the HealthBot..
+ * Specifies the sku property: SKU of the Azure Health Bot..
*
- * @param sku SKU of the HealthBot.
+ * @param sku SKU of the Azure Health Bot.
* @return the next definition stage.
*/
WithCreate withSku(Sku sku);
@@ -136,7 +143,8 @@ interface WithSku {
* The stage of the HealthBot definition which contains all the minimum required properties for the resource to
* be created, but also allows for any other optional properties to be specified.
*/
- interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties {
+ interface WithCreate
+ extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithProperties {
/**
* Executes the create request.
*
@@ -162,12 +170,23 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+ /** The stage of the HealthBot definition allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: The identity of the Azure Health Bot..
+ *
+ * @param identity The identity of the Azure Health Bot.
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(Identity identity);
+ }
/** The stage of the HealthBot definition allowing to specify properties. */
interface WithProperties {
/**
- * Specifies the properties property: The set of properties specific to Healthbot resource..
+ * Specifies the properties property: HealthBotProperties The set of properties specific to Azure Health Bot
+ * resource..
*
- * @param properties The set of properties specific to Healthbot resource.
+ * @param properties HealthBotProperties The set of properties specific to Azure Health Bot resource.
* @return the next definition stage.
*/
WithCreate withProperties(HealthBotProperties properties);
@@ -181,7 +200,7 @@ interface WithProperties {
HealthBot.Update update();
/** The template for HealthBot update. */
- interface Update extends UpdateStages.WithTags, UpdateStages.WithSku {
+ interface Update extends UpdateStages.WithTags, UpdateStages.WithSku, UpdateStages.WithIdentity {
/**
* Executes the update request.
*
@@ -202,9 +221,9 @@ interface UpdateStages {
/** The stage of the HealthBot update allowing to specify tags. */
interface WithTags {
/**
- * Specifies the tags property: Tags for a HealthBot..
+ * Specifies the tags property: Tags for a Azure Health Bot..
*
- * @param tags Tags for a HealthBot.
+ * @param tags Tags for a Azure Health Bot.
* @return the next definition stage.
*/
Update withTags(Map tags);
@@ -212,13 +231,23 @@ interface WithTags {
/** The stage of the HealthBot update allowing to specify sku. */
interface WithSku {
/**
- * Specifies the sku property: SKU of the HealthBot..
+ * Specifies the sku property: SKU of the Azure Health Bot..
*
- * @param sku SKU of the HealthBot.
+ * @param sku SKU of the Azure Health Bot.
* @return the next definition stage.
*/
Update withSku(Sku sku);
}
+ /** The stage of the HealthBot update allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: The identity of the Azure Health Bot..
+ *
+ * @param identity The identity of the Azure Health Bot.
+ * @return the next definition stage.
+ */
+ Update withIdentity(Identity identity);
+ }
}
/**
* Refreshes the resource to sync with Azure.
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotProperties.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotProperties.java
index 4869d201c24cb..e2874bf12556c 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotProperties.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotProperties.java
@@ -10,16 +10,16 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * The properties of a HealthBot. The Health Bot Service 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.
+ * HealthBotProperties The properties of a Azure Health Bot. The Health Bot Service 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.
*/
@Immutable
public final class HealthBotProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(HealthBotProperties.class);
/*
- * The provisioning state of the Healthbot resource.
+ * The provisioning state of the Azure Health Bot resource.
*/
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
private String provisioningState;
@@ -31,7 +31,7 @@ public final class HealthBotProperties {
private String botManagementPortalLink;
/**
- * Get the provisioningState property: The provisioning state of the Healthbot resource.
+ * Get the provisioningState property: The provisioning state of the Azure Health Bot resource.
*
* @return the provisioningState value.
*/
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotUpdateParameters.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotUpdateParameters.java
index 098c1c409ef3b..1652c1762df80 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotUpdateParameters.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotUpdateParameters.java
@@ -7,28 +7,42 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
-/** Parameters for updating a HealthBot. */
+/** Parameters for updating a Azure Health Bot. */
@Fluent
public final class HealthBotUpdateParameters {
@JsonIgnore private final ClientLogger logger = new ClientLogger(HealthBotUpdateParameters.class);
/*
- * Tags for a HealthBot.
+ * Tags for a Azure Health Bot.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/*
- * SKU of the HealthBot.
+ * SKU of the Azure Health Bot.
*/
@JsonProperty(value = "sku")
private Sku sku;
+ /*
+ * The identity of the Azure Health Bot.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /*
+ * The location property.
+ */
+ @JsonProperty(value = "location")
+ private String location;
+
/**
- * Get the tags property: Tags for a HealthBot.
+ * Get the tags property: Tags for a Azure Health Bot.
*
* @return the tags value.
*/
@@ -37,7 +51,7 @@ public Map tags() {
}
/**
- * Set the tags property: Tags for a HealthBot.
+ * Set the tags property: Tags for a Azure Health Bot.
*
* @param tags the tags value to set.
* @return the HealthBotUpdateParameters object itself.
@@ -48,7 +62,7 @@ public HealthBotUpdateParameters withTags(Map tags) {
}
/**
- * Get the sku property: SKU of the HealthBot.
+ * Get the sku property: SKU of the Azure Health Bot.
*
* @return the sku value.
*/
@@ -57,7 +71,7 @@ public Sku sku() {
}
/**
- * Set the sku property: SKU of the HealthBot.
+ * Set the sku property: SKU of the Azure Health Bot.
*
* @param sku the sku value to set.
* @return the HealthBotUpdateParameters object itself.
@@ -67,6 +81,46 @@ public HealthBotUpdateParameters withSku(Sku sku) {
return this;
}
+ /**
+ * Get the identity property: The identity of the Azure Health Bot.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the Azure Health Bot.
+ *
+ * @param identity the identity value to set.
+ * @return the HealthBotUpdateParameters object itself.
+ */
+ public HealthBotUpdateParameters withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the location property: The location property.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location property.
+ *
+ * @param location the location value to set.
+ * @return the HealthBotUpdateParameters object itself.
+ */
+ public HealthBotUpdateParameters withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
/**
* Validates the instance.
*
@@ -76,5 +130,8 @@ public void validate() {
if (sku() != null) {
sku().validate();
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Identity.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Identity.java
new file mode 100644
index 0000000000000..e3c8ec5de2363
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Identity.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Identity for the resource. */
+@Fluent
+public class Identity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(Identity.class);
+
+ /*
+ * The principal ID of resource identity. This property will only be
+ * provided for a system assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /*
+ * The tenant ID of resource. This property will only be provided for a
+ * system assigned identity.
+ */
+ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
+ private String tenantId;
+
+ /*
+ * The identity type. The type 'SystemAssigned, UserAssigned' includes both
+ * an implicitly created identity and a set of user assigned identities.
+ * The type 'None' will remove any identities from the Azure Health Bot
+ */
+ @JsonProperty(value = "type")
+ private ResourceIdentityType type;
+
+ /*
+ * The list of user identities associated with the resource. The user
+ * identity dictionary key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ */
+ @JsonProperty(value = "userAssignedIdentities")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map userAssignedIdentities;
+
+ /**
+ * Get the principalId property: The principal ID of resource identity. This property will only be provided for a
+ * system assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the tenantId property: The tenant ID of resource. This property will only be provided for a system assigned
+ * identity.
+ *
+ * @return the tenantId value.
+ */
+ public String tenantId() {
+ return this.tenantId;
+ }
+
+ /**
+ * Get the type property: The identity type. The type 'SystemAssigned, UserAssigned' includes both an implicitly
+ * created identity and a set of user assigned identities. The type 'None' will remove any identities from the Azure
+ * Health Bot.
+ *
+ * @return the type value.
+ */
+ public ResourceIdentityType type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The identity type. The type 'SystemAssigned, UserAssigned' includes both an implicitly
+ * created identity and a set of user assigned identities. The type 'None' will remove any identities from the Azure
+ * Health Bot.
+ *
+ * @param type the type value to set.
+ * @return the Identity object itself.
+ */
+ public Identity withType(ResourceIdentityType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the userAssignedIdentities property: The list of user identities associated with the resource. The user
+ * identity dictionary key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ * @return the userAssignedIdentities value.
+ */
+ public Map userAssignedIdentities() {
+ return this.userAssignedIdentities;
+ }
+
+ /**
+ * Set the userAssignedIdentities property: The list of user identities associated with the resource. The user
+ * identity dictionary key references will be ARM resource ids in the form:
+ * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ *
+ * @param userAssignedIdentities the userAssignedIdentities value to set.
+ * @return the Identity object itself.
+ */
+ public Identity withUserAssignedIdentities(Map userAssignedIdentities) {
+ this.userAssignedIdentities = userAssignedIdentities;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (userAssignedIdentities() != null) {
+ userAssignedIdentities()
+ .values()
+ .forEach(
+ e -> {
+ if (e != null) {
+ e.validate();
+ }
+ });
+ }
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/IdentityType.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/IdentityType.java
deleted file mode 100644
index 4765e0b24f9e3..0000000000000
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/IdentityType.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.healthbot.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for IdentityType. */
-public final class IdentityType extends ExpandableStringEnum {
- /** Static value User for IdentityType. */
- public static final IdentityType USER = fromString("User");
-
- /** Static value Application for IdentityType. */
- public static final IdentityType APPLICATION = fromString("Application");
-
- /** Static value ManagedIdentity for IdentityType. */
- public static final IdentityType MANAGED_IDENTITY = fromString("ManagedIdentity");
-
- /** Static value Key for IdentityType. */
- public static final IdentityType KEY = fromString("Key");
-
- /**
- * Creates or finds a IdentityType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding IdentityType.
- */
- @JsonCreator
- public static IdentityType fromString(String name) {
- return fromString(name, IdentityType.class);
- }
-
- /** @return known IdentityType values. */
- public static Collection values() {
- return values(IdentityType.class);
- }
-}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Operations.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Operations.java
index 93f85f208db4f..0d88b866dd668 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Operations.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Operations.java
@@ -10,7 +10,7 @@
/** Resource collection API of Operations. */
public interface Operations {
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot 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.
@@ -19,7 +19,7 @@ public interface Operations {
PagedIterable list();
/**
- * Lists all the available HealthBot operations.
+ * Lists all the available Azure Health Bot operations.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/ResourceIdentityType.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/ResourceIdentityType.java
new file mode 100644
index 0000000000000..d32cc3f90ba96
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/ResourceIdentityType.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/** Defines values for ResourceIdentityType. */
+public enum ResourceIdentityType {
+ /** Enum value SystemAssigned. */
+ SYSTEM_ASSIGNED("SystemAssigned"),
+
+ /** Enum value UserAssigned. */
+ USER_ASSIGNED("UserAssigned"),
+
+ /** Enum value SystemAssigned, UserAssigned. */
+ SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"),
+
+ /** Enum value None. */
+ NONE("None");
+
+ /** The actual serialized value for a ResourceIdentityType instance. */
+ private final String value;
+
+ ResourceIdentityType(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a ResourceIdentityType instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed ResourceIdentityType object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static ResourceIdentityType fromString(String value) {
+ ResourceIdentityType[] items = ResourceIdentityType.values();
+ for (ResourceIdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Sku.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Sku.java
index 4746d3e93e255..767330cef52b2 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Sku.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Sku.java
@@ -15,13 +15,13 @@ public final class Sku {
@JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class);
/*
- * The name of the HealthBot SKU
+ * The name of the Azure Health Bot SKU
*/
@JsonProperty(value = "name", required = true)
private SkuName name;
/**
- * Get the name property: The name of the HealthBot SKU.
+ * Get the name property: The name of the Azure Health Bot SKU.
*
* @return the name value.
*/
@@ -30,7 +30,7 @@ public SkuName name() {
}
/**
- * Set the name property: The name of the HealthBot SKU.
+ * Set the name property: The name of the Azure Health Bot SKU.
*
* @param name the name value to set.
* @return the Sku object itself.
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/SystemData.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/SystemData.java
deleted file mode 100644
index f8e0c4fe8f9a9..0000000000000
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/SystemData.java
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.healthbot.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.time.OffsetDateTime;
-
-/** Read only system data. */
-@Fluent
-public final class SystemData {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(SystemData.class);
-
- /*
- * The identity that created the resource.
- */
- @JsonProperty(value = "createdBy")
- private String createdBy;
-
- /*
- * The type of identity that created the resource
- */
- @JsonProperty(value = "createdByType")
- private IdentityType createdByType;
-
- /*
- * The timestamp of resource creation (UTC)
- */
- @JsonProperty(value = "createdAt")
- private OffsetDateTime createdAt;
-
- /*
- * The identity that last modified the resource.
- */
- @JsonProperty(value = "lastModifiedBy")
- private String lastModifiedBy;
-
- /*
- * The type of identity that last modified the resource
- */
- @JsonProperty(value = "lastModifiedByType")
- private IdentityType lastModifiedByType;
-
- /*
- * The timestamp of resource last modification (UTC)
- */
- @JsonProperty(value = "lastModifiedAt")
- private OffsetDateTime lastModifiedAt;
-
- /**
- * Get the createdBy property: The identity that created the resource.
- *
- * @return the createdBy value.
- */
- public String createdBy() {
- return this.createdBy;
- }
-
- /**
- * Set the createdBy property: The identity that created the resource.
- *
- * @param createdBy the createdBy value to set.
- * @return the SystemData object itself.
- */
- public SystemData withCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- return this;
- }
-
- /**
- * Get the createdByType property: The type of identity that created the resource.
- *
- * @return the createdByType value.
- */
- public IdentityType createdByType() {
- return this.createdByType;
- }
-
- /**
- * Set the createdByType property: The type of identity that created the resource.
- *
- * @param createdByType the createdByType value to set.
- * @return the SystemData object itself.
- */
- public SystemData withCreatedByType(IdentityType createdByType) {
- this.createdByType = createdByType;
- return this;
- }
-
- /**
- * Get the createdAt property: The timestamp of resource creation (UTC).
- *
- * @return the createdAt value.
- */
- public OffsetDateTime createdAt() {
- return this.createdAt;
- }
-
- /**
- * Set the createdAt property: The timestamp of resource creation (UTC).
- *
- * @param createdAt the createdAt value to set.
- * @return the SystemData object itself.
- */
- public SystemData withCreatedAt(OffsetDateTime createdAt) {
- this.createdAt = createdAt;
- return this;
- }
-
- /**
- * Get the lastModifiedBy property: The identity that last modified the resource.
- *
- * @return the lastModifiedBy value.
- */
- public String lastModifiedBy() {
- return this.lastModifiedBy;
- }
-
- /**
- * Set the lastModifiedBy property: The identity that last modified the resource.
- *
- * @param lastModifiedBy the lastModifiedBy value to set.
- * @return the SystemData object itself.
- */
- public SystemData withLastModifiedBy(String lastModifiedBy) {
- this.lastModifiedBy = lastModifiedBy;
- return this;
- }
-
- /**
- * Get the lastModifiedByType property: The type of identity that last modified the resource.
- *
- * @return the lastModifiedByType value.
- */
- public IdentityType lastModifiedByType() {
- return this.lastModifiedByType;
- }
-
- /**
- * Set the lastModifiedByType property: The type of identity that last modified the resource.
- *
- * @param lastModifiedByType the lastModifiedByType value to set.
- * @return the SystemData object itself.
- */
- public SystemData withLastModifiedByType(IdentityType lastModifiedByType) {
- this.lastModifiedByType = lastModifiedByType;
- return this;
- }
-
- /**
- * Get the lastModifiedAt property: The timestamp of resource last modification (UTC).
- *
- * @return the lastModifiedAt value.
- */
- public OffsetDateTime lastModifiedAt() {
- return this.lastModifiedAt;
- }
-
- /**
- * Set the lastModifiedAt property: The timestamp of resource last modification (UTC).
- *
- * @param lastModifiedAt the lastModifiedAt value to set.
- * @return the SystemData object itself.
- */
- public SystemData withLastModifiedAt(OffsetDateTime lastModifiedAt) {
- this.lastModifiedAt = lastModifiedAt;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/UserAssignedIdentity.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/UserAssignedIdentity.java
new file mode 100644
index 0000000000000..677039576475d
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/UserAssignedIdentity.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The details of the user assigned managed identity used by the Video Analyzer resource. */
+@Immutable
+public class UserAssignedIdentity {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class);
+
+ /*
+ * The principal ID of user assigned identity.
+ */
+ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
+ private String principalId;
+
+ /*
+ * The client ID of user assigned identity.
+ */
+ @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
+ private String clientId;
+
+ /**
+ * Get the principalId property: The principal ID of user assigned identity.
+ *
+ * @return the principalId value.
+ */
+ public String principalId() {
+ return this.principalId;
+ }
+
+ /**
+ * Get the clientId property: The client ID of user assigned identity.
+ *
+ * @return the clientId value.
+ */
+ public String clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/package-info.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/package-info.java
index 5db4a44c57a85..4ef4974e562b5 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/package-info.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/package-info.java
@@ -3,8 +3,8 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the data models for HealthbotClient. 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 containing the data models for HealthbotClient. 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 com.azure.resourcemanager.healthbot.models;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/package-info.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/package-info.java
index 39ba61b5bfe72..b93cad5283862 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/package-info.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/package-info.java
@@ -3,8 +3,8 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * Package containing the classes for HealthbotClient. 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 containing the classes for HealthbotClient. 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 com.azure.resourcemanager.healthbot;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsCreateSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsCreateSamples.java
new file mode 100644
index 0000000000000..4da7384001827
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsCreateSamples.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.generated;
+
+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/2021-06-10/examples/ResourceCreationPut.json
+ */
+ /**
+ * Sample code: BotCreate.
+ *
+ * @param manager Entry point to HealthbotManager.
+ */
+ public static void botCreate(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
+ manager
+ .bots()
+ .define("samplebotname")
+ .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 Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsDeleteSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsDeleteSamples.java
new file mode 100644
index 0000000000000..da17c540b72c9
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.generated;
+
+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/2021-06-10/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);
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsGetByResourceGroupSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..903c03d0c74ad
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsGetByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.generated;
+
+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/2021-06-10/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);
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListByResourceGroupSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..c94b068385c72
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.generated;
+
+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/2021-06-10/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);
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListSamples.java
new file mode 100644
index 0000000000000..7f674b46a11dc
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.generated;
+
+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/2021-06-10/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);
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsUpdateSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsUpdateSamples.java
new file mode 100644
index 0000000000000..54d211d5bf4a5
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsUpdateSamples.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.generated;
+
+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/2021-06-10/examples/ResourceUpdatePatch.json
+ */
+ /**
+ * Sample code: BotUpdate.
+ *
+ * @param manager Entry point to HealthbotManager.
+ */
+ public static void botUpdate(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
+ HealthBot resource =
+ manager.bots().getByResourceGroupWithResponse("healthbotClient", "samplebotname", Context.NONE).getValue();
+ resource.update().withSku(new Sku().withName(SkuName.F0)).apply();
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/OperationsListSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/OperationsListSamples.java
new file mode 100644
index 0000000000000..e517f05ca90e0
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/OperationsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.healthbot.generated;
+
+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/2021-06-10/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);
+ }
+}