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 fba4b25486eb..7500749f1a36 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
@@ -6,30 +6,49 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
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.JsonProperty;
import java.util.Map;
-/** HealthBot resource definition. */
+/** Azure Health Bot resource definition. */
@Fluent
public final class HealthBotInner extends Resource {
/*
- * SKU of the HealthBot.
+ * SKU of the Azure Health Bot.
*/
@JsonProperty(value = "sku", required = true)
private Sku sku;
/*
- * HealthBotProperties 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;
+ /*
+ * Metadata pertaining to creation and last modification of the resource
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /** Creates an instance of HealthBotInner class. */
+ public HealthBotInner() {
+ }
+
/**
- * Get the sku property: SKU of the HealthBot.
+ * Get the sku property: SKU of the Azure Health Bot.
*
* @return the sku value.
*/
@@ -38,7 +57,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.
@@ -49,7 +68,29 @@ public HealthBotInner withSku(Sku sku) {
}
/**
- * Get the properties property: HealthBotProperties 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.
*/
@@ -58,7 +99,9 @@ public HealthBotProperties properties() {
}
/**
- * Set the properties property: HealthBotProperties 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.
@@ -68,6 +111,15 @@ public HealthBotInner withProperties(HealthBotProperties properties) {
return this;
}
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
/** {@inheritDoc} */
@Override
public HealthBotInner withLocation(String location) {
@@ -95,6 +147,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/HealthBotKeyInner.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotKeyInner.java
new file mode 100644
index 000000000000..6f2537157c4d
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotKeyInner.java
@@ -0,0 +1,76 @@
+// 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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** An entry of HealthBotKeysResponse. */
+@Fluent
+public final class HealthBotKeyInner {
+ /*
+ * The name of the key.
+ */
+ @JsonProperty(value = "keyName")
+ private String keyName;
+
+ /*
+ * The value of the key.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /** Creates an instance of HealthBotKeyInner class. */
+ public HealthBotKeyInner() {
+ }
+
+ /**
+ * Get the keyName property: The name of the key.
+ *
+ * @return the keyName value.
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set the keyName property: The name of the key.
+ *
+ * @param keyName the keyName value to set.
+ * @return the HealthBotKeyInner object itself.
+ */
+ public HealthBotKeyInner withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+ /**
+ * Get the value property: The value of the key.
+ *
+ * @return the value value.
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The value of the key.
+ *
+ * @param value the value value to set.
+ * @return the HealthBotKeyInner object itself.
+ */
+ public HealthBotKeyInner withValue(String value) {
+ this.value = value;
+ 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/fluent/models/HealthBotKeysResponseInner.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotKeysResponseInner.java
new file mode 100644
index 000000000000..78747a193cdd
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/HealthBotKeysResponseInner.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.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Health Bot Keys Response. */
+@Fluent
+public final class HealthBotKeysResponseInner {
+ /*
+ * Array of Azure Health Bot Secrets.
+ */
+ @JsonProperty(value = "secrets")
+ private List secrets;
+
+ /** Creates an instance of HealthBotKeysResponseInner class. */
+ public HealthBotKeysResponseInner() {
+ }
+
+ /**
+ * Get the secrets property: Array of Azure Health Bot Secrets.
+ *
+ * @return the secrets value.
+ */
+ public List secrets() {
+ return this.secrets;
+ }
+
+ /**
+ * Set the secrets property: Array of Azure Health Bot Secrets.
+ *
+ * @param secrets the secrets value to set.
+ * @return the HealthBotKeysResponseInner object itself.
+ */
+ public HealthBotKeysResponseInner withSecrets(List secrets) {
+ this.secrets = secrets;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (secrets() != null) {
+ secrets().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/OperationDetailInner.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/OperationDetailInner.java
index db495434beed..64b3f0645bca 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/OperationDetailInner.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/models/OperationDetailInner.java
@@ -41,6 +41,10 @@ public final class OperationDetailInner {
@JsonProperty(value = "properties")
private Object properties;
+ /** Creates an instance of OperationDetailInner class. */
+ public OperationDetailInner() {
+ }
+
/**
* Get the name property: Name of the operation.
*
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 54b6d2f08cd3..b0fc562deb15 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 ba5755fdd6fe..82366856f48f 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 978c70dc5cc1..be317ae05040 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
@@ -14,6 +14,7 @@
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.Patch;
import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
@@ -34,6 +35,8 @@
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.healthbot.fluent.BotsClient;
import com.azure.resourcemanager.healthbot.fluent.models.HealthBotInner;
+import com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeyInner;
+import com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeysResponseInner;
import com.azure.resourcemanager.healthbot.models.BotResponseList;
import com.azure.resourcemanager.healthbot.models.HealthBotUpdateParameters;
import java.nio.ByteBuffer;
@@ -64,11 +67,10 @@ public final class BotsClientImpl implements BotsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "HealthbotClientBots")
- private interface BotsService {
+ public interface BotsService {
@Headers({"Content-Type: application/json"})
@Put(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot"
- + "/healthBots/{botName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> create(
@@ -83,8 +85,7 @@ Mono>> create(
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot"
- + "/healthBots/{botName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> getByResourceGroup(
@@ -98,11 +99,10 @@ Mono> getByResourceGroup(
@Headers({"Content-Type: application/json"})
@Patch(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot"
- + "/healthBots/{botName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({200, 201})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
+ Mono>> update(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
@@ -114,8 +114,7 @@ Mono> update(
@Headers({"Content-Type: application/json"})
@Delete(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot"
- + "/healthBots/{botName}")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@@ -127,10 +126,37 @@ Mono>> delete(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/listSecrets")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listSecrets(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("botName") String botName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/regenerateApiJwtSecret")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> regenerateApiJwtSecret(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("botName") String botName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get(
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot"
- + "/healthBots")
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResourceGroup(
@@ -174,15 +200,16 @@ 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 along with {@link Response} on successful completion of {@link Mono}.
+ * @return azure Health Bot resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -229,16 +256,17 @@ 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.
* @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 along with {@link Response} on successful completion of {@link Mono}.
+ * @return azure Health Bot resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -282,15 +310,15 @@ 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 the {@link PollerFlux} for polling of healthBot resource definition.
+ * @return the {@link PollerFlux} for polling of azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, HealthBotInner> beginCreateAsync(
@@ -307,16 +335,16 @@ 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.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of healthBot resource definition.
+ * @return the {@link PollerFlux} for polling of azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, HealthBotInner> beginCreateAsync(
@@ -331,50 +359,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 the {@link SyncPoller} for polling of healthBot resource definition.
+ * @return the {@link SyncPoller} for polling of azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, HealthBotInner> beginCreate(
String resourceGroupName, String botName, HealthBotInner parameters) {
- return beginCreateAsync(resourceGroupName, botName, parameters).getSyncPoller();
+ return this.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 the {@link SyncPoller} for polling of healthBot resource definition.
+ * @return the {@link SyncPoller} for polling of azure Health Bot resource definition.
*/
@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();
+ return this.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 on successful completion of {@link Mono}.
+ * @return azure Health Bot resource definition on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(String resourceGroupName, String botName, HealthBotInner parameters) {
@@ -384,16 +412,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 on successful completion of {@link Mono}.
+ * @return azure Health Bot resource definition on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -404,15 +432,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) {
@@ -420,16 +448,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) {
@@ -551,14 +579,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a HealthBot.
+ * @return a HealthBot along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public HealthBotInner getByResourceGroup(String resourceGroupName, String botName) {
- return getByResourceGroupAsync(resourceGroupName, botName).block();
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String botName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, botName, context).block();
}
/**
@@ -566,16 +596,14 @@ public HealthBotInner getByResourceGroup(String resourceGroupName, String botNam
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a HealthBot along with {@link Response}.
+ * @return a HealthBot.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(
- String resourceGroupName, String botName, Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, botName, context).block();
+ public HealthBotInner getByResourceGroup(String resourceGroupName, String botName) {
+ return getByResourceGroupWithResponse(resourceGroupName, botName, Context.NONE).getValue();
}
/**
@@ -583,14 +611,15 @@ 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 along with {@link Response} on successful completion of {@link Mono}.
+ * @return azure Health Bot resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String botName, HealthBotUpdateParameters parameters) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -638,15 +667,16 @@ 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 along with {@link Response} on successful completion of {@link Mono}.
+ * @return azure Health Bot resource definition along with {@link Response} on successful completion of {@link
+ * Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(
+ private Mono>> updateWithResponseAsync(
String resourceGroupName, String botName, HealthBotUpdateParameters parameters, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
@@ -691,17 +721,122 @@ 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 the {@link PollerFlux} for polling of azure Health Bot resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, HealthBotInner> beginUpdateAsync(
+ String resourceGroupName, String botName, HealthBotUpdateParameters parameters) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, botName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ HealthBotInner.class,
+ HealthBotInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Patch a 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 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 the {@link PollerFlux} for polling of azure Health Bot resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, HealthBotInner> beginUpdateAsync(
+ String resourceGroupName, String botName, HealthBotUpdateParameters parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ updateWithResponseAsync(resourceGroupName, botName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), HealthBotInner.class, HealthBotInner.class, context);
+ }
+
+ /**
+ * Patch a 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 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 the {@link SyncPoller} for polling of azure Health Bot resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, HealthBotInner> beginUpdate(
+ String resourceGroupName, String botName, HealthBotUpdateParameters parameters) {
+ return this.beginUpdateAsync(resourceGroupName, botName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Patch a 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 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 the {@link SyncPoller} for polling of azure Health Bot resource definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, HealthBotInner> beginUpdate(
+ String resourceGroupName, String botName, HealthBotUpdateParameters parameters, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, botName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Patch a 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 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 on successful completion of {@link Mono}.
+ * @return azure Health Bot resource definition on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
String resourceGroupName, String botName, HealthBotUpdateParameters parameters) {
- return updateWithResponseAsync(resourceGroupName, botName, parameters)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ return beginUpdateAsync(resourceGroupName, botName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Patch a 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 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 azure Health Bot resource definition on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String botName, HealthBotUpdateParameters parameters, Context context) {
+ return beginUpdateAsync(resourceGroupName, botName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
}
/**
@@ -709,11 +844,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) {
@@ -725,17 +860,17 @@ 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 along with {@link Response}.
+ * @return azure Health Bot resource definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateWithResponse(
+ public HealthBotInner update(
String resourceGroupName, String botName, HealthBotUpdateParameters parameters, Context context) {
- return updateWithResponseAsync(resourceGroupName, botName, parameters, context).block();
+ return updateAsync(resourceGroupName, botName, parameters, context).block();
}
/**
@@ -883,7 +1018,7 @@ private PollerFlux, Void> beginDeleteAsync(
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String botName) {
- return beginDeleteAsync(resourceGroupName, botName).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, botName).getSyncPoller();
}
/**
@@ -899,7 +1034,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String botName, Context context) {
- return beginDeleteAsync(resourceGroupName, botName, context).getSyncPoller();
+ return this.beginDeleteAsync(resourceGroupName, botName, context).getSyncPoller();
}
/**
@@ -964,6 +1099,290 @@ public void delete(String resourceGroupName, String botName, Context context) {
deleteAsync(resourceGroupName, botName, context).block();
}
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return health Bot Keys Response along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSecretsWithResponseAsync(
+ String resourceGroupName, String botName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (botName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter botName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listSecrets(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ botName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return health Bot Keys Response along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSecretsWithResponseAsync(
+ String resourceGroupName, String botName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (botName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter botName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listSecrets(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ botName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return health Bot Keys Response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listSecretsAsync(String resourceGroupName, String botName) {
+ return listSecretsWithResponseAsync(resourceGroupName, botName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return health Bot Keys Response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listSecretsWithResponse(
+ String resourceGroupName, String botName, Context context) {
+ return listSecretsWithResponseAsync(resourceGroupName, botName, context).block();
+ }
+
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return health Bot Keys Response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthBotKeysResponseInner listSecrets(String resourceGroupName, String botName) {
+ return listSecretsWithResponse(resourceGroupName, botName, Context.NONE).getValue();
+ }
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an entry of HealthBotKeysResponse along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> regenerateApiJwtSecretWithResponseAsync(
+ String resourceGroupName, String botName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (botName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter botName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .regenerateApiJwtSecret(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ botName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an entry of HealthBotKeysResponse along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> regenerateApiJwtSecretWithResponseAsync(
+ String resourceGroupName, String botName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (botName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter botName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .regenerateApiJwtSecret(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ botName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an entry of HealthBotKeysResponse on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono regenerateApiJwtSecretAsync(String resourceGroupName, String botName) {
+ return regenerateApiJwtSecretWithResponseAsync(resourceGroupName, botName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an entry of HealthBotKeysResponse along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response regenerateApiJwtSecretWithResponse(
+ String resourceGroupName, String botName, Context context) {
+ return regenerateApiJwtSecretWithResponseAsync(resourceGroupName, botName, context).block();
+ }
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an entry of HealthBotKeysResponse.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthBotKeyInner regenerateApiJwtSecret(String resourceGroupName, String botName) {
+ return regenerateApiJwtSecretWithResponse(resourceGroupName, botName, Context.NONE).getValue();
+ }
+
/**
* Returns all the resources of a particular type belonging to a resource group.
*
@@ -971,8 +1390,8 @@ 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 along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -1024,8 +1443,8 @@ 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 along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -1074,7 +1493,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 as paginated response with {@link PagedFlux}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -1091,7 +1510,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 as paginated response with {@link PagedFlux}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -1107,7 +1526,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -1122,7 +1541,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -1134,8 +1553,8 @@ 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 along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -1181,8 +1600,8 @@ 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 along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -1223,7 +1642,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 as paginated response with {@link PagedFlux}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -1237,7 +1656,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 as paginated response with {@link PagedFlux}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -1250,7 +1669,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -1264,7 +1683,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -1274,12 +1693,13 @@ public PagedIterable list(Context context) {
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
@@ -1311,13 +1731,14 @@ private Mono> listByResourceGroupNextSinglePageAsy
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(
@@ -1349,12 +1770,13 @@ private Mono> listByResourceGroupNextSinglePageAsy
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
@@ -1385,13 +1807,14 @@ private Mono> listNextSinglePageAsync(String nextL
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Healthbot operation response along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
+ * of {@link Mono}.
*/
@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 41baf699f672..e903249a1883 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
@@ -11,8 +11,12 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.healthbot.fluent.BotsClient;
import com.azure.resourcemanager.healthbot.fluent.models.HealthBotInner;
+import com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeyInner;
+import com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeysResponseInner;
import com.azure.resourcemanager.healthbot.models.Bots;
import com.azure.resourcemanager.healthbot.models.HealthBot;
+import com.azure.resourcemanager.healthbot.models.HealthBotKey;
+import com.azure.resourcemanager.healthbot.models.HealthBotKeysResponse;
public final class BotsImpl implements Bots {
private static final ClientLogger LOGGER = new ClientLogger(BotsImpl.class);
@@ -26,6 +30,21 @@ public BotsImpl(BotsClient innerClient, com.azure.resourcemanager.healthbot.Heal
this.serviceManager = serviceManager;
}
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String botName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, botName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new HealthBotImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
public HealthBot getByResourceGroup(String resourceGroupName, String botName) {
HealthBotInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, botName);
if (inner != null) {
@@ -35,27 +54,60 @@ public HealthBot getByResourceGroup(String resourceGroupName, String botName) {
}
}
- public Response getByResourceGroupWithResponse(
+ public void deleteByResourceGroup(String resourceGroupName, String botName) {
+ this.serviceClient().delete(resourceGroupName, botName);
+ }
+
+ public void delete(String resourceGroupName, String botName, Context context) {
+ this.serviceClient().delete(resourceGroupName, botName, context);
+ }
+
+ public Response listSecretsWithResponse(
String resourceGroupName, String botName, Context context) {
- Response inner =
- this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, botName, context);
+ Response inner =
+ this.serviceClient().listSecretsWithResponse(resourceGroupName, botName, context);
if (inner != null) {
return new SimpleResponse<>(
inner.getRequest(),
inner.getStatusCode(),
inner.getHeaders(),
- new HealthBotImpl(inner.getValue(), this.manager()));
+ new HealthBotKeysResponseImpl(inner.getValue(), this.manager()));
} else {
return null;
}
}
- public void deleteByResourceGroup(String resourceGroupName, String botName) {
- this.serviceClient().delete(resourceGroupName, botName);
+ public HealthBotKeysResponse listSecrets(String resourceGroupName, String botName) {
+ HealthBotKeysResponseInner inner = this.serviceClient().listSecrets(resourceGroupName, botName);
+ if (inner != null) {
+ return new HealthBotKeysResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
}
- public void delete(String resourceGroupName, String botName, Context context) {
- this.serviceClient().delete(resourceGroupName, botName, context);
+ public Response regenerateApiJwtSecretWithResponse(
+ String resourceGroupName, String botName, Context context) {
+ Response inner =
+ this.serviceClient().regenerateApiJwtSecretWithResponse(resourceGroupName, botName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new HealthBotKeyImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public HealthBotKey regenerateApiJwtSecret(String resourceGroupName, String botName) {
+ HealthBotKeyInner inner = this.serviceClient().regenerateApiJwtSecret(resourceGroupName, botName);
+ if (inner != null) {
+ return new HealthBotKeyImpl(inner, this.manager());
+ } else {
+ return null;
+ }
}
public PagedIterable listByResourceGroup(String resourceGroupName) {
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 a27f66cb8cda..ed35b4b0ddba 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
@@ -4,12 +4,17 @@
package com.azure.resourcemanager.healthbot.implementation;
+import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.healthbot.fluent.models.HealthBotInner;
import com.azure.resourcemanager.healthbot.models.HealthBot;
+import com.azure.resourcemanager.healthbot.models.HealthBotKey;
+import com.azure.resourcemanager.healthbot.models.HealthBotKeysResponse;
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;
@@ -48,10 +53,18 @@ public Sku sku() {
return this.innerModel().sku();
}
+ public Identity identity() {
+ return this.innerModel().identity();
+ }
+
public HealthBotProperties properties() {
return this.innerModel().properties();
}
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -111,21 +124,13 @@ public HealthBotImpl update() {
public HealthBot apply() {
this.innerObject =
- serviceManager
- .serviceClient()
- .getBots()
- .updateWithResponse(resourceGroupName, botName, updateParameters, Context.NONE)
- .getValue();
+ serviceManager.serviceClient().getBots().update(resourceGroupName, botName, updateParameters, Context.NONE);
return this;
}
public HealthBot apply(Context context) {
this.innerObject =
- serviceManager
- .serviceClient()
- .getBots()
- .updateWithResponse(resourceGroupName, botName, updateParameters, context)
- .getValue();
+ serviceManager.serviceClient().getBots().update(resourceGroupName, botName, updateParameters, context);
return this;
}
@@ -156,6 +161,22 @@ public HealthBot refresh(Context context) {
return this;
}
+ public Response listSecretsWithResponse(Context context) {
+ return serviceManager.bots().listSecretsWithResponse(resourceGroupName, botName, context);
+ }
+
+ public HealthBotKeysResponse listSecrets() {
+ return serviceManager.bots().listSecrets(resourceGroupName, botName);
+ }
+
+ public Response regenerateApiJwtSecretWithResponse(Context context) {
+ return serviceManager.bots().regenerateApiJwtSecretWithResponse(resourceGroupName, botName, context);
+ }
+
+ public HealthBotKey regenerateApiJwtSecret() {
+ return serviceManager.bots().regenerateApiJwtSecret(resourceGroupName, botName);
+ }
+
public HealthBotImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
@@ -186,9 +207,24 @@ 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;
+ if (isInCreateMode()) {
+ this.innerModel().withProperties(properties);
+ return this;
+ } else {
+ this.updateParameters.withProperties(properties);
+ return this;
+ }
}
private boolean isInCreateMode() {
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotKeyImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotKeyImpl.java
new file mode 100644
index 000000000000..206b00c8106c
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotKeyImpl.java
@@ -0,0 +1,36 @@
+// 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.implementation;
+
+import com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeyInner;
+import com.azure.resourcemanager.healthbot.models.HealthBotKey;
+
+public final class HealthBotKeyImpl implements HealthBotKey {
+ private HealthBotKeyInner innerObject;
+
+ private final com.azure.resourcemanager.healthbot.HealthbotManager serviceManager;
+
+ HealthBotKeyImpl(
+ HealthBotKeyInner innerObject, com.azure.resourcemanager.healthbot.HealthbotManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String keyName() {
+ return this.innerModel().keyName();
+ }
+
+ public String value() {
+ return this.innerModel().value();
+ }
+
+ public HealthBotKeyInner innerModel() {
+ return this.innerObject;
+ }
+
+ 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/HealthBotKeysResponseImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotKeysResponseImpl.java
new file mode 100644
index 000000000000..73569f907244
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthBotKeysResponseImpl.java
@@ -0,0 +1,47 @@
+// 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.implementation;
+
+import com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeyInner;
+import com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeysResponseInner;
+import com.azure.resourcemanager.healthbot.models.HealthBotKey;
+import com.azure.resourcemanager.healthbot.models.HealthBotKeysResponse;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public final class HealthBotKeysResponseImpl implements HealthBotKeysResponse {
+ private HealthBotKeysResponseInner innerObject;
+
+ private final com.azure.resourcemanager.healthbot.HealthbotManager serviceManager;
+
+ HealthBotKeysResponseImpl(
+ HealthBotKeysResponseInner innerObject, com.azure.resourcemanager.healthbot.HealthbotManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List secrets() {
+ List inner = this.innerModel().secrets();
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new HealthBotKeyImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public HealthBotKeysResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ 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/HealthbotClientBuilder.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientBuilder.java
index 3072bbf427cc..163140238c28 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientBuilder.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientBuilder.java
@@ -119,24 +119,26 @@ public HealthbotClientBuilder serializerAdapter(SerializerAdapter serializerAdap
* @return an instance of HealthbotClientImpl.
*/
public HealthbotClientImpl buildClient() {
- if (endpoint == null) {
- this.endpoint = "https://management.azure.com";
- }
- if (environment == null) {
- this.environment = AzureEnvironment.AZURE;
- }
- if (pipeline == null) {
- this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
- }
- if (defaultPollInterval == null) {
- this.defaultPollInterval = Duration.ofSeconds(30);
- }
- if (serializerAdapter == null) {
- this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
- }
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline =
+ (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval =
+ (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter =
+ (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
HealthbotClientImpl client =
new HealthbotClientImpl(
- pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ localPipeline,
+ localSerializerAdapter,
+ localDefaultPollInterval,
+ localEnvironment,
+ subscriptionId,
+ localEndpoint);
return client;
}
}
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 9f29429c9f69..7e9c8e2dbe14 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
@@ -155,7 +155,7 @@ public OperationsClient getOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2020-12-08";
+ this.apiVersion = "2022-08-08";
this.bots = new BotsClientImpl(this);
this.operations = new OperationsClientImpl(this);
}
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 4013b1248309..b8f6bbf6ce6f 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
@@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient {
*/
@Host("{$host}")
@ServiceInterface(name = "HealthbotClientOpera")
- private interface OperationsService {
+ public interface OperationsService {
@Headers({"Content-Type: application/json"})
@Get("/providers/Microsoft.HealthBot/operations")
@ExpectedResponses({200})
@@ -78,7 +78,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.
@@ -110,7 +110,7 @@ private Mono> listSinglePageAsync() {
}
/**
- * 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.
@@ -143,7 +143,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.
@@ -155,7 +155,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.
@@ -170,7 +170,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.
@@ -182,7 +182,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.
@@ -198,7 +198,8 @@ public PagedIterable list(Context context) {
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -234,7 +235,8 @@ private Mono> listNextSinglePageAsync(String
/**
* Get the next page of items.
*
- * @param nextLink The nextLink parameter.
+ * @param nextLink The URL to get the next list of items
+ * The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
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 548de7c70b12..7148b31d5985 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/AvailableOperations.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/AvailableOperations.java
index b1319d84496c..2465434a6902 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/AvailableOperations.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/AvailableOperations.java
@@ -25,6 +25,10 @@ public final class AvailableOperations {
@JsonProperty(value = "nextLink")
private String nextLink;
+ /** Creates an instance of AvailableOperations class. */
+ public AvailableOperations() {
+ }
+
/**
* Get the value property: Collection of available operation details.
*
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 b8d6dab56a0b..e45c13a786d4 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
@@ -9,7 +9,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 {
/*
@@ -19,11 +19,15 @@ 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;
+ /** Creates an instance of BotResponseList class. */
+ public BotResponseList() {
+ }
+
/**
* Get the nextLink property: The link used to get the next page of bot service resources.
*
@@ -34,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 f335022bf587..7a5da3a5e823 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
@@ -15,25 +15,25 @@ public interface Bots {
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a HealthBot.
+ * @return a HealthBot along with {@link Response}.
*/
- HealthBot getByResourceGroup(String resourceGroupName, String botName);
+ Response getByResourceGroupWithResponse(String resourceGroupName, String botName, Context context);
/**
* Get a HealthBot.
*
* @param resourceGroupName The name of the Bot resource group in the user subscription.
* @param botName The name of the Bot resource.
- * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a HealthBot along with {@link Response}.
+ * @return a HealthBot.
*/
- Response getByResourceGroupWithResponse(String resourceGroupName, String botName, Context context);
+ HealthBot getByResourceGroup(String resourceGroupName, String botName);
/**
* Delete a HealthBot.
@@ -58,6 +58,57 @@ public interface Bots {
*/
void delete(String resourceGroupName, String botName, Context context);
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return health Bot Keys Response along with {@link Response}.
+ */
+ Response listSecretsWithResponse(String resourceGroupName, String botName, Context context);
+
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return health Bot Keys Response.
+ */
+ HealthBotKeysResponse listSecrets(String resourceGroupName, String botName);
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an entry of HealthBotKeysResponse along with {@link Response}.
+ */
+ Response regenerateApiJwtSecretWithResponse(
+ String resourceGroupName, String botName, Context context);
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param botName The name of the Bot resource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an entry of HealthBotKeysResponse.
+ */
+ HealthBotKey regenerateApiJwtSecret(String resourceGroupName, String botName);
+
/**
* Returns all the resources of a particular type belonging to a resource group.
*
@@ -65,7 +116,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -77,7 +128,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -86,7 +137,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
PagedIterable list();
@@ -97,7 +148,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 as paginated response with {@link PagedIterable}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
PagedIterable list(Context context);
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 39f10c55185d..1540310023c7 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
@@ -4,7 +4,9 @@
package com.azure.resourcemanager.healthbot.models;
+import com.azure.core.http.rest.Response;
import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
import com.azure.core.util.Context;
import com.azure.resourcemanager.healthbot.fluent.models.HealthBotInner;
import java.util.Map;
@@ -47,19 +49,35 @@ 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: HealthBotProperties 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.
*/
HealthBotProperties properties();
+ /**
+ * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
/**
* Gets the region of the resource.
*
@@ -132,9 +150,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);
@@ -143,7 +161,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.
*
@@ -169,13 +188,25 @@ 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: HealthBotProperties 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 HealthBotProperties 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);
@@ -189,7 +220,8 @@ interface WithProperties {
HealthBot.Update update();
/** The template for HealthBot update. */
- interface Update extends UpdateStages.WithTags, UpdateStages.WithSku {
+ interface Update
+ extends UpdateStages.WithTags, UpdateStages.WithProperties, UpdateStages.WithSku, UpdateStages.WithIdentity {
/**
* Executes the update request.
*
@@ -210,23 +242,46 @@ 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);
}
+ /** The stage of the HealthBot update allowing to specify properties. */
+ interface WithProperties {
+ /**
+ * Specifies the properties property: HealthBotProperties
+ *
+ * Properties of Azure Health Bot..
+ *
+ * @param properties HealthBotProperties
+ *
Properties of Azure Health Bot.
+ * @return the next definition stage.
+ */
+ Update withProperties(HealthBotProperties properties);
+ }
/** 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.
@@ -242,4 +297,44 @@ interface WithSku {
* @return the refreshed resource.
*/
HealthBot refresh(Context context);
+
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @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 health Bot Keys Response along with {@link Response}.
+ */
+ Response listSecretsWithResponse(Context context);
+
+ /**
+ * List all secrets of a HealthBot.
+ *
+ * @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 health Bot Keys Response.
+ */
+ HealthBotKeysResponse listSecrets();
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @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 an entry of HealthBotKeysResponse along with {@link Response}.
+ */
+ Response regenerateApiJwtSecretWithResponse(Context context);
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @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 an entry of HealthBotKeysResponse.
+ */
+ HealthBotKey regenerateApiJwtSecret();
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotKey.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotKey.java
new file mode 100644
index 000000000000..38749c9e1a3c
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotKey.java
@@ -0,0 +1,31 @@
+// 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.resourcemanager.healthbot.fluent.models.HealthBotKeyInner;
+
+/** An immutable client-side representation of HealthBotKey. */
+public interface HealthBotKey {
+ /**
+ * Gets the keyName property: The name of the key.
+ *
+ * @return the keyName value.
+ */
+ String keyName();
+
+ /**
+ * Gets the value property: The value of the key.
+ *
+ * @return the value value.
+ */
+ String value();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeyInner object.
+ *
+ * @return the inner object.
+ */
+ HealthBotKeyInner innerModel();
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotKeysResponse.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotKeysResponse.java
new file mode 100644
index 000000000000..9cb8fc0bb3bb
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/HealthBotKeysResponse.java
@@ -0,0 +1,25 @@
+// 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.resourcemanager.healthbot.fluent.models.HealthBotKeysResponseInner;
+import java.util.List;
+
+/** An immutable client-side representation of HealthBotKeysResponse. */
+public interface HealthBotKeysResponse {
+ /**
+ * Gets the secrets property: Array of Azure Health Bot Secrets.
+ *
+ * @return the secrets value.
+ */
+ List secrets();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.healthbot.fluent.models.HealthBotKeysResponseInner object.
+ *
+ * @return the inner object.
+ */
+ HealthBotKeysResponseInner innerModel();
+}
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 88f93e20775d..04accd01d9c9 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
@@ -4,18 +4,20 @@
package com.azure.resourcemanager.healthbot.models;
-import com.azure.core.annotation.Immutable;
+import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * HealthBotProperties 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
+@Fluent
public final class HealthBotProperties {
/*
- * 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;
@@ -26,8 +28,18 @@ public final class HealthBotProperties {
@JsonProperty(value = "botManagementPortalLink", access = JsonProperty.Access.WRITE_ONLY)
private String botManagementPortalLink;
+ /*
+ * KeyVault properties for the resource encryption.
+ */
+ @JsonProperty(value = "keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /** Creates an instance of HealthBotProperties class. */
+ public HealthBotProperties() {
+ }
+
/**
- * 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.
*/
@@ -44,11 +56,34 @@ public String botManagementPortalLink() {
return this.botManagementPortalLink;
}
+ /**
+ * Get the keyVaultProperties property: KeyVault properties for the resource encryption.
+ *
+ * @return the keyVaultProperties value.
+ */
+ public KeyVaultProperties keyVaultProperties() {
+ return this.keyVaultProperties;
+ }
+
+ /**
+ * Set the keyVaultProperties property: KeyVault properties for the resource encryption.
+ *
+ * @param keyVaultProperties the keyVaultProperties value to set.
+ * @return the HealthBotProperties object itself.
+ */
+ public HealthBotProperties withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (keyVaultProperties() != null) {
+ keyVaultProperties().validate();
+ }
}
}
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 661eae99c99b..5b9e28060632 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
@@ -9,24 +9,72 @@
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 {
/*
- * Tags for a HealthBot.
+ * HealthBotProperties
+ *
+ * Properties of Azure Health Bot.
+ */
+ @JsonProperty(value = "properties")
+ private HealthBotProperties properties;
+
+ /*
+ * 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;
+
+ /** Creates an instance of HealthBotUpdateParameters class. */
+ public HealthBotUpdateParameters() {
+ }
+
+ /**
+ * Get the properties property: HealthBotProperties
+ *
+ * Properties of Azure Health Bot.
+ *
+ * @return the properties value.
+ */
+ public HealthBotProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: HealthBotProperties
+ *
+ *
Properties of Azure Health Bot.
+ *
+ * @param properties the properties value to set.
+ * @return the HealthBotUpdateParameters object itself.
+ */
+ public HealthBotUpdateParameters withProperties(HealthBotProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
/**
- * Get the tags property: Tags for a HealthBot.
+ * Get the tags property: Tags for a Azure Health Bot.
*
* @return the tags value.
*/
@@ -35,7 +83,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.
@@ -46,7 +94,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.
*/
@@ -55,7 +103,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.
@@ -65,14 +113,60 @@ 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.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (properties() != null) {
+ properties().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 000000000000..acff52c8481c
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/Identity.java
@@ -0,0 +1,133 @@
+// 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.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Identity for the resource. */
+@Fluent
+public final class Identity {
+ /*
+ * 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;
+
+ /** Creates an instance of Identity class. */
+ public Identity() {
+ }
+
+ /**
+ * 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/KeyVaultProperties.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/KeyVaultProperties.java
new file mode 100644
index 000000000000..7eb154051777
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/KeyVaultProperties.java
@@ -0,0 +1,141 @@
+// 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.JsonProperty;
+
+/** Properties of the key vault. */
+@Fluent
+public final class KeyVaultProperties {
+ /*
+ * The name of the key vault key.
+ */
+ @JsonProperty(value = "keyName", required = true)
+ private String keyName;
+
+ /*
+ * The version of the key vault key.
+ */
+ @JsonProperty(value = "keyVersion")
+ private String keyVersion;
+
+ /*
+ * The Uri of the key vault.
+ */
+ @JsonProperty(value = "keyVaultUri", required = true)
+ private String keyVaultUri;
+
+ /*
+ * The user assigned identity (ARM resource id) that has access to the key.
+ */
+ @JsonProperty(value = "userIdentity")
+ private String userIdentity;
+
+ /** Creates an instance of KeyVaultProperties class. */
+ public KeyVaultProperties() {
+ }
+
+ /**
+ * Get the keyName property: The name of the key vault key.
+ *
+ * @return the keyName value.
+ */
+ public String keyName() {
+ return this.keyName;
+ }
+
+ /**
+ * Set the keyName property: The name of the key vault key.
+ *
+ * @param keyName the keyName value to set.
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyName(String keyName) {
+ this.keyName = keyName;
+ return this;
+ }
+
+ /**
+ * Get the keyVersion property: The version of the key vault key.
+ *
+ * @return the keyVersion value.
+ */
+ public String keyVersion() {
+ return this.keyVersion;
+ }
+
+ /**
+ * Set the keyVersion property: The version of the key vault key.
+ *
+ * @param keyVersion the keyVersion value to set.
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyVersion(String keyVersion) {
+ this.keyVersion = keyVersion;
+ return this;
+ }
+
+ /**
+ * Get the keyVaultUri property: The Uri of the key vault.
+ *
+ * @return the keyVaultUri value.
+ */
+ public String keyVaultUri() {
+ return this.keyVaultUri;
+ }
+
+ /**
+ * Set the keyVaultUri property: The Uri of the key vault.
+ *
+ * @param keyVaultUri the keyVaultUri value to set.
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withKeyVaultUri(String keyVaultUri) {
+ this.keyVaultUri = keyVaultUri;
+ return this;
+ }
+
+ /**
+ * Get the userIdentity property: The user assigned identity (ARM resource id) that has access to the key.
+ *
+ * @return the userIdentity value.
+ */
+ public String userIdentity() {
+ return this.userIdentity;
+ }
+
+ /**
+ * Set the userIdentity property: The user assigned identity (ARM resource id) that has access to the key.
+ *
+ * @param userIdentity the userIdentity value to set.
+ * @return the KeyVaultProperties object itself.
+ */
+ public KeyVaultProperties withUserIdentity(String userIdentity) {
+ this.userIdentity = userIdentity;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (keyName() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property keyName in model KeyVaultProperties"));
+ }
+ if (keyVaultUri() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property keyVaultUri in model KeyVaultProperties"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(KeyVaultProperties.class);
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDisplay.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDisplay.java
index a54a336dfc16..f1cac3b44756 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDisplay.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDisplay.java
@@ -34,6 +34,10 @@ public final class OperationDisplay {
@JsonProperty(value = "description")
private String description;
+ /** Creates an instance of OperationDisplay class. */
+ public OperationDisplay() {
+ }
+
/**
* Get the provider property: Resource provider of the operation.
*
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 7941ed992509..ac0cab82852b 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 000000000000..004816549b99
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/ResourceIdentityType.java
@@ -0,0 +1,60 @@
+// 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;
+
+/**
+ * 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.
+ */
+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) {
+ if (value == null) {
+ return null;
+ }
+ ResourceIdentityType[] items = ResourceIdentityType.values();
+ for (ResourceIdentityType item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ /** {@inheritDoc} */
+ @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 47ee34fd9c42..e9b330246b84 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
@@ -12,13 +12,17 @@
@Fluent
public final class Sku {
/*
- * The name of the HealthBot SKU
+ * The name of the Azure Health Bot SKU
*/
@JsonProperty(value = "name", required = true)
private SkuName name;
+ /** Creates an instance of Sku class. */
+ public Sku() {
+ }
+
/**
- * 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.
*/
@@ -27,7 +31,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/SkuName.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/SkuName.java
index 02c96b041b69..320ef60971a5 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/SkuName.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/SkuName.java
@@ -7,7 +7,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
-/** Defines values for SkuName. */
+/** The name of the Azure Health Bot SKU. */
public enum SkuName {
/** Enum value F0. */
F0("F0"),
@@ -33,6 +33,9 @@ public enum SkuName {
*/
@JsonCreator
public static SkuName fromString(String value) {
+ if (value == null) {
+ return null;
+ }
SkuName[] items = SkuName.values();
for (SkuName item : items) {
if (item.toString().equalsIgnoreCase(value)) {
@@ -42,6 +45,7 @@ public static SkuName fromString(String value) {
return null;
}
+ /** {@inheritDoc} */
@JsonValue
@Override
public String toString() {
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 000000000000..7ac797eb52d8
--- /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.fasterxml.jackson.annotation.JsonProperty;
+
+/** The details of the user assigned managed identity used by the Video Analyzer resource. */
+@Immutable
+public final class UserAssignedIdentity {
+ /*
+ * 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;
+
+ /** Creates an instance of UserAssignedIdentity class. */
+ public UserAssignedIdentity() {
+ }
+
+ /**
+ * 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 5db4a44c57a8..4ef4974e562b 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 39ba61b5bfe7..b93cad528386 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
index 04c2dd12679e..538a05847eb2 100644
--- 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
@@ -4,13 +4,18 @@
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/2020-12-08/examples/ResourceCreationPut.json
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceCreationPut.json
*/
/**
* Sample code: BotCreate.
@@ -24,6 +29,26 @@ public static void botCreate(com.azure.resourcemanager.healthbot.HealthbotManage
.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
index ed0630bb544a..e8d62da3b27a 100644
--- 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
@@ -4,12 +4,10 @@
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/2020-12-08/examples/ResourceDeletionDelete.json
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceDeletionDelete.json
*/
/**
* Sample code: BotDelete.
@@ -17,6 +15,6 @@ public final class BotsDeleteSamples {
* @param manager Entry point to HealthbotManager.
*/
public static void botDelete(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
- manager.bots().delete("healthbotClient", "samplebotname", Context.NONE);
+ manager.bots().delete("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
}
}
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
index 10ab4eca6132..780a190971f3 100644
--- 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
@@ -4,12 +4,10 @@
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/2020-12-08/examples/ResourceInfoGet.json
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceInfoGet.json
*/
/**
* Sample code: ResourceInfoGet.
@@ -17,6 +15,8 @@ public final class BotsGetByResourceGroupSamples {
* @param manager Entry point to HealthbotManager.
*/
public static void resourceInfoGet(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
- manager.bots().getByResourceGroupWithResponse("healthbotClient", "samplebotname", Context.NONE);
+ manager
+ .bots()
+ .getByResourceGroupWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
}
}
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
index 51ca94181159..cb6ade963794 100644
--- 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
@@ -4,12 +4,10 @@
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/2020-12-08/examples/ListBotsByResourceGroup.json
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ListBotsByResourceGroup.json
*/
/**
* Sample code: List Bots by Resource Group.
@@ -17,6 +15,6 @@ public final class BotsListByResourceGroupSamples {
* @param manager Entry point to HealthbotManager.
*/
public static void listBotsByResourceGroup(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
- manager.bots().listByResourceGroup("OneResourceGroupName", Context.NONE);
+ manager.bots().listByResourceGroup("OneResourceGroupName", com.azure.core.util.Context.NONE);
}
}
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
index dc7af2432225..2d2bd64a399e 100644
--- 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
@@ -4,12 +4,10 @@
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/2020-12-08/examples/ListBotsBySubscription.json
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ListBotsBySubscription.json
*/
/**
* Sample code: List Bots by Subscription.
@@ -17,6 +15,6 @@ public final class BotsListSamples {
* @param manager Entry point to HealthbotManager.
*/
public static void listBotsBySubscription(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
- manager.bots().list(Context.NONE);
+ manager.bots().list(com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListSecretsSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListSecretsSamples.java
new file mode 100644
index 000000000000..a2dd149eef81
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsListSecretsSamples.java
@@ -0,0 +1,20 @@
+// 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;
+
+/** Samples for Bots ListSecrets. */
+public final class BotsListSecretsSamples {
+ /*
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ListSecrets.json
+ */
+ /**
+ * Sample code: Bot List Secrets.
+ *
+ * @param manager Entry point to HealthbotManager.
+ */
+ public static void botListSecrets(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
+ manager.bots().listSecretsWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
+ }
+}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsRegenerateApiJwtSecretSamples.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsRegenerateApiJwtSecretSamples.java
new file mode 100644
index 000000000000..a520dafcbb0c
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/samples/java/com/azure/resourcemanager/healthbot/generated/BotsRegenerateApiJwtSecretSamples.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;
+
+/** Samples for Bots RegenerateApiJwtSecret. */
+public final class BotsRegenerateApiJwtSecretSamples {
+ /*
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/RegenerateApiJwtSecret.json
+ */
+ /**
+ * Sample code: Bot Regenerate API JWT Secret.
+ *
+ * @param manager Entry point to HealthbotManager.
+ */
+ public static void botRegenerateAPIJWTSecret(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
+ manager
+ .bots()
+ .regenerateApiJwtSecretWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE);
+ }
+}
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
index bb59c932228a..8bb0e718047d 100644
--- 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
@@ -4,7 +4,6 @@
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;
@@ -12,7 +11,7 @@
/** Samples for Bots Update. */
public final class BotsUpdateSamples {
/*
- * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2020-12-08/examples/ResourceUpdatePatch.json
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/ResourceUpdatePatch.json
*/
/**
* Sample code: BotUpdate.
@@ -21,7 +20,10 @@ public final class BotsUpdateSamples {
*/
public static void botUpdate(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
HealthBot resource =
- manager.bots().getByResourceGroupWithResponse("healthbotClient", "samplebotname", Context.NONE).getValue();
+ manager
+ .bots()
+ .getByResourceGroupWithResponse("healthbotClient", "samplebotname", com.azure.core.util.Context.NONE)
+ .getValue();
resource.update().withSku(new Sku().withName(SkuName.F0)).apply();
}
}
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
index 87a4903f3e2b..1184adfced5e 100644
--- 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
@@ -4,12 +4,10 @@
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/2020-12-08/examples/GetOperations.json
+ * x-ms-original-file: specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2022-08-08/examples/GetOperations.json
*/
/**
* Sample code: Get Operations.
@@ -17,6 +15,6 @@ public final class OperationsListSamples {
* @param manager Entry point to HealthbotManager.
*/
public static void getOperations(com.azure.resourcemanager.healthbot.HealthbotManager manager) {
- manager.operations().list(Context.NONE);
+ manager.operations().list(com.azure.core.util.Context.NONE);
}
}