diff --git a/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md b/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md
index 314e7e6e67760..7c7b27975633a 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md
+++ b/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md
@@ -1,7 +1,71 @@
# Release History
-## 1.0.0-beta.2 (Unreleased)
+## 1.0.0-beta.2 (2021-10-09)
+- Azure Resource Manager BotService client library for Java. This package contains Microsoft Azure SDK for BotService Management SDK. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-preview-2021-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+### Features Added
+
+* `models.OperationResultsDescription` was added
+
+* `models.PrivateLinkResources` was added
+
+* `models.PrivateEndpointConnection$DefinitionStages` was added
+
+* `models.PrivateEndpointConnections` was added
+
+* `models.OperationResultStatus` was added
+
+* `models.PrivateLinkServiceConnectionState` was added
+
+* `models.PrivateEndpointConnectionProvisioningState` was added
+
+* `models.PrivateEndpointConnectionListResult` was added
+
+* `models.PrivateLinkResource` was added
+
+* `models.PrivateEndpoint` was added
+
+* `models.PrivateEndpointConnection` was added
+
+* `models.PrivateEndpointServiceConnectionStatus` was added
+
+* `models.PrivateLinkResourceBase` was added
+
+* `models.PrivateEndpointConnection$Definition` was added
+
+* `models.MsaAppType` was added
+
+* `models.OperationResults` was added
+
+* `models.PrivateLinkResourceListResult` was added
+
+#### `models.BotProperties` was modified
+
+* `msaAppMsiResourceId()` was added
+* `privateEndpointConnections()` was added
+* `withMsaAppMsiResourceId(java.lang.String)` was added
+* `disableLocalAuth()` was added
+* `msaAppTenantId()` was added
+* `withMsaAppType(models.MsaAppType)` was added
+* `withDisableLocalAuth(java.lang.Boolean)` was added
+* `msaAppType()` was added
+* `withMsaAppTenantId(java.lang.String)` was added
+
+#### `BotServiceManager$Configurable` was modified
+
+* `withScope(java.lang.String)` was added
+
+#### `models.SlackChannelProperties` was modified
+
+* `scopes()` was added
+* `withScopes(java.lang.String)` was added
+
+#### `BotServiceManager` was modified
+
+* `privateEndpointConnections()` was added
+* `operationResults()` was added
+* `privateLinkResources()` was added
## 1.0.0-beta.1 (2021-05-14)
diff --git a/sdk/botservice/azure-resourcemanager-botservice/README.md b/sdk/botservice/azure-resourcemanager-botservice/README.md
index 34966ddd3cd57..c8a759e8e6d50 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/README.md
+++ b/sdk/botservice/azure-resourcemanager-botservice/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager BotService client library for Java.
-This package contains Microsoft Azure SDK for BotService Management SDK. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-2021-03-01. 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 BotService Management SDK. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-preview-2021-05. 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-botservice
- 1.0.0-beta.1
+ 1.0.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md b/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md
new file mode 100644
index 0000000000000..1a921cac31687
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md
@@ -0,0 +1,1116 @@
+# Code snippets and samples
+
+
+## BotConnection
+
+- [Create](#botconnection_create)
+- [Delete](#botconnection_delete)
+- [Get](#botconnection_get)
+- [ListByBotService](#botconnection_listbybotservice)
+- [ListServiceProviders](#botconnection_listserviceproviders)
+- [ListWithSecrets](#botconnection_listwithsecrets)
+- [Update](#botconnection_update)
+
+## Bots
+
+- [Create](#bots_create)
+- [Delete](#bots_delete)
+- [GetByResourceGroup](#bots_getbyresourcegroup)
+- [GetCheckNameAvailability](#bots_getchecknameavailability)
+- [List](#bots_list)
+- [ListByResourceGroup](#bots_listbyresourcegroup)
+- [Update](#bots_update)
+
+## Channels
+
+- [Create](#channels_create)
+- [Delete](#channels_delete)
+- [Get](#channels_get)
+- [ListByResourceGroup](#channels_listbyresourcegroup)
+- [ListWithKeys](#channels_listwithkeys)
+- [Update](#channels_update)
+
+## DirectLine
+
+- [RegenerateKeys](#directline_regeneratekeys)
+
+## HostSettings
+
+- [Get](#hostsettings_get)
+
+## OperationResults
+
+- [Get](#operationresults_get)
+
+## Operations
+
+- [List](#operations_list)
+
+## PrivateEndpointConnections
+
+- [Create](#privateendpointconnections_create)
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [List](#privateendpointconnections_list)
+
+## PrivateLinkResources
+
+- [ListByBotResource](#privatelinkresources_listbybotresource)
+### BotConnection_Create
+
+```java
+import com.azure.resourcemanager.botservice.models.ConnectionSettingParameter;
+import com.azure.resourcemanager.botservice.models.ConnectionSettingProperties;
+import java.util.Arrays;
+
+/** Samples for BotConnection Create. */
+public final class BotConnectionCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutConnection.json
+ */
+ /**
+ * Sample code: Create Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .define("sampleConnection")
+ .withRegion("West US")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new ConnectionSettingProperties()
+ .withClientId("sampleclientid")
+ .withClientSecret("samplesecret")
+ .withScopes("samplescope")
+ .withServiceProviderId("serviceproviderid")
+ .withParameters(
+ Arrays
+ .asList(
+ new ConnectionSettingParameter().withKey("key1").withValue("value1"),
+ new ConnectionSettingParameter().withKey("key2").withValue("value2"))))
+ .withEtag("etag1")
+ .create();
+ }
+}
+```
+
+### BotConnection_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection Delete. */
+public final class BotConnectionDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .deleteWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE);
+ }
+}
+```
+
+### BotConnection_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection Get. */
+public final class BotConnectionGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE);
+ }
+}
+```
+
+### BotConnection_ListByBotService
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection ListByBotService. */
+public final class BotConnectionListByBotServiceSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListConnectionsByBotService.json
+ */
+ /**
+ * Sample code: List Connection Settings.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listConnectionSettings(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.botConnections().listByBotService("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
+```
+
+### BotConnection_ListServiceProviders
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection ListServiceProviders. */
+public final class BotConnectionListServiceProvidersSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListServiceProviders.json
+ */
+ /**
+ * Sample code: List Auth Service Providers.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listAuthServiceProviders(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.botConnections().listServiceProvidersWithResponse(Context.NONE);
+ }
+}
+```
+
+### BotConnection_ListWithSecrets
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection ListWithSecrets. */
+public final class BotConnectionListWithSecretsSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .listWithSecretsWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE);
+ }
+}
+```
+
+### BotConnection_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.ConnectionSetting;
+import com.azure.resourcemanager.botservice.models.ConnectionSettingParameter;
+import com.azure.resourcemanager.botservice.models.ConnectionSettingProperties;
+import java.util.Arrays;
+
+/** Samples for BotConnection Update. */
+public final class BotConnectionUpdateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ ConnectionSetting resource =
+ manager
+ .botConnections()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new ConnectionSettingProperties()
+ .withClientId("sampleclientid")
+ .withClientSecret("samplesecret")
+ .withScopes("samplescope")
+ .withServiceProviderId("serviceproviderid")
+ .withServiceProviderDisplayName("serviceProviderDisplayName")
+ .withParameters(
+ Arrays
+ .asList(
+ new ConnectionSettingParameter().withKey("key1").withValue("value1"),
+ new ConnectionSettingParameter().withKey("key2").withValue("value2"))))
+ .withEtag("etag1")
+ .apply();
+ }
+}
+```
+
+### Bots_Create
+
+```java
+import com.azure.resourcemanager.botservice.models.BotProperties;
+import com.azure.resourcemanager.botservice.models.Kind;
+import com.azure.resourcemanager.botservice.models.MsaAppType;
+import com.azure.resourcemanager.botservice.models.Sku;
+import com.azure.resourcemanager.botservice.models.SkuName;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Bots Create. */
+public final class BotsCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/CreateBot.json
+ */
+ /**
+ * Sample code: Create Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .bots()
+ .define("samplebotname")
+ .withRegion("West US")
+ .withExistingResourceGroup("OneResourceGroupName")
+ .withTags(mapOf("tag1", "value1", "tag2", "value2"))
+ .withProperties(
+ new BotProperties()
+ .withDisplayName("The Name of the bot")
+ .withDescription("The description of the bot")
+ .withIconUrl("http://myicon")
+ .withEndpoint("http://mybot.coffee")
+ .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI)
+ .withMsaAppId("exampleappid")
+ .withMsaAppTenantId("exampleapptenantid")
+ .withMsaAppMsiResourceId(
+ "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId")
+ .withDeveloperAppInsightKey("appinsightskey")
+ .withDeveloperAppInsightsApiKey("appinsightsapikey")
+ .withDeveloperAppInsightsApplicationId("appinsightsappid")
+ .withLuisAppIds(Arrays.asList("luisappid1", "luisappid2"))
+ .withLuisKey("luiskey")
+ .withIsCmekEnabled(true)
+ .withCmekKeyVaultUrl("https://myCmekKey")
+ .withIsIsolated(false)
+ .withDisableLocalAuth(true)
+ .withSchemaTransformationVersion("1.0"))
+ .withSku(new Sku().withName(SkuName.S1))
+ .withKind(Kind.SDK)
+ .withEtag("etag1")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Bots_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Bots Delete. */
+public final class BotsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteBot.json
+ */
+ /**
+ * Sample code: Delete Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deleteBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().deleteWithResponse("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
+```
+
+### Bots_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Bots GetByResourceGroup. */
+public final class BotsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetBot.json
+ */
+ /**
+ * Sample code: Get Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().getByResourceGroupWithResponse("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
+```
+
+### Bots_GetCheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.CheckNameAvailabilityRequestBody;
+
+/** Samples for Bots GetCheckNameAvailability. */
+public final class BotsGetCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/CheckNameAvailability.json
+ */
+ /**
+ * Sample code: check Name Availability.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void checkNameAvailability(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .bots()
+ .getCheckNameAvailabilityWithResponse(
+ new CheckNameAvailabilityRequestBody().withName("testbotname").withType("string"), Context.NONE);
+ }
+}
+```
+
+### Bots_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Bots List. */
+public final class BotsListSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListBotsBySubscription.json
+ */
+ /**
+ * Sample code: List Bots by Subscription.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listBotsBySubscription(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().list(Context.NONE);
+ }
+}
+```
+
+### Bots_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Bots ListByResourceGroup. */
+public final class BotsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListBotsByResourceGroup.json
+ */
+ /**
+ * Sample code: List Bots by Resource Group.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listBotsByResourceGroup(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().listByResourceGroup("OneResourceGroupName", Context.NONE);
+ }
+}
+```
+
+### Bots_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.Bot;
+import com.azure.resourcemanager.botservice.models.BotProperties;
+import com.azure.resourcemanager.botservice.models.Kind;
+import com.azure.resourcemanager.botservice.models.MsaAppType;
+import com.azure.resourcemanager.botservice.models.Sku;
+import com.azure.resourcemanager.botservice.models.SkuName;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Bots Update. */
+public final class BotsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateBot.json
+ */
+ /**
+ * Sample code: Update Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ Bot resource =
+ manager
+ .bots()
+ .getByResourceGroupWithResponse("OneResourceGroupName", "samplebotname", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("tag1", "value1", "tag2", "value2"))
+ .withProperties(
+ new BotProperties()
+ .withDisplayName("The Name of the bot")
+ .withDescription("The description of the bot")
+ .withIconUrl("http://myicon")
+ .withEndpoint("http://mybot.coffee")
+ .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI)
+ .withMsaAppId("msaappid")
+ .withMsaAppTenantId("msaapptenantid")
+ .withMsaAppMsiResourceId(
+ "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId")
+ .withDeveloperAppInsightKey("appinsightskey")
+ .withDeveloperAppInsightsApiKey("appinsightsapikey")
+ .withDeveloperAppInsightsApplicationId("appinsightsappid")
+ .withLuisAppIds(Arrays.asList("luisappid1", "luisappid2"))
+ .withLuisKey("luiskey")
+ .withIsCmekEnabled(true)
+ .withCmekKeyVaultUrl("https://myCmekKey")
+ .withIsIsolated(false)
+ .withDisableLocalAuth(true)
+ .withSchemaTransformationVersion("1.0"))
+ .withSku(new Sku().withName(SkuName.S1))
+ .withKind(Kind.SDK)
+ .withEtag("etag1")
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Channels_Create
+
+```java
+import com.azure.resourcemanager.botservice.models.AlexaChannel;
+import com.azure.resourcemanager.botservice.models.AlexaChannelProperties;
+import com.azure.resourcemanager.botservice.models.ChannelName;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannel;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannelProperties;
+import com.azure.resourcemanager.botservice.models.EmailChannel;
+import com.azure.resourcemanager.botservice.models.EmailChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineChannel;
+import com.azure.resourcemanager.botservice.models.LineChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineRegistration;
+import java.util.Arrays;
+
+/** Samples for Channels Create. */
+public final class ChannelsCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Create DirectLine Speech Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createDirectLineSpeechBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.DIRECT_LINE_SPEECH_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new DirectLineSpeechChannel()
+ .withProperties(
+ new DirectLineSpeechChannelProperties()
+ .withCognitiveServiceRegion("XcognitiveServiceRegionX")
+ .withCognitiveServiceSubscriptionKey("XcognitiveServiceSubscriptionKeyX")
+ .withIsEnabled(true)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutChannel.json
+ */
+ /**
+ * Sample code: Create Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.EMAIL_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new EmailChannel()
+ .withProperties(
+ new EmailChannelProperties()
+ .withEmailAddress("a@b.com")
+ .withPassword("pwd")
+ .withIsEnabled(true)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutAlexaChannel.json
+ */
+ /**
+ * Sample code: Create Alexa Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createAlexaBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.ALEXA_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new AlexaChannel()
+ .withProperties(
+ new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutLineChannel.json
+ */
+ /**
+ * Sample code: Create Line Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createLineBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.LINE_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new LineChannel()
+ .withProperties(
+ new LineChannelProperties()
+ .withLineRegistrations(
+ Arrays
+ .asList(
+ new LineRegistration()
+ .withChannelSecret("channelSecret")
+ .withChannelAccessToken("channelAccessToken")))))
+ .create();
+ }
+}
+```
+
+### Channels_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Channels Delete. */
+public final class ChannelsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteChannel.json
+ */
+ /**
+ * Sample code: Delete Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deleteBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().deleteWithResponse("OneResourceGroupName", "samplebotname", "EmailChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Delete DirectLine Speech Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deleteDirectLineSpeechBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .deleteWithResponse("OneResourceGroupName", "samplebotname", "DirectLineSpeechChannel", Context.NONE);
+ }
+}
+```
+
+### Channels_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Channels Get. */
+public final class ChannelsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Get DirectLine Speech Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getDirectLineSpeechBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "DirectLineSpeechChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetLineChannel.json
+ */
+ /**
+ * Sample code: Get Line Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getLineBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().getWithResponse("OneResourceGroupName", "samplebotname", "LineChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetChannel.json
+ */
+ /**
+ * Sample code: Get Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().getWithResponse("OneResourceGroupName", "samplebotname", "EmailChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetAlexaChannel.json
+ */
+ /**
+ * Sample code: Get Alexa Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getAlexaBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().getWithResponse("OneResourceGroupName", "samplebotname", "AlexaChannel", Context.NONE);
+ }
+}
+```
+
+### Channels_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Channels ListByResourceGroup. */
+public final class ChannelsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannelsByBotService.json
+ */
+ /**
+ * Sample code: List Bots by Resource Group.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listBotsByResourceGroup(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().listByResourceGroup("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
+```
+
+### Channels_ListWithKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.ChannelName;
+
+/** Samples for Channels ListWithKeys. */
+public final class ChannelsListWithKeysSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannel.json
+ */
+ /**
+ * Sample code: List Channel.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .listWithKeysWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, Context.NONE);
+ }
+}
+```
+
+### Channels_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.AlexaChannel;
+import com.azure.resourcemanager.botservice.models.AlexaChannelProperties;
+import com.azure.resourcemanager.botservice.models.BotChannel;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannel;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannelProperties;
+import com.azure.resourcemanager.botservice.models.EmailChannel;
+import com.azure.resourcemanager.botservice.models.EmailChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineChannel;
+import com.azure.resourcemanager.botservice.models.LineChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineRegistration;
+import java.util.Arrays;
+
+/** Samples for Channels Update. */
+public final class ChannelsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Update DirectLine Speech.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateDirectLineSpeech(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "DirectLineSpeechChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new DirectLineSpeechChannel()
+ .withProperties(
+ new DirectLineSpeechChannelProperties()
+ .withCognitiveServiceRegion("XcognitiveServiceRegionX")
+ .withCognitiveServiceSubscriptionKey("XcognitiveServiceSubscriptionKeyX")
+ .withIsEnabled(true)))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateChannel.json
+ */
+ /**
+ * Sample code: Update Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "EmailChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new EmailChannel()
+ .withProperties(
+ new EmailChannelProperties()
+ .withEmailAddress("a@b.com")
+ .withPassword("pwd")
+ .withIsEnabled(true)))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateLineChannel.json
+ */
+ /**
+ * Sample code: Update Line.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateLine(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "LineChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new LineChannel()
+ .withProperties(
+ new LineChannelProperties()
+ .withLineRegistrations(
+ Arrays
+ .asList(
+ new LineRegistration()
+ .withChannelSecret("channelSecret")
+ .withChannelAccessToken("channelAccessToken")))))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateAlexaChannel.json
+ */
+ /**
+ * Sample code: Update Alexa.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateAlexa(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "AlexaChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new AlexaChannel()
+ .withProperties(
+ new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true)))
+ .apply();
+ }
+}
+```
+
+### DirectLine_RegenerateKeys
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.Key;
+import com.azure.resourcemanager.botservice.models.RegenerateKeysChannelName;
+import com.azure.resourcemanager.botservice.models.SiteInfo;
+
+/** Samples for DirectLine RegenerateKeys. */
+public final class DirectLineRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DirectlineRegenerateKeys.json
+ */
+ /**
+ * Sample code: Regenerate Keys for DirectLine Channel Site.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void regenerateKeysForDirectLineChannelSite(
+ com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .directLines()
+ .regenerateKeysWithResponse(
+ "OneResourceGroupName",
+ "samplebotname",
+ RegenerateKeysChannelName.DIRECT_LINE_CHANNEL,
+ new SiteInfo().withSiteName("testSiteName").withKey(Key.KEY1),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/WebChatRegenerateKeys.json
+ */
+ /**
+ * Sample code: Regenerate Keys for WebChat Channel Site.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void regenerateKeysForWebChatChannelSite(
+ com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .directLines()
+ .regenerateKeysWithResponse(
+ "OneResourceGroupName",
+ "samplebotname",
+ RegenerateKeysChannelName.WEB_CHAT_CHANNEL,
+ new SiteInfo().withSiteName("testSiteName").withKey(Key.KEY1),
+ Context.NONE);
+ }
+}
+```
+
+### HostSettings_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for HostSettings Get. */
+public final class HostSettingsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetHostSettings.json
+ */
+ /**
+ * Sample code: Get Bot Host Settings.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getBotHostSettings(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.hostSettings().getWithResponse(Context.NONE);
+ }
+}
+```
+
+### OperationResults_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OperationResults Get. */
+public final class OperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/OperationResultsGet.json
+ */
+ /**
+ * Sample code: Get operation result.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getOperationResult(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.operationResults().get("exampleid", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetOperations.json
+ */
+ /**
+ * Sample code: Get Operations.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getOperations(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Create
+
+```java
+import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections Create. */
+public final class PrivateEndpointConnectionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Put Private Endpoint Connection.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void putPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("{privateEndpointConnectionName}")
+ .withExistingBotService("res7687", "sto9699")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Auto-Approved"))
+ .create();
+ }
+}
+```
+
+### PrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Delete Private Endpoint Connection.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deletePrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .privateEndpointConnections()
+ .deleteWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Get Private Endpoint Connection.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: List Private Endpoint Connections.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listPrivateEndpointConnections(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.privateEndpointConnections().list("res6977", "sto2527", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_ListByBotResource
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources ListByBotResource. */
+public final class PrivateLinkResourcesListByBotResourceSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListPrivateLinkResources.json
+ */
+ /**
+ * Sample code: List Private Link Resources.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listPrivateLinkResources(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.privateLinkResources().listByBotResourceWithResponse("res6977", "sto2527", Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/botservice/azure-resourcemanager-botservice/pom.xml b/sdk/botservice/azure-resourcemanager-botservice/pom.xml
index 7920c3e71f4e2..79dee149d03f7 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/pom.xml
+++ b/sdk/botservice/azure-resourcemanager-botservice/pom.xml
@@ -1,67 +1,86 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-botservice
- 1.0.0-beta.2
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-botservice
+ 1.0.0-beta.2
+ jar
- Microsoft Azure SDK for BotService Management
- This package contains Microsoft Azure SDK for BotService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-2021-03-01.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for BotService Management
+ This package contains Microsoft Azure SDK for BotService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-preview-2021-05.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
-
-
-
-
- com.azure
- azure-core
- 1.21.0
-
-
- com.azure
- azure-core-management
- 1.4.2
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.8.7
-
- true
-
-
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+
+
+
+
+ com.azure
+ azure-core
+ 1.21.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.2
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.7
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java
index dcf1bf1d924e2..e368e031494b4 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java
@@ -9,7 +9,6 @@
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +16,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -27,13 +27,19 @@
import com.azure.resourcemanager.botservice.implementation.ChannelsImpl;
import com.azure.resourcemanager.botservice.implementation.DirectLinesImpl;
import com.azure.resourcemanager.botservice.implementation.HostSettingsImpl;
+import com.azure.resourcemanager.botservice.implementation.OperationResultsImpl;
import com.azure.resourcemanager.botservice.implementation.OperationsImpl;
+import com.azure.resourcemanager.botservice.implementation.PrivateEndpointConnectionsImpl;
+import com.azure.resourcemanager.botservice.implementation.PrivateLinkResourcesImpl;
import com.azure.resourcemanager.botservice.models.BotConnections;
import com.azure.resourcemanager.botservice.models.Bots;
import com.azure.resourcemanager.botservice.models.Channels;
import com.azure.resourcemanager.botservice.models.DirectLines;
import com.azure.resourcemanager.botservice.models.HostSettings;
+import com.azure.resourcemanager.botservice.models.OperationResults;
import com.azure.resourcemanager.botservice.models.Operations;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnections;
+import com.azure.resourcemanager.botservice.models.PrivateLinkResources;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -54,6 +60,12 @@ public final class BotServiceManager {
private HostSettings hostSettings;
+ private OperationResults operationResults;
+
+ private PrivateEndpointConnections privateEndpointConnections;
+
+ private PrivateLinkResources privateLinkResources;
+
private final AzureBotService clientObject;
private BotServiceManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -97,6 +109,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -136,6 +149,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -178,7 +202,7 @@ public BotServiceManager authenticate(TokenCredential credential, AzureProfile p
.append("-")
.append("com.azure.resourcemanager.botservice")
.append("/")
- .append("1.0.0-beta.1");
+ .append("1.0.0-beta.2");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -192,6 +216,9 @@ public BotServiceManager authenticate(TokenCredential credential, AzureProfile p
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
@@ -201,10 +228,7 @@ public BotServiceManager authenticate(TokenCredential credential, AzureProfile p
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
- policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies.addAll(this.policies);
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
@@ -265,6 +289,31 @@ public HostSettings hostSettings() {
return hostSettings;
}
+ /** @return Resource collection API of OperationResults. */
+ public OperationResults operationResults() {
+ if (this.operationResults == null) {
+ this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this);
+ }
+ return operationResults;
+ }
+
+ /** @return Resource collection API of PrivateEndpointConnections. */
+ public PrivateEndpointConnections privateEndpointConnections() {
+ if (this.privateEndpointConnections == null) {
+ this.privateEndpointConnections =
+ new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this);
+ }
+ return privateEndpointConnections;
+ }
+
+ /** @return Resource collection API of PrivateLinkResources. */
+ public PrivateLinkResources privateLinkResources() {
+ if (this.privateLinkResources == null) {
+ this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
+ }
+ return privateLinkResources;
+ }
+
/**
* @return Wrapped service client AzureBotService providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/AzureBotService.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/AzureBotService.java
index 00f6af7ded45e..b59c5a98ceb7b 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/AzureBotService.java
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/AzureBotService.java
@@ -85,4 +85,25 @@ public interface AzureBotService {
* @return the HostSettingsClient object.
*/
HostSettingsClient getHostSettings();
+
+ /**
+ * Gets the OperationResultsClient object to access its operations.
+ *
+ * @return the OperationResultsClient object.
+ */
+ OperationResultsClient getOperationResults();
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ PrivateEndpointConnectionsClient getPrivateEndpointConnections();
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ PrivateLinkResourcesClient getPrivateLinkResources();
}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java
new file mode 100644
index 0000000000000..cd3fe0b0690d5
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner;
+
+/** An instance of this class provides access to all the operations defined in OperationResultsClient. */
+public interface OperationResultsClient {
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationResultsDescriptionInner> beginGet(
+ String operationResultId);
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OperationResultsDescriptionInner> beginGet(
+ String operationResultId, Context context);
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationResultsDescriptionInner get(String operationResultId);
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationResultsDescriptionInner get(String operationResultId, Context context);
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java
new file mode 100644
index 0000000000000..d01af5ff558e0
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public interface PrivateEndpointConnectionsClient {
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String resourceName);
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner get(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateEndpointConnectionInner create(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties);
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response createWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response deleteWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java
new file mode 100644
index 0000000000000..82a4492f4f396
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java
@@ -0,0 +1,42 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public interface PrivateLinkResourcesClient {
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PrivateLinkResourceListResultInner listByBotResource(String resourceGroupName, String resourceName);
+
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listByBotResourceWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java
index fa258b92beded..5af51fa947a3d 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java
@@ -57,7 +57,7 @@ public final class HostSettingsResponseInner {
private Boolean validateAuthority;
/*
- * Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12
+ * Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12
*/
@JsonProperty(value = "BotOpenIdMetadata")
private String botOpenIdMetadata;
@@ -203,7 +203,7 @@ public HostSettingsResponseInner withValidateAuthority(Boolean validateAuthority
}
/**
- * Get the botOpenIdMetadata property: Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
+ * Get the botOpenIdMetadata property: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
*
* @return the botOpenIdMetadata value.
*/
@@ -212,7 +212,7 @@ public String botOpenIdMetadata() {
}
/**
- * Set the botOpenIdMetadata property: Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
+ * Set the botOpenIdMetadata property: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
*
* @param botOpenIdMetadata the botOpenIdMetadata value to set.
* @return the HostSettingsResponseInner object itself.
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java
new file mode 100644
index 0000000000000..1544448bcbc82
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.models.OperationResultStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** The properties indicating the operation result of an operation on a service. */
+@Immutable
+public final class OperationResultsDescriptionInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsDescriptionInner.class);
+
+ /*
+ * The ID of the operation returned.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /*
+ * The name of the operation result.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * The status of the operation being performed.
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private OperationResultStatus status;
+
+ /*
+ * The time that the operation was started.
+ */
+ @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY)
+ private OffsetDateTime startTime;
+
+ /**
+ * Get the id property: The ID of the operation returned.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name of the operation result.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the status property: The status of the operation being performed.
+ *
+ * @return the status value.
+ */
+ public OperationResultStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the startTime property: The time that the operation was started.
+ *
+ * @return the startTime value.
+ */
+ public OffsetDateTime startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java
new file mode 100644
index 0000000000000..7ee6898348478
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.models.PrivateEndpoint;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.botservice.models.PrivateLinkResourceBase;
+import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The Private Endpoint Connection resource. */
+@Fluent
+public final class PrivateEndpointConnectionInner extends PrivateLinkResourceBase {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
+
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
+ }
+
+ /**
+ * Set the privateEndpoint property: The resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 0000000000000..35f64a7d95c4d
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.models.PrivateEndpoint;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the PrivateEndpointConnectProperties. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class);
+
+ /*
+ * The resource of private end point.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java
new file mode 100644
index 0000000000000..03d31d13e3f16
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.models.PrivateLinkResource;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A list of private link resources. */
+@Fluent
+public final class PrivateLinkResourceListResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceListResultInner.class);
+
+ /*
+ * Array of private link resources
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: Array of private link resources.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Array of private link resources.
+ *
+ * @param value the value value to set.
+ * @return the PrivateLinkResourceListResultInner object itself.
+ */
+ public PrivateLinkResourceListResultInner withValue(List value) {
+ this.value = value;
+ 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());
+ }
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 0000000000000..0f4e16bd4ce17
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,81 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class PrivateLinkResourceProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class);
+
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource Private link DNS zone name.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceImpl.java
index da51b941635e6..f7946e508b43d 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceImpl.java
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceImpl.java
@@ -27,7 +27,10 @@
import com.azure.resourcemanager.botservice.fluent.ChannelsClient;
import com.azure.resourcemanager.botservice.fluent.DirectLinesClient;
import com.azure.resourcemanager.botservice.fluent.HostSettingsClient;
+import com.azure.resourcemanager.botservice.fluent.OperationResultsClient;
import com.azure.resourcemanager.botservice.fluent.OperationsClient;
+import com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -187,6 +190,42 @@ public HostSettingsClient getHostSettings() {
return this.hostSettings;
}
+ /** The OperationResultsClient object to access its operations. */
+ private final OperationResultsClient operationResults;
+
+ /**
+ * Gets the OperationResultsClient object to access its operations.
+ *
+ * @return the OperationResultsClient object.
+ */
+ public OperationResultsClient getOperationResults() {
+ return this.operationResults;
+ }
+
+ /** The PrivateEndpointConnectionsClient object to access its operations. */
+ private final PrivateEndpointConnectionsClient privateEndpointConnections;
+
+ /**
+ * Gets the PrivateEndpointConnectionsClient object to access its operations.
+ *
+ * @return the PrivateEndpointConnectionsClient object.
+ */
+ public PrivateEndpointConnectionsClient getPrivateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /** The PrivateLinkResourcesClient object to access its operations. */
+ private final PrivateLinkResourcesClient privateLinkResources;
+
+ /**
+ * Gets the PrivateLinkResourcesClient object to access its operations.
+ *
+ * @return the PrivateLinkResourcesClient object.
+ */
+ public PrivateLinkResourcesClient getPrivateLinkResources() {
+ return this.privateLinkResources;
+ }
+
/**
* Initializes an instance of AzureBotService client.
*
@@ -209,13 +248,16 @@ public HostSettingsClient getHostSettings() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2021-03-01";
+ this.apiVersion = "2021-05-01-preview";
this.bots = new BotsClientImpl(this);
this.channels = new ChannelsClientImpl(this);
this.directLines = new DirectLinesClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.botConnections = new BotConnectionsClientImpl(this);
this.hostSettings = new HostSettingsClientImpl(this);
+ this.operationResults = new OperationResultsClientImpl(this);
+ this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);
+ this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
}
/**
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java
new file mode 100644
index 0000000000000..560b2caec0af4
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java
@@ -0,0 +1,293 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.botservice.fluent.OperationResultsClient;
+import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in OperationResultsClient. */
+public final class OperationResultsClientImpl implements OperationResultsClient {
+ private final ClientLogger logger = new ClientLogger(OperationResultsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final OperationResultsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureBotServiceImpl client;
+
+ /**
+ * Initializes an instance of OperationResultsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationResultsClientImpl(AzureBotServiceImpl client) {
+ this.service =
+ RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBotServiceOperationResults to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureBotServiceOpera")
+ private interface OperationResultsService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> get(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("operationResultId") String operationResultId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> getWithResponseAsync(String operationResultId) {
+ 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 (operationResultId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter operationResultId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ operationResultId,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> getWithResponseAsync(String operationResultId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (operationResultId == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter operationResultId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ operationResultId,
+ accept,
+ context);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperationResultsDescriptionInner> beginGetAsync(
+ String operationResultId) {
+ Mono>> mono = getWithResponseAsync(operationResultId);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationResultsDescriptionInner.class,
+ OperationResultsDescriptionInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OperationResultsDescriptionInner> beginGetAsync(
+ String operationResultId, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = getWithResponseAsync(operationResultId, context);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ OperationResultsDescriptionInner.class,
+ OperationResultsDescriptionInner.class,
+ context);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperationResultsDescriptionInner> beginGet(
+ String operationResultId) {
+ return beginGetAsync(operationResultId).getSyncPoller();
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OperationResultsDescriptionInner> beginGet(
+ String operationResultId, Context context) {
+ return beginGetAsync(operationResultId, context).getSyncPoller();
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String operationResultId) {
+ return beginGetAsync(operationResultId).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String operationResultId, Context context) {
+ return beginGetAsync(operationResultId, context).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationResultsDescriptionInner get(String operationResultId) {
+ return getAsync(operationResultId).block();
+ }
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OperationResultsDescriptionInner get(String operationResultId, Context context) {
+ return getAsync(operationResultId, context).block();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java
new file mode 100644
index 0000000000000..8ccff578df95c
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner;
+import com.azure.resourcemanager.botservice.models.OperationResultStatus;
+import com.azure.resourcemanager.botservice.models.OperationResultsDescription;
+import java.time.OffsetDateTime;
+
+public final class OperationResultsDescriptionImpl implements OperationResultsDescription {
+ private OperationResultsDescriptionInner innerObject;
+
+ private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager;
+
+ OperationResultsDescriptionImpl(
+ OperationResultsDescriptionInner innerObject,
+ com.azure.resourcemanager.botservice.BotServiceManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public OperationResultStatus status() {
+ return this.innerModel().status();
+ }
+
+ public OffsetDateTime startTime() {
+ return this.innerModel().startTime();
+ }
+
+ public OperationResultsDescriptionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.botservice.BotServiceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java
new file mode 100644
index 0000000000000..38ec010d1d948
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.fluent.OperationResultsClient;
+import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner;
+import com.azure.resourcemanager.botservice.models.OperationResults;
+import com.azure.resourcemanager.botservice.models.OperationResultsDescription;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class OperationResultsImpl implements OperationResults {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultsImpl.class);
+
+ private final OperationResultsClient innerClient;
+
+ private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager;
+
+ public OperationResultsImpl(
+ OperationResultsClient innerClient, com.azure.resourcemanager.botservice.BotServiceManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public OperationResultsDescription get(String operationResultId) {
+ OperationResultsDescriptionInner inner = this.serviceClient().get(operationResultId);
+ if (inner != null) {
+ return new OperationResultsDescriptionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OperationResultsDescription get(String operationResultId, Context context) {
+ OperationResultsDescriptionInner inner = this.serviceClient().get(operationResultId, context);
+ if (inner != null) {
+ return new OperationResultsDescriptionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ private OperationResultsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.botservice.BotServiceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java
new file mode 100644
index 0000000000000..5c1a291b6b54b
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.botservice.models.PrivateEndpoint;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState;
+
+public final class PrivateEndpointConnectionImpl
+ implements PrivateEndpointConnection, PrivateEndpointConnection.Definition {
+ private PrivateEndpointConnectionInner innerObject;
+
+ private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager;
+
+ PrivateEndpointConnectionImpl(
+ PrivateEndpointConnectionInner innerObject,
+ com.azure.resourcemanager.botservice.BotServiceManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public PrivateEndpoint privateEndpoint() {
+ return this.innerModel().privateEndpoint();
+ }
+
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.innerModel().privateLinkServiceConnectionState();
+ }
+
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public PrivateEndpointConnectionInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.botservice.BotServiceManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private String privateEndpointConnectionName;
+
+ public PrivateEndpointConnectionImpl withExistingBotService(String resourceGroupName, String resourceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.resourceName = resourceName;
+ return this;
+ }
+
+ public PrivateEndpointConnection create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .createWithResponse(
+ resourceGroupName, resourceName, privateEndpointConnectionName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnection create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .createWithResponse(
+ resourceGroupName, resourceName, privateEndpointConnectionName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ PrivateEndpointConnectionImpl(String name, com.azure.resourcemanager.botservice.BotServiceManager serviceManager) {
+ this.innerObject = new PrivateEndpointConnectionInner();
+ this.serviceManager = serviceManager;
+ this.privateEndpointConnectionName = name;
+ }
+
+ public PrivateEndpointConnection refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnection refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getPrivateEndpointConnections()
+ .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context)
+ .getValue();
+ return this;
+ }
+
+ public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.innerModel().withPrivateEndpoint(privateEndpoint);
+ return this;
+ }
+
+ public PrivateEndpointConnectionImpl withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
+ return this;
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java
new file mode 100644
index 0000000000000..73d8723a727ff
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -0,0 +1,849 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+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.botservice.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */
+public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient {
+ private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PrivateEndpointConnectionsService service;
+
+ /** The service client containing this operation class. */
+ private final AzureBotServiceImpl client;
+
+ /**
+ * Initializes an instance of PrivateEndpointConnectionsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateEndpointConnectionsClientImpl(AzureBotServiceImpl client) {
+ this.service =
+ RestProxy
+ .create(
+ PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBotServicePrivateEndpointConnections to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureBotServicePriva")
+ private interface PrivateEndpointConnectionsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService"
+ + "/botServices/{resourceName}/privateEndpointConnections")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @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.BotService"
+ + "/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService"
+ + "/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @BodyParam("application/json") PrivateEndpointConnectionInner properties,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService"
+ + "/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String resourceName) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String resourceName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName, context));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String resourceName) {
+ return new PagedIterable<>(listAsync(resourceGroupName, resourceName));
+ }
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(
+ String resourceGroupName, String resourceName, Context context) {
+ return new PagedIterable<>(listAsync(resourceGroupName, resourceName, context));
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner get(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ return getAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
+ return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ properties,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createWithResponseAsync(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ properties,
+ accept,
+ context);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return createWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateEndpointConnectionInner create(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties) {
+ return createAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties).block();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * resource.
+ * @param properties The private endpoint connection properties.
+ * @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 Private Endpoint Connection resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createWithResponse(
+ String resourceGroupName,
+ String resourceName,
+ String privateEndpointConnectionName,
+ PrivateEndpointConnectionInner properties,
+ Context context) {
+ return createWithResponseAsync(
+ resourceGroupName, resourceName, privateEndpointConnectionName, properties, context)
+ .block();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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 (privateEndpointConnectionName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter privateEndpointConnectionName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ privateEndpointConnectionName,
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ deleteAsync(resourceGroupName, resourceName, privateEndpointConnectionName).block();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, context).block();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java
new file mode 100644
index 0000000000000..3fa0bbe91b910
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,215 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnection;
+import com.azure.resourcemanager.botservice.models.PrivateEndpointConnections;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class);
+
+ private final PrivateEndpointConnectionsClient innerClient;
+
+ private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager;
+
+ public PrivateEndpointConnectionsImpl(
+ PrivateEndpointConnectionsClient innerClient,
+ com.azure.resourcemanager.botservice.BotServiceManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String resourceGroupName, String resourceName) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, resourceName);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(
+ String resourceGroupName, String resourceName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().list(resourceGroupName, resourceName, context);
+ return Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager()));
+ }
+
+ public PrivateEndpointConnection get(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionInner inner =
+ this.serviceClient().get(resourceGroupName, resourceName, privateEndpointConnectionName);
+ if (inner != null) {
+ return new PrivateEndpointConnectionImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateEndpointConnectionImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) {
+ this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context) {
+ return this
+ .serviceClient()
+ .deleteWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context);
+ }
+
+ public PrivateEndpointConnection getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "botServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this
+ .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "botServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this.getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "botServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ this
+ .deleteWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE)
+ .getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "botServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id)));
+ }
+ String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections");
+ if (privateEndpointConnectionName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format(
+ "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
+ id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context);
+ }
+
+ private PrivateEndpointConnectionsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.botservice.BotServiceManager manager() {
+ return this.serviceManager;
+ }
+
+ public PrivateEndpointConnectionImpl define(String name) {
+ return new PrivateEndpointConnectionImpl(name, this.manager());
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java
new file mode 100644
index 0000000000000..798f1de03fcdc
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner;
+import com.azure.resourcemanager.botservice.models.PrivateLinkResource;
+import com.azure.resourcemanager.botservice.models.PrivateLinkResourceListResult;
+import java.util.Collections;
+import java.util.List;
+
+public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult {
+ private PrivateLinkResourceListResultInner innerObject;
+
+ private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager;
+
+ PrivateLinkResourceListResultImpl(
+ PrivateLinkResourceListResultInner innerObject,
+ com.azure.resourcemanager.botservice.BotServiceManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public List value() {
+ List inner = this.innerModel().value();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public PrivateLinkResourceListResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.botservice.BotServiceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java
new file mode 100644
index 0000000000000..cca6a5af3d611
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java
@@ -0,0 +1,223 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+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.botservice.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */
+public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient {
+ private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final PrivateLinkResourcesService service;
+
+ /** The service client containing this operation class. */
+ private final AzureBotServiceImpl client;
+
+ /**
+ * Initializes an instance of PrivateLinkResourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PrivateLinkResourcesClientImpl(AzureBotServiceImpl client) {
+ this.service =
+ RestProxy
+ .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for AzureBotServicePrivateLinkResources to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "AzureBotServicePriva")
+ private interface PrivateLinkResourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService"
+ + "/botServices/{resourceName}/privateLinkResources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByBotResource(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBotResourceWithResponseAsync(
+ String resourceGroupName, String resourceName) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByBotResource(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByBotResourceWithResponseAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ 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 (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName 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."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByBotResource(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listByBotResourceAsync(
+ String resourceGroupName, String resourceName) {
+ return listByBotResourceWithResponseAsync(resourceGroupName, resourceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PrivateLinkResourceListResultInner listByBotResource(String resourceGroupName, String resourceName) {
+ return listByBotResourceAsync(resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listByBotResourceWithResponse(
+ String resourceGroupName, String resourceName, Context context) {
+ return listByBotResourceWithResponseAsync(resourceGroupName, resourceName, context).block();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java
new file mode 100644
index 0000000000000..ceae72916f36c
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner;
+import com.azure.resourcemanager.botservice.models.PrivateLinkResourceListResult;
+import com.azure.resourcemanager.botservice.models.PrivateLinkResources;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class PrivateLinkResourcesImpl implements PrivateLinkResources {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class);
+
+ private final PrivateLinkResourcesClient innerClient;
+
+ private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager;
+
+ public PrivateLinkResourcesImpl(
+ PrivateLinkResourcesClient innerClient, com.azure.resourcemanager.botservice.BotServiceManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PrivateLinkResourceListResult listByBotResource(String resourceGroupName, String resourceName) {
+ PrivateLinkResourceListResultInner inner =
+ this.serviceClient().listByBotResource(resourceGroupName, resourceName);
+ if (inner != null) {
+ return new PrivateLinkResourceListResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response listByBotResourceWithResponse(
+ String resourceGroupName, String resourceName, Context context) {
+ Response inner =
+ this.serviceClient().listByBotResourceWithResponse(resourceGroupName, resourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private PrivateLinkResourcesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.botservice.BotServiceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java
index d9b77d66733d5..37dae4e12c560 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java
@@ -6,6 +6,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
@@ -45,12 +46,30 @@ public final class BotProperties {
@JsonProperty(value = "endpointVersion", access = JsonProperty.Access.WRITE_ONLY)
private String endpointVersion;
+ /*
+ * Microsoft App Type for the bot
+ */
+ @JsonProperty(value = "msaAppType")
+ private MsaAppType msaAppType;
+
/*
* Microsoft App Id for the bot
*/
@JsonProperty(value = "msaAppId", required = true)
private String msaAppId;
+ /*
+ * Microsoft App Tenant Id for the bot
+ */
+ @JsonProperty(value = "msaAppTenantId")
+ private String msaAppTenantId;
+
+ /*
+ * Microsoft App Managed Identity Resource Id for the bot
+ */
+ @JsonProperty(value = "msaAppMSIResourceId")
+ private String msaAppMsiResourceId;
+
/*
* Collection of channels for which the bot is configured
*/
@@ -111,12 +130,25 @@ public final class BotProperties {
@JsonProperty(value = "isIsolated")
private Boolean isIsolated;
+ /*
+ * Opt-out of local authentication and ensure only MSI and AAD can be used
+ * exclusively for authentication.
+ */
+ @JsonProperty(value = "disableLocalAuth")
+ private Boolean disableLocalAuth;
+
/*
* The channel schema transformation version for the bot
*/
@JsonProperty(value = "schemaTransformationVersion")
private String schemaTransformationVersion;
+ /*
+ * List of Private Endpoint Connections configured for the bot
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
/**
* Get the displayName property: The Name of the bot.
*
@@ -206,6 +238,26 @@ public String endpointVersion() {
return this.endpointVersion;
}
+ /**
+ * Get the msaAppType property: Microsoft App Type for the bot.
+ *
+ * @return the msaAppType value.
+ */
+ public MsaAppType msaAppType() {
+ return this.msaAppType;
+ }
+
+ /**
+ * Set the msaAppType property: Microsoft App Type for the bot.
+ *
+ * @param msaAppType the msaAppType value to set.
+ * @return the BotProperties object itself.
+ */
+ public BotProperties withMsaAppType(MsaAppType msaAppType) {
+ this.msaAppType = msaAppType;
+ return this;
+ }
+
/**
* Get the msaAppId property: Microsoft App Id for the bot.
*
@@ -226,6 +278,46 @@ public BotProperties withMsaAppId(String msaAppId) {
return this;
}
+ /**
+ * Get the msaAppTenantId property: Microsoft App Tenant Id for the bot.
+ *
+ * @return the msaAppTenantId value.
+ */
+ public String msaAppTenantId() {
+ return this.msaAppTenantId;
+ }
+
+ /**
+ * Set the msaAppTenantId property: Microsoft App Tenant Id for the bot.
+ *
+ * @param msaAppTenantId the msaAppTenantId value to set.
+ * @return the BotProperties object itself.
+ */
+ public BotProperties withMsaAppTenantId(String msaAppTenantId) {
+ this.msaAppTenantId = msaAppTenantId;
+ return this;
+ }
+
+ /**
+ * Get the msaAppMsiResourceId property: Microsoft App Managed Identity Resource Id for the bot.
+ *
+ * @return the msaAppMsiResourceId value.
+ */
+ public String msaAppMsiResourceId() {
+ return this.msaAppMsiResourceId;
+ }
+
+ /**
+ * Set the msaAppMsiResourceId property: Microsoft App Managed Identity Resource Id for the bot.
+ *
+ * @param msaAppMsiResourceId the msaAppMsiResourceId value to set.
+ * @return the BotProperties object itself.
+ */
+ public BotProperties withMsaAppMsiResourceId(String msaAppMsiResourceId) {
+ this.msaAppMsiResourceId = msaAppMsiResourceId;
+ return this;
+ }
+
/**
* Get the configuredChannels property: Collection of channels for which the bot is configured.
*
@@ -404,6 +496,28 @@ public BotProperties withIsIsolated(Boolean isIsolated) {
return this;
}
+ /**
+ * Get the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used
+ * exclusively for authentication.
+ *
+ * @return the disableLocalAuth value.
+ */
+ public Boolean disableLocalAuth() {
+ return this.disableLocalAuth;
+ }
+
+ /**
+ * Set the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used
+ * exclusively for authentication.
+ *
+ * @param disableLocalAuth the disableLocalAuth value to set.
+ * @return the BotProperties object itself.
+ */
+ public BotProperties withDisableLocalAuth(Boolean disableLocalAuth) {
+ this.disableLocalAuth = disableLocalAuth;
+ return this;
+ }
+
/**
* Get the schemaTransformationVersion property: The channel schema transformation version for the bot.
*
@@ -424,6 +538,15 @@ public BotProperties withSchemaTransformationVersion(String schemaTransformation
return this;
}
+ /**
+ * Get the privateEndpointConnections property: List of Private Endpoint Connections configured for the bot.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
/**
* Validates the instance.
*
@@ -445,5 +568,8 @@ public void validate() {
.logExceptionAsError(
new IllegalArgumentException("Missing required property msaAppId in model BotProperties"));
}
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
}
}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java
index 87d4403eb5a6d..b6f7a6dad09c5 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java
@@ -58,7 +58,7 @@ public interface HostSettingsResponse {
Boolean validateAuthority();
/**
- * Gets the botOpenIdMetadata property: Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
+ * Gets the botOpenIdMetadata property: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12.
*
* @return the botOpenIdMetadata value.
*/
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java
new file mode 100644
index 0000000000000..ae78898c3f500
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for MsaAppType. */
+public final class MsaAppType extends ExpandableStringEnum {
+ /** Static value UserAssignedMSI for MsaAppType. */
+ public static final MsaAppType USER_ASSIGNED_MSI = fromString("UserAssignedMSI");
+
+ /** Static value SingleTenant for MsaAppType. */
+ public static final MsaAppType SINGLE_TENANT = fromString("SingleTenant");
+
+ /** Static value MultiTenant for MsaAppType. */
+ public static final MsaAppType MULTI_TENANT = fromString("MultiTenant");
+
+ /**
+ * Creates or finds a MsaAppType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding MsaAppType.
+ */
+ @JsonCreator
+ public static MsaAppType fromString(String name) {
+ return fromString(name, MsaAppType.class);
+ }
+
+ /** @return known MsaAppType values. */
+ public static Collection values() {
+ return values(MsaAppType.class);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultStatus.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultStatus.java
new file mode 100644
index 0000000000000..6ac2ab564139e
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultStatus.java
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for OperationResultStatus. */
+public final class OperationResultStatus extends ExpandableStringEnum {
+ /** Static value Canceled for OperationResultStatus. */
+ public static final OperationResultStatus CANCELED = fromString("Canceled");
+
+ /** Static value Succeeded for OperationResultStatus. */
+ public static final OperationResultStatus SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Failed for OperationResultStatus. */
+ public static final OperationResultStatus FAILED = fromString("Failed");
+
+ /** Static value Requested for OperationResultStatus. */
+ public static final OperationResultStatus REQUESTED = fromString("Requested");
+
+ /** Static value Running for OperationResultStatus. */
+ public static final OperationResultStatus RUNNING = fromString("Running");
+
+ /**
+ * Creates or finds a OperationResultStatus from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding OperationResultStatus.
+ */
+ @JsonCreator
+ public static OperationResultStatus fromString(String name) {
+ return fromString(name, OperationResultStatus.class);
+ }
+
+ /** @return known OperationResultStatus values. */
+ public static Collection values() {
+ return values(OperationResultStatus.class);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java
new file mode 100644
index 0000000000000..9cf826065784a
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.util.Context;
+
+/** Resource collection API of OperationResults. */
+public interface OperationResults {
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ OperationResultsDescription get(String operationResultId);
+
+ /**
+ * Get the operation result for a long running operation.
+ *
+ * @param operationResultId The ID of the operation result to get.
+ * @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 operation result for a long running operation.
+ */
+ OperationResultsDescription get(String operationResultId, Context context);
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java
new file mode 100644
index 0000000000000..3265a451acce7
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner;
+import java.time.OffsetDateTime;
+
+/** An immutable client-side representation of OperationResultsDescription. */
+public interface OperationResultsDescription {
+ /**
+ * Gets the id property: The ID of the operation returned.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the operation result.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the status property: The status of the operation being performed.
+ *
+ * @return the status value.
+ */
+ OperationResultStatus status();
+
+ /**
+ * Gets the startTime property: The time that the operation was started.
+ *
+ * @return the startTime value.
+ */
+ OffsetDateTime startTime();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner object.
+ *
+ * @return the inner object.
+ */
+ OperationResultsDescriptionInner innerModel();
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java
new file mode 100644
index 0000000000000..2fdb9ba0f1f6b
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The Private Endpoint resource. */
+@Immutable
+public final class PrivateEndpoint {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class);
+
+ /*
+ * The ARM identifier for Private Endpoint
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /**
+ * Get the id property: The ARM identifier for Private Endpoint.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java
new file mode 100644
index 0000000000000..57e20f348c406
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java
@@ -0,0 +1,143 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
+
+/** An immutable client-side representation of PrivateEndpointConnection. */
+public interface PrivateEndpointConnection {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ PrivateEndpoint privateEndpoint();
+
+ /**
+ * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the
+ * connection between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState();
+
+ /**
+ * Gets the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ PrivateEndpointConnectionProvisioningState provisioningState();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner object.
+ *
+ * @return the inner object.
+ */
+ PrivateEndpointConnectionInner innerModel();
+
+ /** The entirety of the PrivateEndpointConnection definition. */
+ interface Definition
+ extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {
+ }
+ /** The PrivateEndpointConnection definition stages. */
+ interface DefinitionStages {
+ /** The first stage of the PrivateEndpointConnection definition. */
+ interface Blank extends WithParentResource {
+ }
+ /** The stage of the PrivateEndpointConnection definition allowing to specify parent resource. */
+ interface WithParentResource {
+ /**
+ * Specifies resourceGroupName, resourceName.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @return the next definition stage.
+ */
+ WithCreate withExistingBotService(String resourceGroupName, String resourceName);
+ }
+ /**
+ * The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for
+ * the resource to be created, but also allows for any other optional properties to be specified.
+ */
+ interface WithCreate
+ extends DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState {
+ /**
+ * Executes the create request.
+ *
+ * @return the created resource.
+ */
+ PrivateEndpointConnection create();
+
+ /**
+ * Executes the create request.
+ *
+ * @param context The context to associate with this operation.
+ * @return the created resource.
+ */
+ PrivateEndpointConnection create(Context context);
+ }
+ /** The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. */
+ interface WithPrivateEndpoint {
+ /**
+ * Specifies the privateEndpoint property: The resource of private end point..
+ *
+ * @param privateEndpoint The resource of private end point.
+ * @return the next definition stage.
+ */
+ WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint);
+ }
+ /**
+ * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState.
+ */
+ interface WithPrivateLinkServiceConnectionState {
+ /**
+ * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of
+ * the connection between service consumer and provider..
+ *
+ * @param privateLinkServiceConnectionState A collection of information about the state of the connection
+ * between service consumer and provider.
+ * @return the next definition stage.
+ */
+ WithCreate withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState);
+ }
+ }
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @return the refreshed resource.
+ */
+ PrivateEndpointConnection refresh();
+
+ /**
+ * Refreshes the resource to sync with Azure.
+ *
+ * @param context The context to associate with this operation.
+ * @return the refreshed resource.
+ */
+ PrivateEndpointConnection refresh(Context context);
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionListResult.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionListResult.java
new file mode 100644
index 0000000000000..9f5c1b500b28f
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionListResult.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** List of private endpoint connection associated with the specified storage account. */
+@Fluent
+public final class PrivateEndpointConnectionListResult {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResult.class);
+
+ /*
+ * Array of private endpoint connections
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: Array of private endpoint connections.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: Array of private endpoint connections.
+ *
+ * @param value the value value to set.
+ * @return the PrivateEndpointConnectionListResult object itself.
+ */
+ public PrivateEndpointConnectionListResult withValue(List value) {
+ this.value = value;
+ 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());
+ }
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java
new file mode 100644
index 0000000000000..e98cd5f587550
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for PrivateEndpointConnectionProvisioningState. */
+public final class PrivateEndpointConnectionProvisioningState
+ extends ExpandableStringEnum {
+ /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded");
+
+ /** Static value Creating for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating");
+
+ /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting");
+
+ /** Static value Failed for PrivateEndpointConnectionProvisioningState. */
+ public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed");
+
+ /**
+ * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding PrivateEndpointConnectionProvisioningState.
+ */
+ @JsonCreator
+ public static PrivateEndpointConnectionProvisioningState fromString(String name) {
+ return fromString(name, PrivateEndpointConnectionProvisioningState.class);
+ }
+
+ /** @return known PrivateEndpointConnectionProvisioningState values. */
+ public static Collection values() {
+ return values(PrivateEndpointConnectionProvisioningState.class);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java
new file mode 100644
index 0000000000000..9c495bc4fd5ad
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of PrivateEndpointConnections. */
+public interface PrivateEndpointConnections {
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ PagedIterable list(String resourceGroupName, String resourceName);
+
+ /**
+ * List all the private endpoint connections associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 list of private endpoint connection associated with the specified storage account.
+ */
+ PagedIterable list(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ PrivateEndpointConnection get(String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 specified private endpoint connection associated with the Bot.
+ */
+ Response getWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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.
+ */
+ void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName The name of the Bot resource.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
+ * 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 response.
+ */
+ Response deleteWithResponse(
+ String resourceGroupName, String resourceName, String privateEndpointConnectionName, Context context);
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param id the resource ID.
+ * @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 specified private endpoint connection associated with the Bot.
+ */
+ PrivateEndpointConnection getById(String id);
+
+ /**
+ * Gets the specified private endpoint connection associated with the Bot.
+ *
+ * @param id the resource ID.
+ * @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 specified private endpoint connection associated with the Bot.
+ */
+ Response getByIdWithResponse(String id, Context context);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param id the resource ID.
+ * @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.
+ */
+ void deleteById(String id);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Bot.
+ *
+ * @param id the resource ID.
+ * @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 response.
+ */
+ Response deleteByIdWithResponse(String id, Context context);
+
+ /**
+ * Begins definition for a new PrivateEndpointConnection resource.
+ *
+ * @param name resource name.
+ * @return the first stage of the new PrivateEndpointConnection definition.
+ */
+ PrivateEndpointConnection.DefinitionStages.Blank define(String name);
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java
new file mode 100644
index 0000000000000..a42a3f4f6643e
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for PrivateEndpointServiceConnectionStatus. */
+public final class PrivateEndpointServiceConnectionStatus
+ extends ExpandableStringEnum {
+ /** Static value Pending for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending");
+
+ /** Static value Approved for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved");
+
+ /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected");
+
+ /**
+ * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding PrivateEndpointServiceConnectionStatus.
+ */
+ @JsonCreator
+ public static PrivateEndpointServiceConnectionStatus fromString(String name) {
+ return fromString(name, PrivateEndpointServiceConnectionStatus.class);
+ }
+
+ /** @return known PrivateEndpointServiceConnectionStatus values. */
+ public static Collection values() {
+ return values(PrivateEndpointServiceConnectionStatus.class);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java
new file mode 100644
index 0000000000000..fa9d555381291
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** A private link resource. */
+@Fluent
+public final class PrivateLinkResource extends PrivateLinkResourceBase {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResource.class);
+
+ /*
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties innerProperties;
+
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
+ */
+ private PrivateLinkResourceProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.innerProperties() == null ? null : this.innerProperties().groupId();
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredMembers();
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames();
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResource object itself.
+ */
+ public PrivateLinkResource withRequiredZoneNames(List requiredZoneNames) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateLinkResourceProperties();
+ }
+ this.innerProperties().withRequiredZoneNames(requiredZoneNames);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ @Override
+ public void validate() {
+ super.validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java
new file mode 100644
index 0000000000000..348bfa297fbe1
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+/**
+ * Private Link Resource Base Common fields that are returned in the response for all BotService Private Link Resources.
+ */
+@Immutable
+public class PrivateLinkResourceBase extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceBase.class);
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java
new file mode 100644
index 0000000000000..0ffe091de4d12
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner;
+import java.util.List;
+
+/** An immutable client-side representation of PrivateLinkResourceListResult. */
+public interface PrivateLinkResourceListResult {
+ /**
+ * Gets the value property: Array of private link resources.
+ *
+ * @return the value value.
+ */
+ List value();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner object.
+ *
+ * @return the inner object.
+ */
+ PrivateLinkResourceListResultInner innerModel();
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java
new file mode 100644
index 0000000000000..0ef2dd5d207c2
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/** Resource collection API of PrivateLinkResources. */
+public interface PrivateLinkResources {
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ PrivateLinkResourceListResult listByBotResource(String resourceGroupName, String resourceName);
+
+ /**
+ * Gets the private link resources that need to be created for a Bot.
+ *
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
+ * @param resourceName 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 private link resources that need to be created for a Bot.
+ */
+ Response listByBotResourceWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java
new file mode 100644
index 0000000000000..ef4b29dc78204
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** A collection of information about the state of the connection between service consumer and provider. */
+@Fluent
+public final class PrivateLinkServiceConnectionState {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class);
+
+ /*
+ * Indicates whether the connection has been Approved/Rejected/Removed by
+ * the owner of the service.
+ */
+ @JsonProperty(value = "status")
+ private PrivateEndpointServiceConnectionStatus status;
+
+ /*
+ * The reason for approval/rejection of the connection.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /*
+ * A message indicating if changes on the service provider require any
+ * updates on the consumer.
+ */
+ @JsonProperty(value = "actionsRequired")
+ private String actionsRequired;
+
+ /**
+ * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
+ * service.
+ *
+ * @return the status value.
+ */
+ public PrivateEndpointServiceConnectionStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the
+ * service.
+ *
+ * @param status the status value to set.
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the description property: The reason for approval/rejection of the connection.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The reason for approval/rejection of the connection.
+ *
+ * @param description the description value to set.
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on
+ * the consumer.
+ *
+ * @return the actionsRequired value.
+ */
+ public String actionsRequired() {
+ return this.actionsRequired;
+ }
+
+ /**
+ * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on
+ * the consumer.
+ *
+ * @param actionsRequired the actionsRequired value to set.
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) {
+ this.actionsRequired = actionsRequired;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SlackChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SlackChannelProperties.java
index 3d7f9b2730ffe..641296c9a69b9 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SlackChannelProperties.java
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SlackChannelProperties.java
@@ -34,6 +34,12 @@ public final class SlackChannelProperties {
@JsonProperty(value = "verificationToken")
private String verificationToken;
+ /*
+ * The Slack permission scopes.
+ */
+ @JsonProperty(value = "scopes")
+ private String scopes;
+
/*
* The Slack landing page Url
*/
@@ -141,6 +147,26 @@ public SlackChannelProperties withVerificationToken(String verificationToken) {
return this;
}
+ /**
+ * Get the scopes property: The Slack permission scopes.
+ *
+ * @return the scopes value.
+ */
+ public String scopes() {
+ return this.scopes;
+ }
+
+ /**
+ * Set the scopes property: The Slack permission scopes.
+ *
+ * @param scopes the scopes value to set.
+ * @return the SlackChannelProperties object itself.
+ */
+ public SlackChannelProperties withScopes(String scopes) {
+ this.scopes = scopes;
+ return this;
+ }
+
/**
* Get the landingPageUrl property: The Slack landing page Url.
*
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionCreateSamples.java
new file mode 100644
index 0000000000000..62d26a2c512d3
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionCreateSamples.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.resourcemanager.botservice.models.ConnectionSettingParameter;
+import com.azure.resourcemanager.botservice.models.ConnectionSettingProperties;
+import java.util.Arrays;
+
+/** Samples for BotConnection Create. */
+public final class BotConnectionCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutConnection.json
+ */
+ /**
+ * Sample code: Create Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .define("sampleConnection")
+ .withRegion("West US")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new ConnectionSettingProperties()
+ .withClientId("sampleclientid")
+ .withClientSecret("samplesecret")
+ .withScopes("samplescope")
+ .withServiceProviderId("serviceproviderid")
+ .withParameters(
+ Arrays
+ .asList(
+ new ConnectionSettingParameter().withKey("key1").withValue("value1"),
+ new ConnectionSettingParameter().withKey("key2").withValue("value2"))))
+ .withEtag("etag1")
+ .create();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionDeleteSamples.java
new file mode 100644
index 0000000000000..43cc1f4af356e
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionDeleteSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection Delete. */
+public final class BotConnectionDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .deleteWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionGetSamples.java
new file mode 100644
index 0000000000000..001c2b5f17c96
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionGetSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection Get. */
+public final class BotConnectionGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListByBotServiceSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListByBotServiceSamples.java
new file mode 100644
index 0000000000000..523f7b9912945
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListByBotServiceSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection ListByBotService. */
+public final class BotConnectionListByBotServiceSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListConnectionsByBotService.json
+ */
+ /**
+ * Sample code: List Connection Settings.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listConnectionSettings(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.botConnections().listByBotService("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListServiceProvidersSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListServiceProvidersSamples.java
new file mode 100644
index 0000000000000..a89024578847a
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListServiceProvidersSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection ListServiceProviders. */
+public final class BotConnectionListServiceProvidersSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListServiceProviders.json
+ */
+ /**
+ * Sample code: List Auth Service Providers.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listAuthServiceProviders(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.botConnections().listServiceProvidersWithResponse(Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListWithSecretsSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListWithSecretsSamples.java
new file mode 100644
index 0000000000000..d2d2b63acbce8
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListWithSecretsSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for BotConnection ListWithSecrets. */
+public final class BotConnectionListWithSecretsSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .botConnections()
+ .listWithSecretsWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionUpdateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionUpdateSamples.java
new file mode 100644
index 0000000000000..e12452082a8a5
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionUpdateSamples.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.ConnectionSetting;
+import com.azure.resourcemanager.botservice.models.ConnectionSettingParameter;
+import com.azure.resourcemanager.botservice.models.ConnectionSettingProperties;
+import java.util.Arrays;
+
+/** Samples for BotConnection Update. */
+public final class BotConnectionUpdateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateConnection.json
+ */
+ /**
+ * Sample code: Update Connection Setting.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ ConnectionSetting resource =
+ manager
+ .botConnections()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "sampleConnection", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new ConnectionSettingProperties()
+ .withClientId("sampleclientid")
+ .withClientSecret("samplesecret")
+ .withScopes("samplescope")
+ .withServiceProviderId("serviceproviderid")
+ .withServiceProviderDisplayName("serviceProviderDisplayName")
+ .withParameters(
+ Arrays
+ .asList(
+ new ConnectionSettingParameter().withKey("key1").withValue("value1"),
+ new ConnectionSettingParameter().withKey("key2").withValue("value2"))))
+ .withEtag("etag1")
+ .apply();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsCreateSamples.java
new file mode 100644
index 0000000000000..8a899392b69e2
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsCreateSamples.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.resourcemanager.botservice.models.BotProperties;
+import com.azure.resourcemanager.botservice.models.Kind;
+import com.azure.resourcemanager.botservice.models.MsaAppType;
+import com.azure.resourcemanager.botservice.models.Sku;
+import com.azure.resourcemanager.botservice.models.SkuName;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Bots Create. */
+public final class BotsCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/CreateBot.json
+ */
+ /**
+ * Sample code: Create Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .bots()
+ .define("samplebotname")
+ .withRegion("West US")
+ .withExistingResourceGroup("OneResourceGroupName")
+ .withTags(mapOf("tag1", "value1", "tag2", "value2"))
+ .withProperties(
+ new BotProperties()
+ .withDisplayName("The Name of the bot")
+ .withDescription("The description of the bot")
+ .withIconUrl("http://myicon")
+ .withEndpoint("http://mybot.coffee")
+ .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI)
+ .withMsaAppId("exampleappid")
+ .withMsaAppTenantId("exampleapptenantid")
+ .withMsaAppMsiResourceId(
+ "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId")
+ .withDeveloperAppInsightKey("appinsightskey")
+ .withDeveloperAppInsightsApiKey("appinsightsapikey")
+ .withDeveloperAppInsightsApplicationId("appinsightsappid")
+ .withLuisAppIds(Arrays.asList("luisappid1", "luisappid2"))
+ .withLuisKey("luiskey")
+ .withIsCmekEnabled(true)
+ .withCmekKeyVaultUrl("https://myCmekKey")
+ .withIsIsolated(false)
+ .withDisableLocalAuth(true)
+ .withSchemaTransformationVersion("1.0"))
+ .withSku(new Sku().withName(SkuName.S1))
+ .withKind(Kind.SDK)
+ .withEtag("etag1")
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsDeleteSamples.java
new file mode 100644
index 0000000000000..62a5f920342d1
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsDeleteSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Bots Delete. */
+public final class BotsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteBot.json
+ */
+ /**
+ * Sample code: Delete Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deleteBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().deleteWithResponse("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetByResourceGroupSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetByResourceGroupSamples.java
new file mode 100644
index 0000000000000..6d55c0a0ae500
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Bots GetByResourceGroup. */
+public final class BotsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetBot.json
+ */
+ /**
+ * Sample code: Get Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().getByResourceGroupWithResponse("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetCheckNameAvailabilitySamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetCheckNameAvailabilitySamples.java
new file mode 100644
index 0000000000000..5ec899c639bdc
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetCheckNameAvailabilitySamples.java
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.CheckNameAvailabilityRequestBody;
+
+/** Samples for Bots GetCheckNameAvailability. */
+public final class BotsGetCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/CheckNameAvailability.json
+ */
+ /**
+ * Sample code: check Name Availability.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void checkNameAvailability(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .bots()
+ .getCheckNameAvailabilityWithResponse(
+ new CheckNameAvailabilityRequestBody().withName("testbotname").withType("string"), Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListByResourceGroupSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..15f58760813a8
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Bots ListByResourceGroup. */
+public final class BotsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListBotsByResourceGroup.json
+ */
+ /**
+ * Sample code: List Bots by Resource Group.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listBotsByResourceGroup(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().listByResourceGroup("OneResourceGroupName", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListSamples.java
new file mode 100644
index 0000000000000..a5c7bd0bdbd33
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Bots List. */
+public final class BotsListSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListBotsBySubscription.json
+ */
+ /**
+ * Sample code: List Bots by Subscription.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listBotsBySubscription(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.bots().list(Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsUpdateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsUpdateSamples.java
new file mode 100644
index 0000000000000..5cae2ce97cdeb
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsUpdateSamples.java
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.Bot;
+import com.azure.resourcemanager.botservice.models.BotProperties;
+import com.azure.resourcemanager.botservice.models.Kind;
+import com.azure.resourcemanager.botservice.models.MsaAppType;
+import com.azure.resourcemanager.botservice.models.Sku;
+import com.azure.resourcemanager.botservice.models.SkuName;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Bots Update. */
+public final class BotsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateBot.json
+ */
+ /**
+ * Sample code: Update Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ Bot resource =
+ manager
+ .bots()
+ .getByResourceGroupWithResponse("OneResourceGroupName", "samplebotname", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("tag1", "value1", "tag2", "value2"))
+ .withProperties(
+ new BotProperties()
+ .withDisplayName("The Name of the bot")
+ .withDescription("The description of the bot")
+ .withIconUrl("http://myicon")
+ .withEndpoint("http://mybot.coffee")
+ .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI)
+ .withMsaAppId("msaappid")
+ .withMsaAppTenantId("msaapptenantid")
+ .withMsaAppMsiResourceId(
+ "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId")
+ .withDeveloperAppInsightKey("appinsightskey")
+ .withDeveloperAppInsightsApiKey("appinsightsapikey")
+ .withDeveloperAppInsightsApplicationId("appinsightsappid")
+ .withLuisAppIds(Arrays.asList("luisappid1", "luisappid2"))
+ .withLuisKey("luiskey")
+ .withIsCmekEnabled(true)
+ .withCmekKeyVaultUrl("https://myCmekKey")
+ .withIsIsolated(false)
+ .withDisableLocalAuth(true)
+ .withSchemaTransformationVersion("1.0"))
+ .withSku(new Sku().withName(SkuName.S1))
+ .withKind(Kind.SDK)
+ .withEtag("etag1")
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateSamples.java
new file mode 100644
index 0000000000000..e8de5b11beda5
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateSamples.java
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.resourcemanager.botservice.models.AlexaChannel;
+import com.azure.resourcemanager.botservice.models.AlexaChannelProperties;
+import com.azure.resourcemanager.botservice.models.ChannelName;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannel;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannelProperties;
+import com.azure.resourcemanager.botservice.models.EmailChannel;
+import com.azure.resourcemanager.botservice.models.EmailChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineChannel;
+import com.azure.resourcemanager.botservice.models.LineChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineRegistration;
+import java.util.Arrays;
+
+/** Samples for Channels Create. */
+public final class ChannelsCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Create DirectLine Speech Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createDirectLineSpeechBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.DIRECT_LINE_SPEECH_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new DirectLineSpeechChannel()
+ .withProperties(
+ new DirectLineSpeechChannelProperties()
+ .withCognitiveServiceRegion("XcognitiveServiceRegionX")
+ .withCognitiveServiceSubscriptionKey("XcognitiveServiceSubscriptionKeyX")
+ .withIsEnabled(true)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutChannel.json
+ */
+ /**
+ * Sample code: Create Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.EMAIL_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new EmailChannel()
+ .withProperties(
+ new EmailChannelProperties()
+ .withEmailAddress("a@b.com")
+ .withPassword("pwd")
+ .withIsEnabled(true)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutAlexaChannel.json
+ */
+ /**
+ * Sample code: Create Alexa Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createAlexaBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.ALEXA_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new AlexaChannel()
+ .withProperties(
+ new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true)))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutLineChannel.json
+ */
+ /**
+ * Sample code: Create Line Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void createLineBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .define(ChannelName.LINE_CHANNEL)
+ .withRegion("global")
+ .withExistingBotService("OneResourceGroupName", "samplebotname")
+ .withProperties(
+ new LineChannel()
+ .withProperties(
+ new LineChannelProperties()
+ .withLineRegistrations(
+ Arrays
+ .asList(
+ new LineRegistration()
+ .withChannelSecret("channelSecret")
+ .withChannelAccessToken("channelAccessToken")))))
+ .create();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteSamples.java
new file mode 100644
index 0000000000000..a818aad747797
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteSamples.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Channels Delete. */
+public final class ChannelsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteChannel.json
+ */
+ /**
+ * Sample code: Delete Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deleteBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().deleteWithResponse("OneResourceGroupName", "samplebotname", "EmailChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeleteDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Delete DirectLine Speech Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deleteDirectLineSpeechBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .deleteWithResponse("OneResourceGroupName", "samplebotname", "DirectLineSpeechChannel", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsGetSamples.java
new file mode 100644
index 0000000000000..444c5a3eb6753
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsGetSamples.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Channels Get. */
+public final class ChannelsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Get DirectLine Speech Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getDirectLineSpeechBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "DirectLineSpeechChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetLineChannel.json
+ */
+ /**
+ * Sample code: Get Line Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getLineBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().getWithResponse("OneResourceGroupName", "samplebotname", "LineChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetChannel.json
+ */
+ /**
+ * Sample code: Get Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().getWithResponse("OneResourceGroupName", "samplebotname", "EmailChannel", Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetAlexaChannel.json
+ */
+ /**
+ * Sample code: Get Alexa Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getAlexaBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().getWithResponse("OneResourceGroupName", "samplebotname", "AlexaChannel", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupSamples.java
new file mode 100644
index 0000000000000..19b3728e17bdc
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Channels ListByResourceGroup. */
+public final class ChannelsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannelsByBotService.json
+ */
+ /**
+ * Sample code: List Bots by Resource Group.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listBotsByResourceGroup(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.channels().listByResourceGroup("OneResourceGroupName", "samplebotname", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListWithKeysSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListWithKeysSamples.java
new file mode 100644
index 0000000000000..33011b42c6d82
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListWithKeysSamples.java
@@ -0,0 +1,25 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.ChannelName;
+
+/** Samples for Channels ListWithKeys. */
+public final class ChannelsListWithKeysSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListChannel.json
+ */
+ /**
+ * Sample code: List Channel.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .channels()
+ .listWithKeysWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateSamples.java
new file mode 100644
index 0000000000000..5f0cf1eccecc7
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateSamples.java
@@ -0,0 +1,125 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.AlexaChannel;
+import com.azure.resourcemanager.botservice.models.AlexaChannelProperties;
+import com.azure.resourcemanager.botservice.models.BotChannel;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannel;
+import com.azure.resourcemanager.botservice.models.DirectLineSpeechChannelProperties;
+import com.azure.resourcemanager.botservice.models.EmailChannel;
+import com.azure.resourcemanager.botservice.models.EmailChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineChannel;
+import com.azure.resourcemanager.botservice.models.LineChannelProperties;
+import com.azure.resourcemanager.botservice.models.LineRegistration;
+import java.util.Arrays;
+
+/** Samples for Channels Update. */
+public final class ChannelsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateDirectLineSpeechChannel.json
+ */
+ /**
+ * Sample code: Update DirectLine Speech.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateDirectLineSpeech(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "DirectLineSpeechChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new DirectLineSpeechChannel()
+ .withProperties(
+ new DirectLineSpeechChannelProperties()
+ .withCognitiveServiceRegion("XcognitiveServiceRegionX")
+ .withCognitiveServiceSubscriptionKey("XcognitiveServiceSubscriptionKeyX")
+ .withIsEnabled(true)))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateChannel.json
+ */
+ /**
+ * Sample code: Update Bot.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "EmailChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new EmailChannel()
+ .withProperties(
+ new EmailChannelProperties()
+ .withEmailAddress("a@b.com")
+ .withPassword("pwd")
+ .withIsEnabled(true)))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateLineChannel.json
+ */
+ /**
+ * Sample code: Update Line.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateLine(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "LineChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new LineChannel()
+ .withProperties(
+ new LineChannelProperties()
+ .withLineRegistrations(
+ Arrays
+ .asList(
+ new LineRegistration()
+ .withChannelSecret("channelSecret")
+ .withChannelAccessToken("channelAccessToken")))))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/UpdateAlexaChannel.json
+ */
+ /**
+ * Sample code: Update Alexa.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void updateAlexa(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ BotChannel resource =
+ manager
+ .channels()
+ .getWithResponse("OneResourceGroupName", "samplebotname", "AlexaChannel", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withProperties(
+ new AlexaChannel()
+ .withProperties(
+ new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true)))
+ .apply();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/DirectLineRegenerateKeysSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/DirectLineRegenerateKeysSamples.java
new file mode 100644
index 0000000000000..1e0455c9dfaac
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/DirectLineRegenerateKeysSamples.java
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.botservice.models.Key;
+import com.azure.resourcemanager.botservice.models.RegenerateKeysChannelName;
+import com.azure.resourcemanager.botservice.models.SiteInfo;
+
+/** Samples for DirectLine RegenerateKeys. */
+public final class DirectLineRegenerateKeysSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DirectlineRegenerateKeys.json
+ */
+ /**
+ * Sample code: Regenerate Keys for DirectLine Channel Site.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void regenerateKeysForDirectLineChannelSite(
+ com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .directLines()
+ .regenerateKeysWithResponse(
+ "OneResourceGroupName",
+ "samplebotname",
+ RegenerateKeysChannelName.DIRECT_LINE_CHANNEL,
+ new SiteInfo().withSiteName("testSiteName").withKey(Key.KEY1),
+ Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/WebChatRegenerateKeys.json
+ */
+ /**
+ * Sample code: Regenerate Keys for WebChat Channel Site.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void regenerateKeysForWebChatChannelSite(
+ com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .directLines()
+ .regenerateKeysWithResponse(
+ "OneResourceGroupName",
+ "samplebotname",
+ RegenerateKeysChannelName.WEB_CHAT_CHANNEL,
+ new SiteInfo().withSiteName("testSiteName").withKey(Key.KEY1),
+ Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/HostSettingsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/HostSettingsGetSamples.java
new file mode 100644
index 0000000000000..6663a60762e16
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/HostSettingsGetSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for HostSettings Get. */
+public final class HostSettingsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetHostSettings.json
+ */
+ /**
+ * Sample code: Get Bot Host Settings.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getBotHostSettings(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.hostSettings().getWithResponse(Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationResultsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationResultsGetSamples.java
new file mode 100644
index 0000000000000..f7ea524179e31
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationResultsGetSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for OperationResults Get. */
+public final class OperationResultsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/OperationResultsGet.json
+ */
+ /**
+ * Sample code: Get operation result.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getOperationResult(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.operationResults().get("exampleid", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationsListSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationsListSamples.java
new file mode 100644
index 0000000000000..55b2c70137866
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetOperations.json
+ */
+ /**
+ * Sample code: Get Operations.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getOperations(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateSamples.java
new file mode 100644
index 0000000000000..abb77baace79b
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateSamples.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections Create. */
+public final class PrivateEndpointConnectionsCreateSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/PutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Put Private Endpoint Connection.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void putPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("{privateEndpointConnectionName}")
+ .withExistingBotService("res7687", "sto9699")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Auto-Approved"))
+ .create();
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteSamples.java
new file mode 100644
index 0000000000000..45d7caa910921
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/DeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Delete Private Endpoint Connection.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void deletePrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .privateEndpointConnections()
+ .deleteWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetSamples.java
new file mode 100644
index 0000000000000..47e35a5d89464
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetSamples.java
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/GetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: Get Private Endpoint Connection.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void getPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListSamples.java
new file mode 100644
index 0000000000000..93c66d80d183a
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: List Private Endpoint Connections.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listPrivateEndpointConnections(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.privateEndpointConnections().list("res6977", "sto2527", Context.NONE);
+ }
+}
diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceSamples.java
new file mode 100644
index 0000000000000..8358420f5e2ef
--- /dev/null
+++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceSamples.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.botservice.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources ListByBotResource. */
+public final class PrivateLinkResourcesListByBotResourceSamples {
+ /*
+ * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/preview/2021-05-01-preview/examples/ListPrivateLinkResources.json
+ */
+ /**
+ * Sample code: List Private Link Resources.
+ *
+ * @param manager Entry point to BotServiceManager.
+ */
+ public static void listPrivateLinkResources(com.azure.resourcemanager.botservice.BotServiceManager manager) {
+ manager.privateLinkResources().listByBotResourceWithResponse("res6977", "sto2527", Context.NONE);
+ }
+}