diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 62711bd793fc..cee9a8fb637c 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -309,7 +309,7 @@ com.azure.resourcemanager:azure-resourcemanager-recoveryservices;1.5.0;1.6.0
com.azure.resourcemanager:azure-resourcemanager-kusto;1.2.0;1.3.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-loganalytics;2.0.0;2.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-eventgrid;1.2.0;1.3.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-healthbot;1.1.0;1.2.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-healthbot;1.1.0;1.2.0
com.azure.resourcemanager:azure-resourcemanager-confluent;1.2.0;1.3.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-digitaltwins;1.3.0;1.4.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-netapp;2.0.0;2.1.0-beta.2
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md b/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md
index 50f9f53217ff..f09ee0a33054 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/CHANGELOG.md
@@ -1,14 +1,51 @@
# Release History
-## 1.2.0-beta.1 (Unreleased)
+## 1.2.0 (2026-01-05)
-### Features Added
+- Azure Resource Manager Healthbot client library for Java. This package contains Microsoft Azure SDK for Healthbot Management SDK. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package api-version 2025-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.BotResponseList` was removed
-### Other Changes
+#### `models.AvailableOperations` was removed
+
+#### `models.UserAssignedIdentity` was modified
+
+* `validate()` was removed
+
+#### `models.HealthBotUpdateParameters` was modified
+
+* `validate()` was removed
+
+#### `models.Identity` was modified
+
+* `validate()` was removed
+
+#### `models.KeyVaultProperties` was modified
+
+* `validate()` was removed
+
+#### `models.HealthBotProperties` was modified
+
+* `validate()` was removed
+
+#### `HealthbotManager` was modified
+
+* `fluent.HealthbotClient serviceClient()` -> `fluent.HealthbotManagementClient serviceClient()`
+
+#### `models.Sku` was modified
+
+* `validate()` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `OperationDisplay()` was changed to private access
+* `withProvider(java.lang.String)` was removed
+* `withDescription(java.lang.String)` was removed
+* `withResource(java.lang.String)` was removed
+* `validate()` was removed
+* `withOperation(java.lang.String)` was removed
## 1.1.0 (2025-07-21)
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/README.md b/sdk/healthbot/azure-resourcemanager-healthbot/README.md
index f9ab87654b13..c53b96e2ec53 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/README.md
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Healthbot client library for Java.
-This package contains Microsoft Azure SDK for Healthbot Management SDK. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2025-05-25. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Healthbot Management SDK. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package api-version 2025-11-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-healthbot
- 1.1.0
+ 1.2.0
```
[//]: # ({x-version-update-end})
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md b/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md
index e1852b12f880..468bb6466b28 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/SAMPLE.md
@@ -31,8 +31,7 @@ import java.util.Map;
*/
public final class BotsCreateSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/ResourceCreationPut.json
+ * x-ms-original-file: 2025-11-01/ResourceCreationPut.json
*/
/**
* Sample code: BotCreate.
@@ -76,9 +75,7 @@ public final class BotsCreateSamples {
*/
public final class BotsDeleteSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/ResourceDeletionDelete.
- * json
+ * x-ms-original-file: 2025-11-01/ResourceDeletionDelete.json
*/
/**
* Sample code: BotDelete.
@@ -99,8 +96,7 @@ public final class BotsDeleteSamples {
*/
public final class BotsGetByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/ResourceInfoGet.json
+ * x-ms-original-file: 2025-11-01/ResourceInfoGet.json
*/
/**
* Sample code: ResourceInfoGet.
@@ -122,9 +118,7 @@ public final class BotsGetByResourceGroupSamples {
*/
public final class BotsListSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/ListBotsBySubscription.
- * json
+ * x-ms-original-file: 2025-11-01/ListBotsBySubscription.json
*/
/**
* Sample code: List Bots by Subscription.
@@ -145,9 +139,7 @@ public final class BotsListSamples {
*/
public final class BotsListByResourceGroupSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/ListBotsByResourceGroup.
- * json
+ * x-ms-original-file: 2025-11-01/ListBotsByResourceGroup.json
*/
/**
* Sample code: List Bots by Resource Group.
@@ -168,8 +160,7 @@ public final class BotsListByResourceGroupSamples {
*/
public final class BotsListSecretsSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/ListSecrets.json
+ * x-ms-original-file: 2025-11-01/ListSecrets.json
*/
/**
* Sample code: Bot List Secrets.
@@ -190,9 +181,7 @@ public final class BotsListSecretsSamples {
*/
public final class BotsRegenerateApiJwtSecretSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/RegenerateApiJwtSecret.
- * json
+ * x-ms-original-file: 2025-11-01/RegenerateApiJwtSecret.json
*/
/**
* Sample code: Bot Regenerate API JWT Secret.
@@ -218,8 +207,7 @@ import com.azure.resourcemanager.healthbot.models.SkuName;
*/
public final class BotsUpdateSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/ResourceUpdatePatch.json
+ * x-ms-original-file: 2025-11-01/ResourceUpdatePatch.json
*/
/**
* Sample code: BotUpdate.
@@ -243,8 +231,7 @@ public final class BotsUpdateSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file:
- * specification/healthbot/resource-manager/Microsoft.HealthBot/stable/2025-05-25/examples/GetOperations.json
+ * x-ms-original-file: 2025-11-01/GetOperations.json
*/
/**
* Sample code: Get Operations.
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml b/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml
index 1441ff51c97f..4505e1187c77 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/pom.xml
@@ -1,7 +1,7 @@
4.0.0
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-healthbot
- 1.2.0-beta.1
+ 1.2.0
jar
Microsoft Azure SDK for Healthbot Management
- This package contains Microsoft Azure SDK for Healthbot Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package tag package-2025-05-25.
+ This package contains Microsoft Azure SDK for Healthbot Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Health Bot is a cloud platform that empowers developers in Healthcare organizations to build and deploy their compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs. Package api-version 2025-11-01.
https://github.com/Azure/azure-sdk-for-java
@@ -45,6 +45,7 @@
UTF-8
0
0
+ true
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java
index e43b654f0e7f..47f2afaa7732 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/HealthbotManager.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot;
@@ -24,9 +24,9 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.healthbot.fluent.HealthbotClient;
+import com.azure.resourcemanager.healthbot.fluent.HealthbotManagementClient;
import com.azure.resourcemanager.healthbot.implementation.BotsImpl;
-import com.azure.resourcemanager.healthbot.implementation.HealthbotClientBuilder;
+import com.azure.resourcemanager.healthbot.implementation.HealthbotManagementClientBuilder;
import com.azure.resourcemanager.healthbot.implementation.OperationsImpl;
import com.azure.resourcemanager.healthbot.models.Bots;
import com.azure.resourcemanager.healthbot.models.Operations;
@@ -44,16 +44,16 @@
* compliant, AI-powered virtual health assistants and health bots, that help them improve processes and reduce costs.
*/
public final class HealthbotManager {
- private Bots bots;
-
private Operations operations;
- private final HealthbotClient clientObject;
+ private Bots bots;
+
+ private final HealthbotManagementClient clientObject;
private HealthbotManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject = new HealthbotClientBuilder().pipeline(httpPipeline)
+ this.clientObject = new HealthbotManagementClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
@@ -263,18 +263,6 @@ public HealthbotManager authenticate(TokenCredential credential, AzureProfile pr
}
}
- /**
- * Gets the resource collection API of Bots. It manages HealthBot.
- *
- * @return Resource collection API of Bots.
- */
- public Bots bots() {
- if (this.bots == null) {
- this.bots = new BotsImpl(clientObject.getBots(), this);
- }
- return bots;
- }
-
/**
* Gets the resource collection API of Operations.
*
@@ -288,12 +276,24 @@ public Operations operations() {
}
/**
- * Gets wrapped service client HealthbotClient providing direct access to the underlying auto-generated API
- * implementation, based on Azure REST API.
+ * Gets the resource collection API of Bots. It manages HealthBot.
+ *
+ * @return Resource collection API of Bots.
+ */
+ public Bots bots() {
+ if (this.bots == null) {
+ this.bots = new BotsImpl(clientObject.getBots(), this);
+ }
+ return bots;
+ }
+
+ /**
+ * Gets wrapped service client HealthbotManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
*
- * @return Wrapped service client HealthbotClient.
+ * @return Wrapped service client HealthbotManagementClient.
*/
- public HealthbotClient serviceClient() {
+ public HealthbotManagementClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java
index ea4c07e35f66..4f080b31e0a9 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/BotsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.fluent;
@@ -20,10 +20,37 @@
* An instance of this class provides access to all the operations defined in BotsClient.
*/
public interface BotsClient {
+ /**
+ * Get a HealthBot.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String botName, Context context);
+
+ /**
+ * Get a HealthBot.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 a HealthBot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthBotInner getByResourceGroup(String resourceGroupName, String botName);
+
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -38,7 +65,7 @@ SyncPoller, HealthBotInner> beginCreate(String resour
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @param context The context to associate with this operation.
@@ -54,7 +81,7 @@ SyncPoller, HealthBotInner> beginCreate(String resour
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -68,7 +95,7 @@ SyncPoller, HealthBotInner> beginCreate(String resour
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @param context The context to associate with this operation.
@@ -80,37 +107,10 @@ SyncPoller, HealthBotInner> beginCreate(String resour
@ServiceMethod(returns = ReturnType.SINGLE)
HealthBotInner create(String resourceGroupName, String botName, HealthBotInner parameters, 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}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- 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.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- HealthBotInner getByResourceGroup(String resourceGroupName, String botName);
-
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -125,7 +125,7 @@ SyncPoller, HealthBotInner> beginUpdate(String resour
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -141,7 +141,7 @@ SyncPoller, HealthBotInner> beginUpdate(String resour
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -155,7 +155,7 @@ SyncPoller, HealthBotInner> beginUpdate(String resour
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -171,7 +171,7 @@ HealthBotInner update(String resourceGroupName, String botName, HealthBotUpdateP
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -184,7 +184,7 @@ HealthBotInner update(String resourceGroupName, String botName, HealthBotUpdateP
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -198,7 +198,7 @@ HealthBotInner update(String resourceGroupName, String botName, HealthBotUpdateP
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -210,7 +210,7 @@ HealthBotInner update(String resourceGroupName, String botName, HealthBotUpdateP
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -221,105 +221,105 @@ HealthBotInner update(String resourceGroupName, String botName, HealthBotUpdateP
void delete(String resourceGroupName, String botName, Context context);
/**
- * List all secrets of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @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.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return health Bot Keys Response along with {@link Response}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response listSecretsWithResponse(String resourceGroupName, String botName,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * List all secrets of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param botName The name of the Bot resource.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return health Bot Keys Response.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- HealthBotKeysResponseInner listSecrets(String resourceGroupName, String botName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
- * Regenerate the API JWT Secret of a HealthBot.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @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}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response regenerateApiJwtSecretWithResponse(String resourceGroupName, String botName,
- Context context);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
/**
- * Regenerate the API JWT Secret of a HealthBot.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @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.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- HealthBotKeyInner regenerateApiJwtSecret(String resourceGroupName, String botName);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * List all secrets of a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return health Bot Keys Response along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listSecretsWithResponse(String resourceGroupName, String botName,
+ Context context);
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * List all secrets of a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return health Bot Keys Response.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthBotKeysResponseInner listSecrets(String resourceGroupName, String botName);
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * Regenerate the API JWT Secret of a HealthBot.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return an entry of HealthBotKeysResponse along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list();
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response regenerateApiJwtSecretWithResponse(String resourceGroupName, String botName,
+ Context context);
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * Regenerate the API JWT Secret of a HealthBot.
*
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return an entry of HealthBotKeysResponse.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable list(Context context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ HealthBotKeyInner regenerateApiJwtSecret(String resourceGroupName, String botName);
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/HealthbotClient.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/HealthbotManagementClient.java
similarity index 79%
rename from sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/HealthbotClient.java
rename to sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/HealthbotManagementClient.java
index 8e3431b9b3e4..46f826c5c5f2 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/HealthbotClient.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/HealthbotManagementClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.fluent;
@@ -8,30 +8,30 @@
import java.time.Duration;
/**
- * The interface for HealthbotClient class.
+ * The interface for HealthbotManagementClient class.
*/
-public interface HealthbotClient {
+public interface HealthbotManagementClient {
/**
- * Gets Azure Subscription ID.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -47,16 +47,16 @@ public interface HealthbotClient {
Duration getDefaultPollInterval();
/**
- * Gets the BotsClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the BotsClient object.
+ * @return the OperationsClient object.
*/
- BotsClient getBots();
+ OperationsClient getOperations();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the BotsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the BotsClient object.
*/
- OperationsClient getOperations();
+ BotsClient getBots();
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java
index f115cb7a7bfb..960479c6b996 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/fluent/OperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.fluent;
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 7f6bc2a18077..7a0252308876 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
@@ -1,13 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.fluent.models;
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.json.JsonReader;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
@@ -22,6 +21,11 @@
*/
@Fluent
public final class HealthBotInner extends Resource {
+ /*
+ * The set of properties specific to Azure Health Bot resource.
+ */
+ private HealthBotProperties properties;
+
/*
* SKU of the Azure Health Bot.
*/
@@ -33,12 +37,7 @@ public final class HealthBotInner extends Resource {
private Identity identity;
/*
- * The set of properties specific to Azure Health Bot resource.
- */
- private HealthBotProperties properties;
-
- /*
- * Metadata pertaining to creation and last modification of the resource
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
@@ -63,6 +62,26 @@ public final class HealthBotInner extends Resource {
public HealthBotInner() {
}
+ /**
+ * Get the properties property: The set of properties specific to Azure Health Bot resource.
+ *
+ * @return the properties value.
+ */
+ public HealthBotProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The set of properties specific to Azure Health Bot resource.
+ *
+ * @param properties the properties value to set.
+ * @return the HealthBotInner object itself.
+ */
+ public HealthBotInner withProperties(HealthBotProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
/**
* Get the sku property: SKU of the Azure Health Bot.
*
@@ -104,27 +123,7 @@ public HealthBotInner withIdentity(Identity identity) {
}
/**
- * Get the properties property: The set of properties specific to Azure Health Bot resource.
- *
- * @return the properties value.
- */
- public HealthBotProperties properties() {
- return this.properties;
- }
-
- /**
- * Set the properties property: The set of properties specific to Azure Health Bot resource.
- *
- * @param properties the properties value to set.
- * @return the HealthBotInner object itself.
- */
- public HealthBotInner withProperties(HealthBotProperties properties) {
- this.properties = properties;
- return this;
- }
-
- /**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -180,28 +179,6 @@ public HealthBotInner withTags(Map tags) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (sku() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property sku in model HealthBotInner"));
- } else {
- sku().validate();
- }
- if (identity() != null) {
- identity().validate();
- }
- if (properties() != null) {
- properties().validate();
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(HealthBotInner.class);
-
/**
* {@inheritDoc}
*/
@@ -211,8 +188,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("sku", this.sku);
- jsonWriter.writeJsonField("identity", this.identity);
jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
return jsonWriter.writeEndObject();
}
@@ -245,10 +222,10 @@ public static HealthBotInner fromJson(JsonReader jsonReader) throws IOException
deserializedHealthBotInner.withTags(tags);
} else if ("sku".equals(fieldName)) {
deserializedHealthBotInner.sku = Sku.fromJson(reader);
- } else if ("identity".equals(fieldName)) {
- deserializedHealthBotInner.identity = Identity.fromJson(reader);
} else if ("properties".equals(fieldName)) {
deserializedHealthBotInner.properties = HealthBotProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedHealthBotInner.identity = Identity.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
deserializedHealthBotInner.systemData = SystemData.fromJson(reader);
} else {
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
index 0a60b570841b..611b317712d5 100644
--- 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
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -14,7 +14,7 @@
/**
* An entry of HealthBotKeysResponse.
*/
-@Fluent
+@Immutable
public final class HealthBotKeyInner implements JsonSerializable {
/*
* The name of the key.
@@ -29,7 +29,7 @@ public final class HealthBotKeyInner implements JsonSerializable {
/*
* Array of Azure Health Bot Secrets.
@@ -25,7 +25,7 @@ public final class HealthBotKeysResponseInner implements JsonSerializable 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());
- }
- }
-
/**
* {@inheritDoc}
*/
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 2f1ecc5453dc..1832ded80a3a 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
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.fluent.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -15,7 +15,7 @@
/**
* Operation detail payload.
*/
-@Fluent
+@Immutable
public final class OperationDetailInner implements JsonSerializable {
/*
* Name of the operation
@@ -45,7 +45,7 @@ public final class OperationDetailInner implements JsonSerializable>> create(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") HealthBotInner parameters,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
- @ExpectedResponses({ 200, 201 })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response createSync(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") HealthBotInner parameters,
@HeaderParam("Accept") String accept, Context context);
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
- @ExpectedResponses({ 200 })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono>> create(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") HealthBotInner parameters, Context context);
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
- @ExpectedResponses({ 200 })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
+ @ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response getByResourceGroupSync(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Response createSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") HealthBotInner parameters, Context context);
- @Headers({ "Content-Type: application/json" })
@Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> update(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") HealthBotUpdateParameters parameters, @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") HealthBotUpdateParameters parameters, Context context);
- @Headers({ "Content-Type: application/json" })
@Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({ 200, 201 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response updateSync(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion,
- @BodyParam("application/json") HealthBotUpdateParameters parameters, @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") HealthBotUpdateParameters parameters, Context context);
- @Headers({ "Content-Type: application/json" })
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({ 200, 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ Context context);
- @Headers({ "Content-Type: application/json" })
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
@Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}")
@ExpectedResponses({ 200, 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response deleteSync(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId,
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
- @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+ Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/listSecrets")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots")
@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);
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/listSecrets")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response listSecretsSync(@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);
+ Response listByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/regenerateApiJwtSecret")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots")
@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);
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/regenerateApiJwtSecret")
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response regenerateApiJwtSecretSync(@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);
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots")
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/listSecrets")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ Mono> listSecrets(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots")
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/listSecrets")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response listByResourceGroupSync(@HostParam("$host") String endpoint,
- @PathParam("resourceGroupName") String resourceGroupName,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ Response listSecretsSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots")
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/regenerateApiJwtSecret")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ Mono> regenerateApiJwtSecret(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/providers/Microsoft.HealthBot/healthBots")
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HealthBot/healthBots/{botName}/regenerateApiJwtSecret")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response listSync(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ Response regenerateApiJwtSecretSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("botName") String botName,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -229,7 +222,7 @@ Response listSync(@HostParam("$host") String endpoint,
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -237,7 +230,7 @@ Mono> listByResourceGroupNext(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Response listByResourceGroupNextSync(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -245,20 +238,90 @@ Response listByResourceGroupNextSync(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a HealthBot.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 a HealthBot along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String botName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a HealthBot.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 a HealthBot on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String botName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, botName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a HealthBot.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String botName,
+ Context context) {
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, accept, context);
+ }
+
+ /**
+ * Get a HealthBot.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 a HealthBot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public HealthBotInner getByResourceGroup(String resourceGroupName, String botName) {
+ return getByResourceGroupWithResponse(resourceGroupName, botName, Context.NONE).getValue();
}
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -270,37 +333,18 @@ Response listNextSync(@PathParam(value = "nextLink", encoded =
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(String resourceGroupName, String botName,
HealthBotInner parameters) {
- 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."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.create(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, botName, this.client.getApiVersion(), parameters, accept, context))
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, contentType, accept, parameters, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -311,39 +355,16 @@ private Mono>> createWithResponseAsync(String resource
@ServiceMethod(returns = ReturnType.SINGLE)
private Response createWithResponse(String resourceGroupName, String botName,
HealthBotInner parameters) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- if (parameters == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
- return service.createSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- botName, this.client.getApiVersion(), parameters, accept, Context.NONE);
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, contentType, accept, parameters, Context.NONE);
}
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @param context The context to associate with this operation.
@@ -355,39 +376,16 @@ private Response createWithResponse(String resourceGroupName, String
@ServiceMethod(returns = ReturnType.SINGLE)
private Response createWithResponse(String resourceGroupName, String botName, HealthBotInner parameters,
Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- if (parameters == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
- return service.createSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- botName, this.client.getApiVersion(), parameters, accept, context);
+ return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, contentType, accept, parameters, context);
}
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -406,7 +404,7 @@ private PollerFlux, HealthBotInner> beginCreateAsync(
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -425,7 +423,7 @@ public SyncPoller, HealthBotInner> beginCreate(String
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @param context The context to associate with this operation.
@@ -445,7 +443,7 @@ public SyncPoller, HealthBotInner> beginCreate(String
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -462,7 +460,7 @@ private Mono createAsync(String resourceGroupName, String botNam
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -478,7 +476,7 @@ public HealthBotInner create(String resourceGroupName, String botName, HealthBot
/**
* Create a new Azure Health Bot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param botName The name of the Bot resource.
* @param parameters The parameters to provide for the created Azure Health Bot.
* @param context The context to associate with this operation.
@@ -492,114 +490,10 @@ public HealthBotInner create(String resourceGroupName, String botName, HealthBot
return beginCreate(resourceGroupName, botName, parameters, context).getFinalResult();
}
- /**
- * Get 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 a HealthBot along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, botName, this.client.getApiVersion(), accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Get 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 a HealthBot on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String botName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, botName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * 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 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}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(String resourceGroupName, String botName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- final String accept = "application/json";
- return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, botName, this.client.getApiVersion(), accept, 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.
- * @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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public HealthBotInner getByResourceGroup(String resourceGroupName, String botName) {
- return getByResourceGroupWithResponse(resourceGroupName, botName, Context.NONE).getValue();
- }
-
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -611,37 +505,18 @@ public HealthBotInner getByResourceGroup(String resourceGroupName, String botNam
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(String resourceGroupName, String botName,
HealthBotUpdateParameters parameters) {
- 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."));
- }
- if (parameters == null) {
- return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, botName, this.client.getApiVersion(), parameters, accept, context))
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, contentType, accept, parameters, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -652,39 +527,16 @@ private Mono>> updateWithResponseAsync(String resource
@ServiceMethod(returns = ReturnType.SINGLE)
private Response updateWithResponse(String resourceGroupName, String botName,
HealthBotUpdateParameters parameters) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- if (parameters == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
- return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- botName, this.client.getApiVersion(), parameters, accept, Context.NONE);
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, contentType, accept, parameters, Context.NONE);
}
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -696,39 +548,16 @@ private Response updateWithResponse(String resourceGroupName, String
@ServiceMethod(returns = ReturnType.SINGLE)
private Response updateWithResponse(String resourceGroupName, String botName,
HealthBotUpdateParameters parameters, Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- if (parameters == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
- } else {
- parameters.validate();
- }
+ final String contentType = "application/json";
final String accept = "application/json";
- return service.updateSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- botName, this.client.getApiVersion(), parameters, accept, context);
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, contentType, accept, parameters, context);
}
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -747,7 +576,7 @@ private PollerFlux, HealthBotInner> beginUpdateAsync(
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -766,7 +595,7 @@ public SyncPoller, HealthBotInner> beginUpdate(String
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -786,7 +615,7 @@ public SyncPoller, HealthBotInner> beginUpdate(String
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -804,7 +633,7 @@ private Mono updateAsync(String resourceGroupName, String botNam
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -820,7 +649,7 @@ public HealthBotInner update(String resourceGroupName, String botName, HealthBot
/**
* Patch a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -838,7 +667,7 @@ public HealthBotInner update(String resourceGroupName, String botName, HealthBot
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -847,32 +676,16 @@ public HealthBotInner update(String resourceGroupName, String botName, HealthBot
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, botName, this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -881,33 +694,14 @@ private Mono>> deleteWithResponseAsync(String resource
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Response deleteWithResponse(String resourceGroupName, String botName) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- final String accept = "application/json";
- return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- botName, this.client.getApiVersion(), accept, Context.NONE);
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, Context.NONE);
}
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -917,33 +711,14 @@ private Response deleteWithResponse(String resourceGroupName, String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Response deleteWithResponse(String resourceGroupName, String botName, Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- final String accept = "application/json";
- return service.deleteSync(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName,
- botName, this.client.getApiVersion(), accept, context);
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, context);
}
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -960,7 +735,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -976,7 +751,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -993,7 +768,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -1008,7 +783,7 @@ private Mono deleteAsync(String resourceGroupName, String botName) {
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -1022,7 +797,7 @@ public void delete(String resourceGroupName, String botName) {
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -1035,296 +810,159 @@ public void delete(String resourceGroupName, String botName, Context context) {
}
/**
- * List all secrets of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param botName The name of the Bot resource.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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}.
+ * @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> 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."));
- }
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(),
- resourceGroupName, botName, this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * List all secrets of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param botName The name of the Bot resource.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listSecretsAsync(String resourceGroupName, String botName) {
- return listSecretsWithResponseAsync(resourceGroupName, botName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
- * List all secrets of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @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.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response listSecretsWithResponse(String resourceGroupName, String botName,
- Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
final String accept = "application/json";
- return service.listSecretsSync(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.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public HealthBotKeysResponseInner listSecrets(String resourceGroupName, String botName) {
- return listSecretsWithResponse(resourceGroupName, botName, Context.NONE).getValue();
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Regenerate the API JWT Secret of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param botName The name of the Bot resource.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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}.
+ * @return the list of Azure Health Bot operation response along with {@link PagedResponse}.
*/
@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."));
- }
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) {
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()));
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Regenerate the API JWT Secret of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param botName The name of the Bot resource.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono regenerateApiJwtSecretAsync(String resourceGroupName, String botName) {
- return regenerateApiJwtSecretWithResponseAsync(resourceGroupName, botName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
}
/**
- * Regenerate the API JWT Secret of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param botName The name of the Bot resource.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (botName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter botName is required and cannot be null."));
- }
- final String accept = "application/json";
- return service.regenerateApiJwtSecretSync(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.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- public HealthBotKeyInner regenerateApiJwtSecret(String resourceGroupName, String botName) {
- return regenerateApiJwtSecretWithResponse(resourceGroupName, botName, Context.NONE).getValue();
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
}
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @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 Azure Health Bot operation response along with {@link PagedResponse} on successful completion
* of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ private Mono> listSinglePageAsync() {
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName,
- this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @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 Azure Health Bot operation response as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @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 Azure Health Bot operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ private PagedResponse listSinglePage() {
final String accept = "application/json";
- Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName,
- this.client.getSubscriptionId(), this.client.getApiVersion(), accept, Context.NONE);
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, Context.NONE);
return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
res.getValue().nextLink(), null);
}
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
* @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.
@@ -1332,47 +970,29 @@ private PagedResponse listByResourceGroupSinglePage(String resou
* @return the list of Azure Health Bot operation response along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (resourceGroupName == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ private PagedResponse listSinglePage(Context context) {
final String accept = "application/json";
- Response res = service.listByResourceGroupSync(this.client.getEndpoint(), resourceGroupName,
- this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context);
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context);
return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
res.getValue().nextLink(), null);
}
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @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 Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePage(nextLink));
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink));
}
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
* @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.
@@ -1380,128 +1000,149 @@ public PagedIterable listByResourceGroup(String resourceGroupNam
* @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) {
- return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context));
}
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * List all secrets of a HealthBot.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response along with {@link PagedResponse} on successful completion
- * of {@link Mono}.
+ * @return health Bot Keys Response along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync() {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ private Mono> listSecretsWithResponseAsync(String resourceGroupName,
+ String botName) {
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
- this.client.getApiVersion(), accept, context))
- .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
- res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * List all secrets of a HealthBot.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedFlux}.
+ * @return health Bot Keys Response on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listSecretsAsync(String resourceGroupName, String botName) {
+ return listSecretsWithResponseAsync(resourceGroupName, botName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * List all secrets of a HealthBot.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response along with {@link PagedResponse}.
+ * @return health Bot Keys Response along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listSinglePage() {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ public Response listSecretsWithResponse(String resourceGroupName, String botName,
+ Context context) {
final String accept = "application/json";
- Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
- this.client.getApiVersion(), accept, Context.NONE);
- return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
- res.getValue().nextLink(), null);
+ return service.listSecretsSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, accept, context);
}
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * List all secrets of a HealthBot.
*
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response along with {@link PagedResponse}.
+ * @return health Bot Keys Response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private PagedResponse listSinglePage(Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() is required and cannot be null."));
- }
+ 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 resource group. The name is case insensitive.
+ * @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) {
final String accept = "application/json";
- Response res = service.listSync(this.client.getEndpoint(), this.client.getSubscriptionId(),
- this.client.getApiVersion(), accept, context);
- return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
- res.getValue().nextLink(), null);
+ return FluxUtil
+ .withContext(
+ context -> service.regenerateApiJwtSecret(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * Regenerate the API JWT Secret of a HealthBot.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return an entry of HealthBotKeysResponse on successful completion of {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list() {
- return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono regenerateApiJwtSecretAsync(String resourceGroupName, String botName) {
+ return regenerateApiJwtSecretWithResponseAsync(resourceGroupName, botName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
}
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * Regenerate the API JWT Secret of a HealthBot.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return an entry of HealthBotKeysResponse along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable list(Context context) {
- return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response regenerateApiJwtSecretWithResponse(String resourceGroupName, String botName,
+ Context context) {
+ final String accept = "application/json";
+ return service.regenerateApiJwtSecretSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, botName, accept, context);
+ }
+
+ /**
+ * Regenerate the API JWT Secret of a HealthBot.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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();
}
/**
@@ -1516,13 +1157,6 @@ public PagedIterable list(Context context) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -1543,15 +1177,6 @@ private Mono> listByResourceGroupNextSinglePageAsy
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listByResourceGroupNextSinglePage(String nextLink) {
- if (nextLink == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res
= service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
@@ -1571,15 +1196,6 @@ private PagedResponse listByResourceGroupNextSinglePage(String n
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) {
- if (nextLink == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res
= service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
@@ -1599,13 +1215,6 @@ private PagedResponse listByResourceGroupNextSinglePage(String n
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
@@ -1624,15 +1233,6 @@ private Mono> listNextSinglePageAsync(String nextL
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listNextSinglePage(String nextLink) {
- if (nextLink == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
@@ -1651,20 +1251,9 @@ private PagedResponse listNextSinglePage(String nextLink) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listNextSinglePage(String nextLink, Context context) {
- if (nextLink == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
res.getValue().nextLink(), null);
}
-
- private static final ClientLogger LOGGER = new ClientLogger(BotsClientImpl.class);
}
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 721301798b4d..9f0d202dc9d5 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
@@ -59,6 +59,26 @@ public void delete(String resourceGroupName, String botName, Context context) {
this.serviceClient().delete(resourceGroupName, botName, context);
}
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
+ }
+
public Response listSecretsWithResponse(String resourceGroupName, String botName,
Context context) {
Response inner
@@ -101,26 +121,6 @@ public HealthBotKey regenerateApiJwtSecret(String resourceGroupName, String botN
}
}
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
- }
-
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new HealthBotImpl(inner1, this.manager()));
- }
-
public HealthBot getById(String id) {
String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
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 f1c7f5559b66..52334c17117d 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
@@ -49,6 +49,10 @@ public Map tags() {
}
}
+ public HealthBotProperties properties() {
+ return this.innerModel().properties();
+ }
+
public Sku sku() {
return this.innerModel().sku();
}
@@ -57,10 +61,6 @@ public Identity identity() {
return this.innerModel().identity();
}
- public HealthBotProperties properties() {
- return this.innerModel().properties();
- }
-
public SystemData systemData() {
return this.innerModel().systemData();
}
@@ -202,22 +202,22 @@ public HealthBotImpl withTags(Map tags) {
}
}
- public HealthBotImpl withIdentity(Identity identity) {
+ public HealthBotImpl withProperties(HealthBotProperties properties) {
if (isInCreateMode()) {
- this.innerModel().withIdentity(identity);
+ this.innerModel().withProperties(properties);
return this;
} else {
- this.updateParameters.withIdentity(identity);
+ this.updateParameters.withProperties(properties);
return this;
}
}
- public HealthBotImpl withProperties(HealthBotProperties properties) {
+ public HealthBotImpl withIdentity(Identity identity) {
if (isInCreateMode()) {
- this.innerModel().withProperties(properties);
+ this.innerModel().withIdentity(identity);
return this;
} else {
- this.updateParameters.withProperties(properties);
+ this.updateParameters.withIdentity(identity);
return this;
}
}
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
index 06f8b9d56b9d..a1ce425218db 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
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
index 06d843b817cc..286663789eaf 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
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/HealthbotManagementClientBuilder.java
similarity index 63%
rename from sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientBuilder.java
rename to sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotManagementClientBuilder.java
index 7d8818fba68e..71a1d1c6f7f9 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/HealthbotManagementClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
@@ -15,39 +15,39 @@
import java.time.Duration;
/**
- * A builder for creating a new instance of the HealthbotClientImpl type.
+ * A builder for creating a new instance of the HealthbotManagementClientImpl type.
*/
-@ServiceClientBuilder(serviceClients = { HealthbotClientImpl.class })
-public final class HealthbotClientBuilder {
+@ServiceClientBuilder(serviceClients = { HealthbotManagementClientImpl.class })
+public final class HealthbotManagementClientBuilder {
/*
- * Azure Subscription ID.
+ * Service host
*/
- private String subscriptionId;
+ private String endpoint;
/**
- * Sets Azure Subscription ID.
+ * Sets Service host.
*
- * @param subscriptionId the subscriptionId value.
- * @return the HealthbotClientBuilder.
+ * @param endpoint the endpoint value.
+ * @return the HealthbotManagementClientBuilder.
*/
- public HealthbotClientBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
+ public HealthbotManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
/*
- * server parameter
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String endpoint;
+ private String subscriptionId;
/**
- * Sets server parameter.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
- * @param endpoint the endpoint value.
- * @return the HealthbotClientBuilder.
+ * @param subscriptionId the subscriptionId value.
+ * @return the HealthbotManagementClientBuilder.
*/
- public HealthbotClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
+ public HealthbotManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
return this;
}
@@ -60,9 +60,9 @@ public HealthbotClientBuilder endpoint(String endpoint) {
* Sets The environment to connect to.
*
* @param environment the environment value.
- * @return the HealthbotClientBuilder.
+ * @return the HealthbotManagementClientBuilder.
*/
- public HealthbotClientBuilder environment(AzureEnvironment environment) {
+ public HealthbotManagementClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
@@ -76,9 +76,9 @@ public HealthbotClientBuilder environment(AzureEnvironment environment) {
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
- * @return the HealthbotClientBuilder.
+ * @return the HealthbotManagementClientBuilder.
*/
- public HealthbotClientBuilder pipeline(HttpPipeline pipeline) {
+ public HealthbotManagementClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
@@ -92,9 +92,9 @@ public HealthbotClientBuilder pipeline(HttpPipeline pipeline) {
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
- * @return the HealthbotClientBuilder.
+ * @return the HealthbotManagementClientBuilder.
*/
- public HealthbotClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ public HealthbotManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -108,19 +108,19 @@ public HealthbotClientBuilder defaultPollInterval(Duration defaultPollInterval)
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
- * @return the HealthbotClientBuilder.
+ * @return the HealthbotManagementClientBuilder.
*/
- public HealthbotClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ public HealthbotManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
- * Builds an instance of HealthbotClientImpl with the provided parameters.
+ * Builds an instance of HealthbotManagementClientImpl with the provided parameters.
*
- * @return an instance of HealthbotClientImpl.
+ * @return an instance of HealthbotManagementClientImpl.
*/
- public HealthbotClientImpl buildClient() {
+ public HealthbotManagementClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
@@ -131,8 +131,8 @@ public HealthbotClientImpl buildClient() {
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
- HealthbotClientImpl client = new HealthbotClientImpl(localPipeline, localSerializerAdapter,
- localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ HealthbotManagementClientImpl client = new HealthbotManagementClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
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/HealthbotManagementClientImpl.java
similarity index 90%
rename from sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotClientImpl.java
rename to sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/HealthbotManagementClientImpl.java
index b07aec2814aa..73561471376b 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/HealthbotManagementClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
@@ -27,7 +27,7 @@
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.healthbot.fluent.BotsClient;
-import com.azure.resourcemanager.healthbot.fluent.HealthbotClient;
+import com.azure.resourcemanager.healthbot.fluent.HealthbotManagementClient;
import com.azure.resourcemanager.healthbot.fluent.OperationsClient;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -39,31 +39,17 @@
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the HealthbotClientImpl type.
+ * Initializes a new instance of the HealthbotManagementClientImpl type.
*/
-@ServiceClient(builder = HealthbotClientBuilder.class)
-public final class HealthbotClientImpl implements HealthbotClient {
+@ServiceClient(builder = HealthbotManagementClientBuilder.class)
+public final class HealthbotManagementClientImpl implements HealthbotManagementClient {
/**
- * Azure Subscription ID.
- */
- private final String subscriptionId;
-
- /**
- * Gets Azure Subscription ID.
- *
- * @return the subscriptionId value.
- */
- public String getSubscriptionId() {
- return this.subscriptionId;
- }
-
- /**
- * server parameter.
+ * Service host.
*/
private final String endpoint;
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
@@ -72,12 +58,12 @@ public String getEndpoint() {
}
/**
- * Api Version.
+ * Version parameter.
*/
private final String apiVersion;
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -85,6 +71,20 @@ public String getApiVersion() {
return this.apiVersion;
}
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* The HTTP pipeline to send requests through.
*/
@@ -128,53 +128,53 @@ public Duration getDefaultPollInterval() {
}
/**
- * The BotsClient object to access its operations.
+ * The OperationsClient object to access its operations.
*/
- private final BotsClient bots;
+ private final OperationsClient operations;
/**
- * Gets the BotsClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the BotsClient object.
+ * @return the OperationsClient object.
*/
- public BotsClient getBots() {
- return this.bots;
+ public OperationsClient getOperations() {
+ return this.operations;
}
/**
- * The OperationsClient object to access its operations.
+ * The BotsClient object to access its operations.
*/
- private final OperationsClient operations;
+ private final BotsClient bots;
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the BotsClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the BotsClient object.
*/
- public OperationsClient getOperations() {
- return this.operations;
+ public BotsClient getBots() {
+ return this.bots;
}
/**
- * Initializes an instance of HealthbotClient client.
+ * Initializes an instance of HealthbotManagementClient client.
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId Azure Subscription ID.
- * @param endpoint server parameter.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
*/
- HealthbotClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
- AzureEnvironment environment, String subscriptionId, String endpoint) {
+ HealthbotManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2025-05-25";
- this.bots = new BotsClientImpl(this);
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2025-11-01";
this.operations = new OperationsClientImpl(this);
+ this.bots = new BotsClientImpl(this);
}
/**
@@ -320,5 +320,5 @@ public Mono getBodyAsString(Charset charset) {
}
}
- private static final ClientLogger LOGGER = new ClientLogger(HealthbotClientImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(HealthbotManagementClientImpl.class);
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java
index fb42dad0bbf5..4284d9af0042 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationDetailImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
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 bb48662e5fdd..5ff53f29a8e9 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
@@ -25,10 +25,9 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.healthbot.fluent.OperationsClient;
import com.azure.resourcemanager.healthbot.fluent.models.OperationDetailInner;
-import com.azure.resourcemanager.healthbot.models.AvailableOperations;
+import com.azure.resourcemanager.healthbot.implementation.models.AvailableOperations;
import reactor.core.publisher.Mono;
/**
@@ -43,38 +42,38 @@ public final class OperationsClientImpl implements OperationsClient {
/**
* The service client containing this operation class.
*/
- private final HealthbotClientImpl client;
+ private final HealthbotManagementClientImpl client;
/**
* Initializes an instance of OperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- OperationsClientImpl(HealthbotClientImpl client) {
+ OperationsClientImpl(HealthbotManagementClientImpl client) {
this.service
= RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for HealthbotClientOperations to be used by the proxy service to perform
- * REST calls.
+ * The interface defining all the services for HealthbotManagementClientOperations to be used by the proxy service
+ * to perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "HealthbotClientOperations")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "HealthbotManagementClientOperations")
public interface OperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.HealthBot/operations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
+ Mono> list(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.HealthBot/operations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Response listSync(@HostParam("$host") String endpoint,
+ Response listSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -82,14 +81,14 @@ Response listSync(@HostParam("$host") String endpoint,
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
@@ -102,10 +101,6 @@ Response listNextSync(@PathParam(value = "nextLink", encode
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -136,11 +131,6 @@ private PagedFlux listAsync() {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listSinglePage() {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res
= service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE);
@@ -159,11 +149,6 @@ private PagedResponse listSinglePage() {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listSinglePage(Context context) {
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res
= service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context);
@@ -209,13 +194,6 @@ public PagedIterable list(Context context) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listNextSinglePageAsync(String nextLink) {
- if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(),
@@ -234,15 +212,6 @@ private Mono> listNextSinglePageAsync(String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listNextSinglePage(String nextLink) {
- if (nextLink == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res
= service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
@@ -262,20 +231,9 @@ private PagedResponse listNextSinglePage(String nextLink)
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PagedResponse listNextSinglePage(String nextLink, Context context) {
- if (nextLink == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
- }
- if (this.client.getEndpoint() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException(
- "Parameter this.client.getEndpoint() is required and cannot be null."));
- }
final String accept = "application/json";
Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
res.getValue().nextLink(), null);
}
-
- private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class);
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java
index 4debd161871e..c5588ae7e84d 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/OperationsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.implementation;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/ResourceManagerUtils.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/ResourceManagerUtils.java
index 0d785497dbcf..4136bed06dc8 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/ResourceManagerUtils.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/ResourceManagerUtils.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
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/implementation/models/AvailableOperations.java
similarity index 71%
rename from sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/AvailableOperations.java
rename to sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/models/AvailableOperations.java
index e11f8241f6e4..0e2fd4268339 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/implementation/models/AvailableOperations.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.resourcemanager.healthbot.models;
+package com.azure.resourcemanager.healthbot.implementation.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -16,10 +16,10 @@
/**
* Available operations of the service.
*/
-@Fluent
+@Immutable
public final class AvailableOperations implements JsonSerializable {
/*
- * Collection of available operation details
+ * Collection of available operation details.
*/
private List value;
@@ -32,7 +32,7 @@ public final class AvailableOperations implements JsonSerializable value() {
return this.value;
}
- /**
- * Set the value property: Collection of available operation details.
- *
- * @param value the value value to set.
- * @return the AvailableOperations object itself.
- */
- public AvailableOperations withValue(List value) {
- this.value = value;
- return this;
- }
-
/**
* Get the nextLink property: URL client should use to fetch the next page (per server side paging).
* It's null for now, added for future use.
@@ -65,29 +54,6 @@ public String nextLink() {
return this.nextLink;
}
- /**
- * Set the nextLink property: URL client should use to fetch the next page (per server side paging).
- * It's null for now, added for future use.
- *
- * @param nextLink the nextLink value to set.
- * @return the AvailableOperations object itself.
- */
- public AvailableOperations withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
- }
-
/**
* {@inheritDoc}
*/
@@ -105,6 +71,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of AvailableOperations if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the AvailableOperations.
*/
public static AvailableOperations fromJson(JsonReader jsonReader) throws IOException {
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/implementation/models/BotResponseList.java
similarity index 74%
rename from sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/BotResponseList.java
rename to sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/implementation/models/BotResponseList.java
index 8dc65ca3fc69..e2b595ecef9f 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/implementation/models/BotResponseList.java
@@ -1,8 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.resourcemanager.healthbot.models;
+package com.azure.resourcemanager.healthbot.implementation.models;
import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
@@ -19,32 +19,23 @@
@Immutable
public final class BotResponseList implements JsonSerializable {
/*
- * The link used to get the next page of bot service resources.
+ * The HealthBot items on this page
*/
- private String nextLink;
+ private List value;
/*
- * Gets the list of Azure Health Bot results and their properties.
+ * The link to the next page of items
*/
- private List value;
+ private String nextLink;
/**
* Creates an instance of BotResponseList class.
*/
- public BotResponseList() {
+ private BotResponseList() {
}
/**
- * Get the nextLink property: The link used to get the next page of bot service resources.
- *
- * @return the nextLink value.
- */
- public String nextLink() {
- return this.nextLink;
- }
-
- /**
- * Get the value property: Gets the list of Azure Health Bot results and their properties.
+ * Get the value property: The HealthBot items on this page.
*
* @return the value value.
*/
@@ -53,14 +44,12 @@ public List value() {
}
/**
- * Validates the instance.
+ * Get the nextLink property: The link to the next page of items.
*
- * @throws IllegalArgumentException thrown if the instance is not valid.
+ * @return the nextLink value.
*/
- public void validate() {
- if (value() != null) {
- value().forEach(e -> e.validate());
- }
+ public String nextLink() {
+ return this.nextLink;
}
/**
@@ -69,6 +58,7 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("nextLink", this.nextLink);
return jsonWriter.writeEndObject();
}
@@ -78,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of BotResponseList if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the BotResponseList.
*/
public static BotResponseList fromJson(JsonReader jsonReader) throws IOException {
@@ -87,11 +78,11 @@ public static BotResponseList fromJson(JsonReader jsonReader) throws IOException
String fieldName = reader.getFieldName();
reader.nextToken();
- if ("nextLink".equals(fieldName)) {
- deserializedBotResponseList.nextLink = reader.getString();
- } else if ("value".equals(fieldName)) {
+ if ("value".equals(fieldName)) {
List value = reader.readArray(reader1 -> HealthBotInner.fromJson(reader1));
deserializedBotResponseList.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedBotResponseList.nextLink = reader.getString();
} else {
reader.skipChildren();
}
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 49fb29b674c4..8cdb71eb9f9f 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
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the implementations for HealthbotClient.
+ * Package containing the implementations for HealthbotManagementClient.
* 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.
*/
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 a6fce596ad43..f63da70468f3 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
@@ -15,7 +15,7 @@ public interface Bots {
/**
* Get a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -28,7 +28,7 @@ public interface Bots {
/**
* Get a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -40,7 +40,7 @@ public interface Bots {
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -51,7 +51,7 @@ public interface Bots {
/**
* Delete a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @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.
@@ -61,98 +61,98 @@ public interface Bots {
void delete(String resourceGroupName, String botName, Context context);
/**
- * List all secrets of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @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.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return health Bot Keys Response along with {@link Response}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- Response listSecretsWithResponse(String resourceGroupName, String botName, Context context);
+ PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * List all secrets of a HealthBot.
+ * Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param botName The name of the Bot resource.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return health Bot Keys Response.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- HealthBotKeysResponse listSecrets(String resourceGroupName, String botName);
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
/**
- * Regenerate the API JWT Secret of a HealthBot.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @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}.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- Response regenerateApiJwtSecretWithResponse(String resourceGroupName, String botName,
- Context context);
+ PagedIterable list();
/**
- * Regenerate the API JWT Secret of a HealthBot.
+ * Returns all the resources of a particular type belonging to a subscription.
*
- * @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.
+ * @return the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
*/
- HealthBotKey regenerateApiJwtSecret(String resourceGroupName, String botName);
+ PagedIterable list(Context context);
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * List all secrets of a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return health Bot Keys Response along with {@link Response}.
*/
- PagedIterable listByResourceGroup(String resourceGroupName);
+ Response listSecretsWithResponse(String resourceGroupName, String botName, Context context);
/**
- * Returns all the resources of a particular type belonging to a resource group.
+ * List all secrets of a HealthBot.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return health Bot Keys Response.
*/
- PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+ HealthBotKeysResponse listSecrets(String resourceGroupName, String botName);
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * Regenerate the API JWT Secret of a HealthBot.
*
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return an entry of HealthBotKeysResponse along with {@link Response}.
*/
- PagedIterable list();
+ Response regenerateApiJwtSecretWithResponse(String resourceGroupName, String botName,
+ Context context);
/**
- * Returns all the resources of a particular type belonging to a subscription.
+ * Regenerate the API JWT Secret of a HealthBot.
*
- * @param context The context to associate with this operation.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @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 the list of Azure Health Bot operation response as paginated response with {@link PagedIterable}.
+ * @return an entry of HealthBotKeysResponse.
*/
- PagedIterable list(Context context);
+ HealthBotKey regenerateApiJwtSecret(String resourceGroupName, String botName);
/**
* Get a HealthBot.
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 10d5cfc7eab4..cbbee588cff0 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
@@ -50,6 +50,13 @@ public interface HealthBot {
*/
Map tags();
+ /**
+ * Gets the properties property: The set of properties specific to Azure Health Bot resource.
+ *
+ * @return the properties value.
+ */
+ HealthBotProperties properties();
+
/**
* Gets the sku property: SKU of the Azure Health Bot.
*
@@ -65,14 +72,7 @@ public interface HealthBot {
Identity identity();
/**
- * Gets the properties property: 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.
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -151,7 +151,7 @@ interface WithResourceGroup {
/**
* Specifies resourceGroupName.
*
- * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @return the next definition stage.
*/
WithSku withExistingResourceGroup(String resourceGroupName);
@@ -175,7 +175,7 @@ interface WithSku {
* be created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
- extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, DefinitionStages.WithProperties {
+ extends DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithIdentity {
/**
* Executes the create request.
*
@@ -206,29 +206,29 @@ interface WithTags {
}
/**
- * The stage of the HealthBot definition allowing to specify identity.
+ * The stage of the HealthBot definition allowing to specify properties.
*/
- interface WithIdentity {
+ interface WithProperties {
/**
- * Specifies the identity property: The identity of the Azure Health Bot..
+ * Specifies the properties property: The set of properties specific to Azure Health Bot resource..
*
- * @param identity The identity of the Azure Health Bot.
+ * @param properties The set of properties specific to Azure Health Bot resource.
* @return the next definition stage.
*/
- WithCreate withIdentity(Identity identity);
+ WithCreate withProperties(HealthBotProperties properties);
}
/**
- * The stage of the HealthBot definition allowing to specify properties.
+ * The stage of the HealthBot definition allowing to specify identity.
*/
- interface WithProperties {
+ interface WithIdentity {
/**
- * Specifies the properties property: The set of properties specific to Azure Health Bot resource..
+ * Specifies the identity property: The identity of the Azure Health Bot..
*
- * @param properties The set of properties specific to Azure Health Bot resource.
+ * @param identity The identity of the Azure Health Bot.
* @return the next definition stage.
*/
- WithCreate withProperties(HealthBotProperties properties);
+ WithCreate withIdentity(Identity identity);
}
}
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
index 0b4efacdc4ec..798afe4fbb0b 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
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
index 240722534efd..eab34beca5b3 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
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 bf627845b0f9..5504984ece2b 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
@@ -12,8 +12,6 @@
import java.io.IOException;
/**
- * 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.
@@ -93,17 +91,6 @@ public String accessControlMethod() {
return this.accessControlMethod;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (keyVaultProperties() != null) {
- keyVaultProperties().validate();
- }
- }
-
/**
* {@inheritDoc}
*/
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 abde320c131e..cb8b320654f1 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
@@ -148,23 +148,6 @@ public HealthBotUpdateParameters withLocation(String 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();
- }
- }
-
/**
* {@inheritDoc}
*/
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
index 1de2a7925197..6f767a638016 100644
--- 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
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
@@ -115,21 +115,6 @@ public Identity withUserAssignedIdentities(Map use
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();
- }
- });
- }
- }
-
/**
* {@inheritDoc}
*/
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
index 8aeef2fd7a35..818ae7a357b4 100644
--- 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
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -123,24 +122,6 @@ public KeyVaultProperties withUserIdentity(String userIdentity) {
return this;
}
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (keyName() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property keyName in model KeyVaultProperties"));
- }
- if (keyVaultUri() == null) {
- throw LOGGER.atError()
- .log(new IllegalArgumentException("Missing required property keyVaultUri in model KeyVaultProperties"));
- }
- }
-
- private static final ClientLogger LOGGER = new ClientLogger(KeyVaultProperties.class);
-
/**
* {@inheritDoc}
*/
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDetail.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDetail.java
index f187c4cd5ab7..99ec1bac1ee7 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDetail.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/main/java/com/azure/resourcemanager/healthbot/models/OperationDetail.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
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 983a3a7000c7..a81bed1abe4b 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
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -14,7 +14,7 @@
/**
* Operation display payload.
*/
-@Fluent
+@Immutable
public final class OperationDisplay implements JsonSerializable {
/*
* Resource provider of the operation
@@ -39,7 +39,7 @@ public final class OperationDisplay implements JsonSerializable Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD));
- manager.bots().delete("aozwyiftyhxhu", "okftyxolniwpwcuk", com.azure.core.util.Context.NONE);
+ manager.bots().delete("jbasvmsmjqulngs", "tnb", com.azure.core.util.Context.NONE);
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/IdentityTests.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/IdentityTests.java
index a4c6ea55d358..33048c1c2d4e 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/IdentityTests.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/IdentityTests.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.generated;
@@ -16,7 +16,7 @@ public final class IdentityTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
Identity model = BinaryData.fromString(
- "{\"principalId\":\"jnqglhqgnu\",\"tenantId\":\"oo\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"glzlhjxrifkwmrv\":{\"principalId\":\"qes\",\"clientId\":\"gdf\"},\"uajpsquc\":{\"principalId\":\"siznto\",\"clientId\":\"pa\"},\"knygjofjddeq\":{\"principalId\":\"o\",\"clientId\":\"dkfo\"},\"usarhmofc\":{\"principalId\":\"deupewnwrei\",\"clientId\":\"zyf\"}}}")
+ "{\"principalId\":\"s\",\"tenantId\":\"nyejhkryhtnap\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"nchgej\":{\"principalId\":\"jye\",\"clientId\":\"kvnipjoxz\"},\"wyahuxinpmqnja\":{\"principalId\":\"odmailzyd\",\"clientId\":\"o\"}}}")
.toObject(Identity.class);
Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type());
}
@@ -25,8 +25,7 @@ public void testDeserialize() throws Exception {
public void testSerialize() throws Exception {
Identity model = new Identity().withType(ResourceIdentityType.USER_ASSIGNED)
.withUserAssignedIdentities(
- mapOf("glzlhjxrifkwmrv", new UserAssignedIdentity(), "uajpsquc", new UserAssignedIdentity(),
- "knygjofjddeq", new UserAssignedIdentity(), "usarhmofc", new UserAssignedIdentity()));
+ mapOf("nchgej", new UserAssignedIdentity(), "wyahuxinpmqnja", new UserAssignedIdentity()));
model = BinaryData.fromObject(model).toObject(Identity.class);
Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type());
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDetailInnerTests.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDetailInnerTests.java
index f6d4e7a8a8df..d2794b3285c8 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDetailInnerTests.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDetailInnerTests.java
@@ -1,46 +1,25 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.generated;
import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.healthbot.fluent.models.OperationDetailInner;
-import com.azure.resourcemanager.healthbot.models.OperationDisplay;
import org.junit.jupiter.api.Assertions;
public final class OperationDetailInnerTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
OperationDetailInner model = BinaryData.fromString(
- "{\"name\":\"ngbwjz\",\"isDataAction\":true,\"display\":{\"provider\":\"xgispemvtzfkufu\",\"resource\":\"jofxqe\",\"operation\":\"jaeq\",\"description\":\"qjbasvms\"},\"origin\":\"qulngsntnbybkzgc\",\"properties\":\"datawclxxwrl\"}")
+ "{\"name\":\"kuksjtxukcdm\",\"isDataAction\":true,\"display\":{\"provider\":\"y\",\"resource\":\"nzwuxzd\",\"operation\":\"a\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"kknryrtihf\",\"properties\":\"dataijbpzvgnwzsymgl\"}")
.toObject(OperationDetailInner.class);
- Assertions.assertEquals("ngbwjz", model.name());
+ Assertions.assertEquals("kuksjtxukcdm", model.name());
Assertions.assertTrue(model.isDataAction());
- Assertions.assertEquals("xgispemvtzfkufu", model.display().provider());
- Assertions.assertEquals("jofxqe", model.display().resource());
- Assertions.assertEquals("jaeq", model.display().operation());
- Assertions.assertEquals("qjbasvms", model.display().description());
- Assertions.assertEquals("qulngsntnbybkzgc", model.origin());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDetailInner model = new OperationDetailInner().withName("ngbwjz")
- .withIsDataAction(true)
- .withDisplay(new OperationDisplay().withProvider("xgispemvtzfkufu")
- .withResource("jofxqe")
- .withOperation("jaeq")
- .withDescription("qjbasvms"))
- .withOrigin("qulngsntnbybkzgc")
- .withProperties("datawclxxwrl");
- model = BinaryData.fromObject(model).toObject(OperationDetailInner.class);
- Assertions.assertEquals("ngbwjz", model.name());
- Assertions.assertTrue(model.isDataAction());
- Assertions.assertEquals("xgispemvtzfkufu", model.display().provider());
- Assertions.assertEquals("jofxqe", model.display().resource());
- Assertions.assertEquals("jaeq", model.display().operation());
- Assertions.assertEquals("qjbasvms", model.display().description());
- Assertions.assertEquals("qulngsntnbybkzgc", model.origin());
+ Assertions.assertEquals("y", model.display().provider());
+ Assertions.assertEquals("nzwuxzd", model.display().resource());
+ Assertions.assertEquals("a", model.display().operation());
+ Assertions.assertEquals("lhmwhfpmrqobm", model.display().description());
+ Assertions.assertEquals("kknryrtihf", model.origin());
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDisplayTests.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDisplayTests.java
index c379ba23ddfa..b9b4e22cc85a 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDisplayTests.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationDisplayTests.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.generated;
@@ -11,25 +11,13 @@
public final class OperationDisplayTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
- OperationDisplay model = BinaryData.fromString(
- "{\"provider\":\"ouskcqvkocrc\",\"resource\":\"kwt\",\"operation\":\"xbnjbiksq\",\"description\":\"lssai\"}")
+ OperationDisplay model = BinaryData
+ .fromString(
+ "{\"provider\":\"fcyzkohdbihanufh\",\"resource\":\"bj\",\"operation\":\"a\",\"description\":\"th\"}")
.toObject(OperationDisplay.class);
- Assertions.assertEquals("ouskcqvkocrc", model.provider());
- Assertions.assertEquals("kwt", model.resource());
- Assertions.assertEquals("xbnjbiksq", model.operation());
- Assertions.assertEquals("lssai", model.description());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationDisplay model = new OperationDisplay().withProvider("ouskcqvkocrc")
- .withResource("kwt")
- .withOperation("xbnjbiksq")
- .withDescription("lssai");
- model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
- Assertions.assertEquals("ouskcqvkocrc", model.provider());
- Assertions.assertEquals("kwt", model.resource());
- Assertions.assertEquals("xbnjbiksq", model.operation());
- Assertions.assertEquals("lssai", model.description());
+ Assertions.assertEquals("fcyzkohdbihanufh", model.provider());
+ Assertions.assertEquals("bj", model.resource());
+ Assertions.assertEquals("a", model.operation());
+ Assertions.assertEquals("th", model.description());
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationsListMockTests.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationsListMockTests.java
index b3c59290a8d4..1b1ea6d3e13a 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationsListMockTests.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/OperationsListMockTests.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.generated;
@@ -22,7 +22,7 @@ public final class OperationsListMockTests {
@Test
public void testList() throws Exception {
String responseStr
- = "{\"value\":[{\"name\":\"u\",\"isDataAction\":true,\"display\":{\"provider\":\"khbzhfepgzg\",\"resource\":\"xzlocxscp\",\"operation\":\"erhhbcsglumm\",\"description\":\"tjaodxobnb\"},\"origin\":\"k\",\"properties\":\"dataxo\"}]}";
+ = "{\"value\":[{\"name\":\"fsinzgvfcjrwzoxx\",\"isDataAction\":true,\"display\":{\"provider\":\"luwfzitonpeqfpjk\",\"resource\":\"xofpdvhpfxxypi\",\"operation\":\"nmayhuybb\",\"description\":\"odepoogin\"},\"origin\":\"amiheognarxz\",\"properties\":\"dataheotusiv\"}]}";
HttpClient httpClient
= response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8)));
@@ -33,12 +33,12 @@ public void testList() throws Exception {
PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE);
- Assertions.assertEquals("u", response.iterator().next().name());
+ Assertions.assertEquals("fsinzgvfcjrwzoxx", response.iterator().next().name());
Assertions.assertTrue(response.iterator().next().isDataAction());
- Assertions.assertEquals("khbzhfepgzg", response.iterator().next().display().provider());
- Assertions.assertEquals("xzlocxscp", response.iterator().next().display().resource());
- Assertions.assertEquals("erhhbcsglumm", response.iterator().next().display().operation());
- Assertions.assertEquals("tjaodxobnb", response.iterator().next().display().description());
- Assertions.assertEquals("k", response.iterator().next().origin());
+ Assertions.assertEquals("luwfzitonpeqfpjk", response.iterator().next().display().provider());
+ Assertions.assertEquals("xofpdvhpfxxypi", response.iterator().next().display().resource());
+ Assertions.assertEquals("nmayhuybb", response.iterator().next().display().operation());
+ Assertions.assertEquals("odepoogin", response.iterator().next().display().description());
+ Assertions.assertEquals("amiheognarxz", response.iterator().next().origin());
}
}
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/SkuTests.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/SkuTests.java
index d39481f35c41..9e04e3c26c8e 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/SkuTests.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/SkuTests.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.generated;
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/UserAssignedIdentityTests.java b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/UserAssignedIdentityTests.java
index fc83c335d317..e9a5438eb761 100644
--- a/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/UserAssignedIdentityTests.java
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/src/test/java/com/azure/resourcemanager/healthbot/generated/UserAssignedIdentityTests.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.healthbot.generated;
@@ -10,8 +10,9 @@
public final class UserAssignedIdentityTests {
@org.junit.jupiter.api.Test
public void testDeserialize() throws Exception {
- UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"smy\",\"clientId\":\"kdtmlxhekuk\"}")
- .toObject(UserAssignedIdentity.class);
+ UserAssignedIdentity model
+ = BinaryData.fromString("{\"principalId\":\"ixjsprozvcputeg\",\"clientId\":\"wmfdatscmdvpjhul\"}")
+ .toObject(UserAssignedIdentity.class);
}
@org.junit.jupiter.api.Test
diff --git a/sdk/healthbot/azure-resourcemanager-healthbot/tsp-location.yaml b/sdk/healthbot/azure-resourcemanager-healthbot/tsp-location.yaml
new file mode 100644
index 000000000000..923f26107ca8
--- /dev/null
+++ b/sdk/healthbot/azure-resourcemanager-healthbot/tsp-location.yaml
@@ -0,0 +1,4 @@
+directory: specification/healthbot/HealthBot.Management
+commit: 53d56e4ec74156c450d1e51745a971d3f2031dd7
+repo: Azure/azure-rest-api-specs
+additionalDirectories: