diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md
index 8ed55003891f..8c68e918d200 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2021-10-18)
+- Azure Resource Manager CognitiveServices client library for Java. This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package tag package-2021-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.2 (2021-05-24)
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md
index 013dcbefcb02..5fafdd789b72 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-cognitiveservices
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({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/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md
new file mode 100644
index 000000000000..3a0e2264eada
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md
@@ -0,0 +1,612 @@
+# Code snippets and samples
+
+
+## Accounts
+
+- [Create](#accounts_create)
+- [Delete](#accounts_delete)
+- [GetByResourceGroup](#accounts_getbyresourcegroup)
+- [List](#accounts_list)
+- [ListByResourceGroup](#accounts_listbyresourcegroup)
+- [ListKeys](#accounts_listkeys)
+- [ListSkus](#accounts_listskus)
+- [ListUsages](#accounts_listusages)
+- [RegenerateKey](#accounts_regeneratekey)
+- [Update](#accounts_update)
+
+## DeletedAccounts
+
+- [Get](#deletedaccounts_get)
+- [List](#deletedaccounts_list)
+- [Purge](#deletedaccounts_purge)
+
+## Operations
+
+- [List](#operations_list)
+
+## PrivateEndpointConnections
+
+- [CreateOrUpdate](#privateendpointconnections_createorupdate)
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [List](#privateendpointconnections_list)
+
+## PrivateLinkResources
+
+- [List](#privatelinkresources_list)
+
+## ResourceProvider
+
+- [CheckDomainAvailability](#resourceprovider_checkdomainavailability)
+- [CheckSkuAvailability](#resourceprovider_checkskuavailability)
+
+## ResourceSkus
+
+- [List](#resourceskus_list)
+### Accounts_Create
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.AccountProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Encryption;
+import com.azure.resourcemanager.cognitiveservices.models.Identity;
+import com.azure.resourcemanager.cognitiveservices.models.KeySource;
+import com.azure.resourcemanager.cognitiveservices.models.KeyVaultProperties;
+import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+import com.azure.resourcemanager.cognitiveservices.models.UserOwnedStorage;
+import java.util.Arrays;
+
+/** Samples for Accounts Create. */
+public final class AccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CreateAccountMin.json
+ */
+ /**
+ * Sample code: Create Account Min.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void createAccountMin(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .accounts()
+ .define("testCreate1")
+ .withExistingResourceGroup("myResourceGroup")
+ .withRegion("West US")
+ .withKind("CognitiveServices")
+ .withSku(new Sku().withName("S0"))
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withProperties(new AccountProperties())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CreateAccount.json
+ */
+ /**
+ * Sample code: Create Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void createAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .accounts()
+ .define("testCreate1")
+ .withExistingResourceGroup("myResourceGroup")
+ .withRegion("West US")
+ .withKind("Emotion")
+ .withSku(new Sku().withName("S0"))
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withProperties(
+ new AccountProperties()
+ .withEncryption(
+ new Encryption()
+ .withKeyVaultProperties(
+ new KeyVaultProperties()
+ .withKeyName("KeyName")
+ .withKeyVersion("891CF236-D241-4738-9462-D506AF493DFA")
+ .withKeyVaultUri("https://pltfrmscrts-use-pc-dev.vault.azure.net/"))
+ .withKeySource(KeySource.MICROSOFT_KEY_VAULT))
+ .withUserOwnedStorage(
+ Arrays
+ .asList(
+ new UserOwnedStorage()
+ .withResourceId(
+ "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"))))
+ .create();
+ }
+}
+```
+
+### Accounts_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Accounts Delete. */
+public final class AccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/DeleteAccount.json
+ */
+ /**
+ * Sample code: Delete Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deleteAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().delete("myResourceGroup", "PropTest01", Context.NONE);
+ }
+}
+```
+
+### Accounts_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Accounts GetByResourceGroup. */
+public final class AccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetAccount.json
+ */
+ /**
+ * Sample code: Get Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().getByResourceGroupWithResponse("myResourceGroup", "myAccount", Context.NONE);
+ }
+}
+```
+
+### Accounts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Accounts List. */
+public final class AccountsListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListAccountsBySubscription.json
+ */
+ /**
+ * Sample code: List Accounts by Subscription.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listAccountsBySubscription(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().list(Context.NONE);
+ }
+}
+```
+
+### Accounts_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListByResourceGroup. */
+public final class AccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListAccountsByResourceGroup.json
+ */
+ /**
+ * Sample code: List Accounts by Resource Group.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listAccountsByResourceGroup(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listByResourceGroup("myResourceGroup", Context.NONE);
+ }
+}
+```
+
+### Accounts_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListKeys. */
+public final class AccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListKeys.json
+ */
+ /**
+ * Sample code: List Keys.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listKeys(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listKeysWithResponse("myResourceGroup", "myAccount", Context.NONE);
+ }
+}
+```
+
+### Accounts_ListSkus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListSkus. */
+public final class AccountsListSkusSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListSkus.json
+ */
+ /**
+ * Sample code: List SKUs.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listSKUs(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listSkusWithResponse("myResourceGroup", "myAccount", Context.NONE);
+ }
+}
+```
+
+### Accounts_ListUsages
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListUsages. */
+public final class AccountsListUsagesSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetUsages.json
+ */
+ /**
+ * Sample code: Get Usages.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getUsages(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listUsagesWithResponse("myResourceGroup", "TestUsage02", null, Context.NONE);
+ }
+}
+```
+
+### Accounts_RegenerateKey
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.KeyName;
+import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters;
+
+/** Samples for Accounts RegenerateKey. */
+public final class AccountsRegenerateKeySamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate Keys.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void regenerateKeys(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .accounts()
+ .regenerateKeyWithResponse(
+ "myResourceGroup", "myAccount", new RegenerateKeyParameters().withKeyName(KeyName.KEY2), Context.NONE);
+ }
+}
+```
+
+### Accounts_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.Account;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+
+/** Samples for Accounts Update. */
+public final class AccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/UpdateAccount.json
+ */
+ /**
+ * Sample code: Update Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void updateAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ Account resource =
+ manager.accounts().getByResourceGroupWithResponse("bvttest", "bingSearch", Context.NONE).getValue();
+ resource.update().withSku(new Sku().withName("S2")).apply();
+ }
+}
+```
+
+### DeletedAccounts_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedAccounts Get. */
+public final class DeletedAccountsGetSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetDeletedAccount.json
+ */
+ /**
+ * Sample code: Get Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.deletedAccounts().getWithResponse("westus", "myResourceGroup", "myAccount", Context.NONE);
+ }
+}
+```
+
+### DeletedAccounts_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedAccounts List. */
+public final class DeletedAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListAccountsBySubscription.json
+ */
+ /**
+ * Sample code: List Deleted Accounts by Subscription.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listDeletedAccountsBySubscription(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.deletedAccounts().list(Context.NONE);
+ }
+}
+```
+
+### DeletedAccounts_Purge
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedAccounts Purge. */
+public final class DeletedAccountsPurgeSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/PurgeDeletedAccount.json
+ */
+ /**
+ * Sample code: Delete Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deleteAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.deletedAccounts().purge("westus", "myResourceGroup", "PropTest01", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetOperations.json
+ */
+ /**
+ * Sample code: Get Operations.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getOperations(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionProperties;
+import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections CreateOrUpdate. */
+public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/PutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: PutPrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void putPrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("{privateEndpointConnectionName}")
+ .withExistingAccount("res7687", "sto9699")
+ .withProperties(
+ new PrivateEndpointConnectionProperties()
+ .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/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/DeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: DeletePrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deletePrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .privateEndpointConnections()
+ .delete("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/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: GetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getPrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager 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/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: GetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getPrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.privateEndpointConnections().listWithResponse("res6977", "sto2527", Context.NONE);
+ }
+}
+```
+
+### PrivateLinkResources_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources List. */
+public final class PrivateLinkResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListPrivateLinkResources.json
+ */
+ /**
+ * Sample code: ListPrivateLinkResources.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listPrivateLinkResources(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.privateLinkResources().listWithResponse("res6977", "sto2527", Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_CheckDomainAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.CheckDomainAvailabilityParameter;
+
+/** Samples for ResourceProvider CheckDomainAvailability. */
+public final class ResourceProviderCheckDomainAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CheckDomainAvailability.json
+ */
+ /**
+ * Sample code: Check SKU Availability.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void checkSKUAvailability(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .resourceProviders()
+ .checkDomainAvailabilityWithResponse(
+ new CheckDomainAvailabilityParameter()
+ .withSubdomainName("contosodemoapp1")
+ .withType("Microsoft.CognitiveServices/accounts"),
+ Context.NONE);
+ }
+}
+```
+
+### ResourceProvider_CheckSkuAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.CheckSkuAvailabilityParameter;
+import java.util.Arrays;
+
+/** Samples for ResourceProvider CheckSkuAvailability. */
+public final class ResourceProviderCheckSkuAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CheckSkuAvailability.json
+ */
+ /**
+ * Sample code: Check SKU Availability.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void checkSKUAvailability(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .resourceProviders()
+ .checkSkuAvailabilityWithResponse(
+ "westus",
+ new CheckSkuAvailabilityParameter()
+ .withSkus(Arrays.asList("S0"))
+ .withKind("Face")
+ .withType("Microsoft.CognitiveServices/accounts"),
+ Context.NONE);
+ }
+}
+```
+
+### ResourceSkus_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ResourceSkus List. */
+public final class ResourceSkusListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetSkus.json
+ */
+ /**
+ * Sample code: Regenerate Keys.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void regenerateKeys(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.resourceSkus().list(Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
index c231fdbe708a..fe103ad89ea0 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/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-cognitiveservices
- 1.0.0-beta.3
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-cognitiveservices
+ 1.0.0-beta.3
+ jar
- Microsoft Azure SDK for CognitiveServices Management
- This package contains Microsoft Azure SDK for CognitiveServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Cognitive Services Management Client. Package tag package-2021-04.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for CognitiveServices Management
+ This package contains Microsoft Azure SDK for CognitiveServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Cognitive Services Management Client. Package tag package-2021-04.
+ 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/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java
index e8f52400366b..a47befcbabca 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/CognitiveServicesManager.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;
@@ -101,6 +101,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;
@@ -140,6 +141,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.
*
@@ -182,7 +194,7 @@ public CognitiveServicesManager authenticate(TokenCredential credential, AzurePr
.append("-")
.append("com.azure.resourcemanager.cognitiveservices")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -196,6 +208,9 @@ public CognitiveServicesManager authenticate(TokenCredential credential, AzurePr
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
@@ -205,10 +220,7 @@ public CognitiveServicesManager authenticate(TokenCredential credential, AzurePr
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));
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountsClient.java
index ca12675af610..90e20a4f77bd 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountsClient.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/AccountsClient.java
@@ -32,7 +32,7 @@ public interface AccountsClient {
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AccountInner> beginCreate(
String resourceGroupName, String accountName, AccountInner account);
@@ -50,7 +50,7 @@ SyncPoller, AccountInner> beginCreate(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AccountInner> beginCreate(
String resourceGroupName, String accountName, AccountInner account, Context context);
@@ -99,7 +99,7 @@ SyncPoller, AccountInner> beginCreate(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AccountInner> beginUpdate(
String resourceGroupName, String accountName, AccountInner account);
@@ -116,7 +116,7 @@ SyncPoller, AccountInner> beginUpdate(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AccountInner> beginUpdate(
String resourceGroupName, String accountName, AccountInner account, Context context);
@@ -161,7 +161,7 @@ SyncPoller, AccountInner> beginUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String accountName);
/**
@@ -175,7 +175,7 @@ SyncPoller, AccountInner> beginUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context);
/**
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java
index 2370e3061741..c44ab1375c78 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java
@@ -58,7 +58,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginPurge(String location, String resourceGroupName, String accountName);
/**
@@ -73,7 +73,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginPurge(
String location, String resourceGroupName, String accountName, Context context);
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java
index 9eace0903a9a..cbc670b56a7b 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java
@@ -89,7 +89,7 @@ Response getWithResponse(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String accountName,
@@ -110,7 +110,7 @@ SyncPoller, PrivateEndpointConnection
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String accountName,
@@ -172,7 +172,7 @@ PrivateEndpointConnectionInner createOrUpdate(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String accountName, String privateEndpointConnectionName);
@@ -189,7 +189,7 @@ SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context);
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java
index 70907808fd37..10fc189c75f8 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java
@@ -17,7 +17,7 @@ public interface ResourceSkusClient {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface ResourceSkusClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java
index cc0bb62237e0..d339cb7a759c 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java
@@ -12,6 +12,7 @@
import com.azure.resourcemanager.cognitiveservices.models.Identity;
import com.azure.resourcemanager.cognitiveservices.models.Sku;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -50,6 +51,7 @@ public final class AccountInner extends AzureEntityResource {
* Resource tags.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/*
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java
index 5a8224cf19c1..615f640bd692 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java
@@ -12,7 +12,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Details of a REST API operation, returned from the Resource Provider Operations API. */
+/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
@Fluent
public final class OperationInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java
index 1e44a6bb0dbc..a593c083f264 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java
@@ -367,7 +367,7 @@ private Mono>> createWithResponseAsync(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AccountInner> beginCreateAsync(
String resourceGroupName, String accountName, AccountInner account) {
Mono>> mono = createWithResponseAsync(resourceGroupName, accountName, account);
@@ -391,7 +391,7 @@ private PollerFlux, AccountInner> beginCreateAsync(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AccountInner> beginCreateAsync(
String resourceGroupName, String accountName, AccountInner account, Context context) {
context = this.client.mergeContext(context);
@@ -416,7 +416,7 @@ private PollerFlux, AccountInner> beginCreateAsync(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AccountInner> beginCreate(
String resourceGroupName, String accountName, AccountInner account) {
return beginCreateAsync(resourceGroupName, accountName, account).getSyncPoller();
@@ -436,7 +436,7 @@ public SyncPoller, AccountInner> beginCreate(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AccountInner> beginCreate(
String resourceGroupName, String accountName, AccountInner account, Context context) {
return beginCreateAsync(resourceGroupName, accountName, account, context).getSyncPoller();
@@ -643,7 +643,7 @@ private Mono>> updateWithResponseAsync(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AccountInner> beginUpdateAsync(
String resourceGroupName, String accountName, AccountInner account) {
Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, account);
@@ -666,7 +666,7 @@ private PollerFlux, AccountInner> beginUpdateAsync(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AccountInner> beginUpdateAsync(
String resourceGroupName, String accountName, AccountInner account, Context context) {
context = this.client.mergeContext(context);
@@ -690,7 +690,7 @@ private PollerFlux, AccountInner> beginUpdateAsync(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AccountInner> beginUpdate(
String resourceGroupName, String accountName, AccountInner account) {
return beginUpdateAsync(resourceGroupName, accountName, account).getSyncPoller();
@@ -709,7 +709,7 @@ public SyncPoller, AccountInner> beginUpdate(
* @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location
* and SKU.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AccountInner> beginUpdate(
String resourceGroupName, String accountName, AccountInner account, Context context) {
return beginUpdateAsync(resourceGroupName, accountName, account, context).getSyncPoller();
@@ -893,7 +893,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName);
return this
@@ -912,7 +912,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String accountName, Context context) {
context = this.client.mergeContext(context);
@@ -932,7 +932,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) {
return beginDeleteAsync(resourceGroupName, accountName).getSyncPoller();
}
@@ -948,7 +948,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String accountName, Context context) {
return beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller();
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java
index a048fbbf38ee..26844c4edd94 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java
@@ -401,7 +401,7 @@ private Mono>> purgeWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginPurgeAsync(
String location, String resourceGroupName, String accountName) {
Mono>> mono = purgeWithResponseAsync(location, resourceGroupName, accountName);
@@ -422,7 +422,7 @@ private PollerFlux, Void> beginPurgeAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginPurgeAsync(
String location, String resourceGroupName, String accountName, Context context) {
context = this.client.mergeContext(context);
@@ -444,7 +444,7 @@ private PollerFlux, Void> beginPurgeAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginPurge(
String location, String resourceGroupName, String accountName) {
return beginPurgeAsync(location, resourceGroupName, accountName).getSyncPoller();
@@ -462,7 +462,7 @@ public SyncPoller, Void> beginPurge(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginPurge(
String location, String resourceGroupName, String accountName, Context context) {
return beginPurgeAsync(location, resourceGroupName, accountName, context).getSyncPoller();
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java
index 8b85617d850d..20aacf0b0c77 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java
@@ -600,7 +600,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, PrivateEndpointConnectionInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -633,7 +633,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, PrivateEndpointConnectionInner>
beginCreateOrUpdateAsync(
String resourceGroupName,
@@ -668,7 +668,7 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String accountName,
@@ -692,7 +692,7 @@ public SyncPoller, PrivateEndpointCon
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate(
String resourceGroupName,
String accountName,
@@ -926,7 +926,7 @@ private Mono>> deleteWithResponseAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String accountName, String privateEndpointConnectionName) {
Mono>> mono =
@@ -949,7 +949,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context) {
context = this.client.mergeContext(context);
@@ -972,7 +972,7 @@ private PollerFlux, Void> beginDeleteAsync(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String accountName, String privateEndpointConnectionName) {
return beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName).getSyncPoller();
@@ -991,7 +991,7 @@ public SyncPoller, Void> beginDelete(
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context) {
return beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName, context).getSyncPoller();
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java
index 9d80f1769764..ad84a3e49c51 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java
@@ -86,7 +86,7 @@ Mono> listNext(
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -132,7 +132,7 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -173,7 +173,7 @@ private Mono> listSinglePageAsync(Context contex
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -187,7 +187,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -200,7 +200,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -214,7 +214,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java
index 8a8ae7dfc254..1ffbb3a3297e 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java
@@ -8,6 +8,7 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateEndpointConnectionInner;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
@@ -147,6 +148,7 @@ public final class AccountProperties {
* Dictionary of
*/
@JsonProperty(value = "endpoints", access = JsonProperty.Access.WRITE_ONLY)
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map endpoints;
/*
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java
index fa7c0cd2edd9..a38a92f69753 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java
@@ -10,7 +10,7 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The resource model definition for an Azure Resource Manager resource with an etag. */
+/** Entity Resource The resource model definition for an Azure Resource Manager resource with an etag. */
@Immutable
public class AzureEntityResource extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(AzureEntityResource.class);
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java
index 01771272ec7a..26ac6b554075 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java
@@ -7,6 +7,7 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -40,6 +41,7 @@ public class Identity {
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}
*/
@JsonProperty(value = "userAssignedIdentities")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map userAssignedIdentities;
/**
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java
index 930adaa5bc18..8c5446f09c43 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java
@@ -14,7 +14,7 @@ public interface ResourceSkus {
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
PagedIterable list();
@@ -25,7 +25,7 @@ public interface ResourceSkus {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list of Microsoft.
+ * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription.
*/
PagedIterable list(Context context);
}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java
new file mode 100644
index 000000000000..82cf9b735d8e
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.resourcemanager.cognitiveservices.models.AccountProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Encryption;
+import com.azure.resourcemanager.cognitiveservices.models.Identity;
+import com.azure.resourcemanager.cognitiveservices.models.KeySource;
+import com.azure.resourcemanager.cognitiveservices.models.KeyVaultProperties;
+import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+import com.azure.resourcemanager.cognitiveservices.models.UserOwnedStorage;
+import java.util.Arrays;
+
+/** Samples for Accounts Create. */
+public final class AccountsCreateSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CreateAccountMin.json
+ */
+ /**
+ * Sample code: Create Account Min.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void createAccountMin(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .accounts()
+ .define("testCreate1")
+ .withExistingResourceGroup("myResourceGroup")
+ .withRegion("West US")
+ .withKind("CognitiveServices")
+ .withSku(new Sku().withName("S0"))
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withProperties(new AccountProperties())
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CreateAccount.json
+ */
+ /**
+ * Sample code: Create Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void createAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .accounts()
+ .define("testCreate1")
+ .withExistingResourceGroup("myResourceGroup")
+ .withRegion("West US")
+ .withKind("Emotion")
+ .withSku(new Sku().withName("S0"))
+ .withIdentity(new Identity().withType(ResourceIdentityType.SYSTEM_ASSIGNED))
+ .withProperties(
+ new AccountProperties()
+ .withEncryption(
+ new Encryption()
+ .withKeyVaultProperties(
+ new KeyVaultProperties()
+ .withKeyName("KeyName")
+ .withKeyVersion("891CF236-D241-4738-9462-D506AF493DFA")
+ .withKeyVaultUri("https://pltfrmscrts-use-pc-dev.vault.azure.net/"))
+ .withKeySource(KeySource.MICROSOFT_KEY_VAULT))
+ .withUserOwnedStorage(
+ Arrays
+ .asList(
+ new UserOwnedStorage()
+ .withResourceId(
+ "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount"))))
+ .create();
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java
new file mode 100644
index 000000000000..b39c8a1bf77b
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Accounts Delete. */
+public final class AccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/DeleteAccount.json
+ */
+ /**
+ * Sample code: Delete Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deleteAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().delete("myResourceGroup", "PropTest01", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java
new file mode 100644
index 000000000000..e62f0419b7aa
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Accounts GetByResourceGroup. */
+public final class AccountsGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetAccount.json
+ */
+ /**
+ * Sample code: Get Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().getByResourceGroupWithResponse("myResourceGroup", "myAccount", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java
new file mode 100644
index 000000000000..2f1750945bb8
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListByResourceGroup. */
+public final class AccountsListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListAccountsByResourceGroup.json
+ */
+ /**
+ * Sample code: List Accounts by Resource Group.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listAccountsByResourceGroup(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listByResourceGroup("myResourceGroup", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java
new file mode 100644
index 000000000000..07eaa9014e85
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListKeys. */
+public final class AccountsListKeysSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListKeys.json
+ */
+ /**
+ * Sample code: List Keys.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listKeys(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listKeysWithResponse("myResourceGroup", "myAccount", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java
new file mode 100644
index 000000000000..916bb343a5ad
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Accounts List. */
+public final class AccountsListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListAccountsBySubscription.json
+ */
+ /**
+ * Sample code: List Accounts by Subscription.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listAccountsBySubscription(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().list(Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java
new file mode 100644
index 000000000000..83b22fdbc7ba
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListSkus. */
+public final class AccountsListSkusSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListSkus.json
+ */
+ /**
+ * Sample code: List SKUs.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listSKUs(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listSkusWithResponse("myResourceGroup", "myAccount", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java
new file mode 100644
index 000000000000..7e265bd4284c
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Accounts ListUsages. */
+public final class AccountsListUsagesSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetUsages.json
+ */
+ /**
+ * Sample code: Get Usages.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getUsages(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts().listUsagesWithResponse("myResourceGroup", "TestUsage02", null, Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java
new file mode 100644
index 000000000000..6aa52892952a
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.KeyName;
+import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters;
+
+/** Samples for Accounts RegenerateKey. */
+public final class AccountsRegenerateKeySamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/RegenerateKey.json
+ */
+ /**
+ * Sample code: Regenerate Keys.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void regenerateKeys(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .accounts()
+ .regenerateKeyWithResponse(
+ "myResourceGroup", "myAccount", new RegenerateKeyParameters().withKeyName(KeyName.KEY2), Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java
new file mode 100644
index 000000000000..500f36470073
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.Account;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+
+/** Samples for Accounts Update. */
+public final class AccountsUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/UpdateAccount.json
+ */
+ /**
+ * Sample code: Update Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void updateAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ Account resource =
+ manager.accounts().getByResourceGroupWithResponse("bvttest", "bingSearch", Context.NONE).getValue();
+ resource.update().withSku(new Sku().withName("S2")).apply();
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java
new file mode 100644
index 000000000000..160c783496f2
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DeletedAccounts Get. */
+public final class DeletedAccountsGetSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetDeletedAccount.json
+ */
+ /**
+ * Sample code: Get Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.deletedAccounts().getWithResponse("westus", "myResourceGroup", "myAccount", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java
new file mode 100644
index 000000000000..c3b9b89fdaf8
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DeletedAccounts List. */
+public final class DeletedAccountsListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListAccountsBySubscription.json
+ */
+ /**
+ * Sample code: List Deleted Accounts by Subscription.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listDeletedAccountsBySubscription(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.deletedAccounts().list(Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java
new file mode 100644
index 000000000000..5aa4c092ae4b
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for DeletedAccounts Purge. */
+public final class DeletedAccountsPurgeSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/PurgeDeletedAccount.json
+ */
+ /**
+ * Sample code: Delete Account.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deleteAccount(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.deletedAccounts().purge("westus", "myResourceGroup", "PropTest01", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java
new file mode 100644
index 000000000000..f54e3bc105b0
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetOperations.json
+ */
+ /**
+ * Sample code: Get Operations.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getOperations(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java
new file mode 100644
index 000000000000..04322df3a36f
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionProperties;
+import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections CreateOrUpdate. */
+public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/PutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: PutPrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void putPrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("{privateEndpointConnectionName}")
+ .withExistingAccount("res7687", "sto9699")
+ .withProperties(
+ new PrivateEndpointConnectionProperties()
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Auto-Approved")))
+ .create();
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java
new file mode 100644
index 000000000000..90e12039f8e2
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/DeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: DeletePrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deletePrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .privateEndpointConnections()
+ .delete("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java
new file mode 100644
index 000000000000..f75ad1780368
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: GetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getPrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .privateEndpointConnections()
+ .getWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java
new file mode 100644
index 000000000000..22588533cc12
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: GetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getPrivateEndpointConnection(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.privateEndpointConnections().listWithResponse("res6977", "sto2527", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java
new file mode 100644
index 000000000000..df92a4fe1ece
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources List. */
+public final class PrivateLinkResourcesListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/ListPrivateLinkResources.json
+ */
+ /**
+ * Sample code: ListPrivateLinkResources.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listPrivateLinkResources(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.privateLinkResources().listWithResponse("res6977", "sto2527", Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java
new file mode 100644
index 000000000000..9382d2631887
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java
@@ -0,0 +1,30 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.CheckDomainAvailabilityParameter;
+
+/** Samples for ResourceProvider CheckDomainAvailability. */
+public final class ResourceProviderCheckDomainAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CheckDomainAvailability.json
+ */
+ /**
+ * Sample code: Check SKU Availability.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void checkSKUAvailability(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .resourceProviders()
+ .checkDomainAvailabilityWithResponse(
+ new CheckDomainAvailabilityParameter()
+ .withSubdomainName("contosodemoapp1")
+ .withType("Microsoft.CognitiveServices/accounts"),
+ Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java
new file mode 100644
index 000000000000..4664298a0441
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.models.CheckSkuAvailabilityParameter;
+import java.util.Arrays;
+
+/** Samples for ResourceProvider CheckSkuAvailability. */
+public final class ResourceProviderCheckSkuAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/CheckSkuAvailability.json
+ */
+ /**
+ * Sample code: Check SKU Availability.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void checkSKUAvailability(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager
+ .resourceProviders()
+ .checkSkuAvailabilityWithResponse(
+ "westus",
+ new CheckSkuAvailabilityParameter()
+ .withSkus(Arrays.asList("S0"))
+ .withKind("Face")
+ .withType("Microsoft.CognitiveServices/accounts"),
+ Context.NONE);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java
new file mode 100644
index 000000000000..c8aa17904a7a
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.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.cognitiveservices.generated;
+
+import com.azure.core.util.Context;
+
+/** Samples for ResourceSkus List. */
+public final class ResourceSkusListSamples {
+ /*
+ * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-04-30/examples/GetSkus.json
+ */
+ /**
+ * Sample code: Regenerate Keys.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void regenerateKeys(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.resourceSkus().list(Context.NONE);
+ }
+}