diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md
index f292bfa476fb..e02fef56e3c3 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md
@@ -1,14 +1,122 @@
# Release History
-## 1.5.0-beta.2 (Unreleased)
+## 1.5.0-beta.2 (2026-05-26)
+
+- Azure Resource Manager CognitiveServices client library for Java. This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package api-version 2026-03-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Features Added
-### Breaking Changes
+* `models.ManagedComputeDeployment$Update` was added
+
+* `models.Compute$DefinitionStages` was added
+
+* `models.ManagedComputeDeploymentInfo` was added
+
+* `models.VmPriority` was added
+
+* `models.Compute$UpdateStages` was added
+
+* `models.Workbench$DefinitionStages` was added
+
+* `models.ComputeType` was added
+
+* `models.ManagedComputeDeployments` was added
+
+* `models.Workbench$Definition` was added
+
+* `models.ManagedComputeCapacities` was added
+
+* `models.EvaluateDeploymentPoliciesResponse` was added
+
+* `models.Compute$Definition` was added
+
+* `models.ManagedComputeDeployment$UpdateStages` was added
+
+* `models.ComputeProperties` was added
+
+* `models.EvaluateDeploymentPoliciesDeploymentProperties` was added
+
+* `models.ManagedComputeDeployment` was added
+
+* `models.Workbench$Update` was added
+
+* `models.ManagedComputeCapacity` was added
+
+* `models.EvaluateDeploymentPoliciesRequest` was added
+
+* `models.PolicyExpressionEvaluationDetails` was added
+
+* `models.Computes` was added
+
+* `models.Pool` was added
+
+* `models.ManagedComputeUsage` was added
+
+* `models.ConnectivityEndpoints` was added
+
+* `models.SshSettings` was added
+
+* `models.Compute$Update` was added
+
+* `models.ManagedComputeUsagesOperationGroups` was added
-### Bugs Fixed
+* `models.DeploymentPolicyEvaluationResult` was added
+
+* `models.ManagedComputeDeploymentProvisioningDetails` was added
+
+* `models.ManagedComputeDeployment$DefinitionStages` was added
+
+* `models.ManagedComputeDeploymentProperties` was added
+
+* `models.WorkbenchProperties` was added
+
+* `models.PatchResourceSku` was added
+
+* `models.ContainerInstanceComputeProperties` was added
+
+* `models.DeploymentSizeCapacity` was added
+
+* `models.Workbench$UpdateStages` was added
+
+* `models.Compute` was added
+
+* `models.ManagedComputeCapacityProperties` was added
+
+* `models.ManagedComputeDeployment$Definition` was added
+
+* `models.Workbenches` was added
+
+* `models.PolicyEvaluationOutcome` was added
+
+* `models.ComputeProvisioningState` was added
+
+* `models.ClusterComputeProperties` was added
+
+* `models.PolicyAssignmentEvaluationDetails` was added
+
+* `models.EvaluateDeploymentPoliciesDeployment` was added
+
+* `models.ManagedComputeDeploymentRoutes` was added
+
+* `models.Workbench` was added
+
+#### `models.Accounts` was modified
+
+* `evaluateDeploymentPolicies(java.lang.String,java.lang.String,models.EvaluateDeploymentPoliciesRequest)` was added
+* `evaluateDeploymentPoliciesWithResponse(java.lang.String,java.lang.String,models.EvaluateDeploymentPoliciesRequest,com.azure.core.util.Context)` was added
+
+#### `CognitiveServicesManager` was modified
+
+* `managedComputeUsagesOperationGroups()` was added
+* `workbenches()` was added
+* `managedComputeCapacities()` was added
+* `computes()` was added
+* `managedComputeDeployments()` was added
+
+#### `models.Account` was modified
-### Other Changes
+* `evaluateDeploymentPoliciesWithResponse(models.EvaluateDeploymentPoliciesRequest,com.azure.core.util.Context)` was added
+* `evaluateDeploymentPolicies(models.EvaluateDeploymentPoliciesRequest)` was added
## 1.5.0-beta.1 (2026-04-30)
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md
index 33248d47a138..bfa7b5b77ae8 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager CognitiveServices client library for Java.
-This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package api-version 2026-01-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package api-version 2026-03-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-cognitiveservices
- 1.5.0-beta.1
+ 1.5.0-beta.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md
index e7b8ecc4774f..59aff3e5f9ff 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md
@@ -20,6 +20,7 @@
- [Create](#accounts_create)
- [Delete](#accounts_delete)
+- [EvaluateDeploymentPolicies](#accounts_evaluatedeploymentpolicies)
- [GetByResourceGroup](#accounts_getbyresourcegroup)
- [List](#accounts_list)
- [ListByResourceGroup](#accounts_listbyresourcegroup)
@@ -74,6 +75,17 @@
- [Get](#computeoperations_get)
+## Computes
+
+- [CreateOrUpdate](#computes_createorupdate)
+- [Delete](#computes_delete)
+- [Get](#computes_get)
+- [List](#computes_list)
+- [Restart](#computes_restart)
+- [Start](#computes_start)
+- [Stop](#computes_stop)
+- [Update](#computes_update)
+
## DefenderForAISettings
- [CreateOrUpdate](#defenderforaisettings_createorupdate)
@@ -109,6 +121,22 @@
- [List](#locationbasedmodelcapacities_list)
+## ManagedComputeCapacities
+
+- [List](#managedcomputecapacities_list)
+
+## ManagedComputeDeployments
+
+- [CreateOrUpdate](#managedcomputedeployments_createorupdate)
+- [Delete](#managedcomputedeployments_delete)
+- [Get](#managedcomputedeployments_get)
+- [List](#managedcomputedeployments_list)
+- [Update](#managedcomputedeployments_update)
+
+## ManagedComputeUsagesOperationGroup
+
+- [List](#managedcomputeusagesoperationgroup_list)
+
## ManagedNetworkProvisions
- [ProvisionManagedNetwork](#managednetworkprovisions_provisionmanagednetwork)
@@ -266,6 +294,17 @@
## Usages
- [List](#usages_list)
+
+## Workbenches
+
+- [CreateOrUpdate](#workbenches_createorupdate)
+- [Delete](#workbenches_delete)
+- [Get](#workbenches_get)
+- [List](#workbenches_list)
+- [Restart](#workbenches_restart)
+- [Start](#workbenches_start)
+- [Stop](#workbenches_stop)
+- [Update](#workbenches_update)
### AccountCapabilityHosts_CreateOrUpdate
```java
@@ -276,7 +315,7 @@ import com.azure.resourcemanager.cognitiveservices.models.CapabilityHostProperti
*/
public final class AccountCapabilityHostsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountCapabilityHost/createOrUpdate.json
+ * x-ms-original-file: 2026-03-15-preview/AccountCapabilityHost/createOrUpdate.json
*/
/**
* Sample code: CreateOrUpdate Account CapabilityHost.
@@ -304,7 +343,7 @@ public final class AccountCapabilityHostsCreateOrUpdateSamples {
*/
public final class AccountCapabilityHostsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountCapabilityHost/delete.json
+ * x-ms-original-file: 2026-03-15-preview/AccountCapabilityHost/delete.json
*/
/**
* Sample code: Delete Account CapabilityHost.
@@ -327,7 +366,7 @@ public final class AccountCapabilityHostsDeleteSamples {
*/
public final class AccountCapabilityHostsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountCapabilityHost/get.json
+ * x-ms-original-file: 2026-03-15-preview/AccountCapabilityHost/get.json
*/
/**
* Sample code: Get Account CapabilityHost.
@@ -350,7 +389,7 @@ public final class AccountCapabilityHostsGetSamples {
*/
public final class AccountCapabilityHostsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountCapabilityHost/list.json
+ * x-ms-original-file: 2026-03-15-preview/AccountCapabilityHost/list.json
*/
/**
* Sample code: List Account CapabilityHosts.
@@ -377,7 +416,7 @@ import java.time.OffsetDateTime;
*/
public final class AccountConnectionsCreateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountConnection/create.json
+ * x-ms-original-file: 2026-03-15-preview/AccountConnection/create.json
*/
/**
* Sample code: CreateAccountConnection.
@@ -405,7 +444,7 @@ public final class AccountConnectionsCreateSamples {
*/
public final class AccountConnectionsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountConnection/delete.json
+ * x-ms-original-file: 2026-03-15-preview/AccountConnection/delete.json
*/
/**
* Sample code: DeleteAccountConnection.
@@ -428,7 +467,7 @@ public final class AccountConnectionsDeleteSamples {
*/
public final class AccountConnectionsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountConnection/get.json
+ * x-ms-original-file: 2026-03-15-preview/AccountConnection/get.json
*/
/**
* Sample code: GetAccountConnection.
@@ -451,7 +490,7 @@ public final class AccountConnectionsGetSamples {
*/
public final class AccountConnectionsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountConnection/list.json
+ * x-ms-original-file: 2026-03-15-preview/AccountConnection/list.json
*/
/**
* Sample code: ListAccountConnections.
@@ -483,7 +522,7 @@ import java.util.Map;
*/
public final class AccountConnectionsUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AccountConnection/update.json
+ * x-ms-original-file: 2026-03-15-preview/AccountConnection/update.json
*/
/**
* Sample code: UpdateAccountConnection.
@@ -536,7 +575,7 @@ import java.util.Arrays;
*/
public final class AccountsCreateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CreateAccountMin.json
+ * x-ms-original-file: 2026-03-15-preview/CreateAccountMin.json
*/
/**
* Sample code: Create Account Min.
@@ -556,7 +595,7 @@ public final class AccountsCreateSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/CreateAccount.json
+ * x-ms-original-file: 2026-03-15-preview/CreateAccount.json
*/
/**
* Sample code: Create Account.
@@ -591,7 +630,7 @@ public final class AccountsCreateSamples {
*/
public final class AccountsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteAccount.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteAccount.json
*/
/**
* Sample code: Delete Account.
@@ -604,6 +643,47 @@ public final class AccountsDeleteSamples {
}
```
+### Accounts_EvaluateDeploymentPolicies
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.DeploymentModel;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesDeployment;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesDeploymentProperties;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesRequest;
+import java.util.Arrays;
+
+/**
+ * Samples for Accounts EvaluateDeploymentPolicies.
+ */
+public final class AccountsEvaluateDeploymentPoliciesSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/EvaluateDeploymentPolicies.json
+ */
+ /**
+ * Sample code: EvaluateDeploymentPolicies.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ evaluateDeploymentPolicies(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.accounts()
+ .evaluateDeploymentPoliciesWithResponse("resourceGroupName", "accountName",
+ new EvaluateDeploymentPoliciesRequest()
+ .withDeployments(Arrays.asList(
+ new EvaluateDeploymentPoliciesDeployment().withName("gpt4o-deployment")
+ .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties().withModel(
+ new DeploymentModel().withFormat("OpenAI").withName("gpt-4o").withVersion("2024-11-20"))
+ .withRaiPolicyName("Microsoft.DefaultV2")),
+ new EvaluateDeploymentPoliciesDeployment().withName("ada-embedding")
+ .withProperties(new EvaluateDeploymentPoliciesDeploymentProperties()
+ .withModel(new DeploymentModel().withFormat("OpenAI")
+ .withName("text-embedding-ada-002")
+ .withVersion("2"))))),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### Accounts_GetByResourceGroup
```java
@@ -612,7 +692,7 @@ public final class AccountsDeleteSamples {
*/
public final class AccountsGetByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetAccount.json
+ * x-ms-original-file: 2026-03-15-preview/GetAccount.json
*/
/**
* Sample code: Get Account.
@@ -634,7 +714,7 @@ public final class AccountsGetByResourceGroupSamples {
*/
public final class AccountsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListAccountsBySubscription.json
+ * x-ms-original-file: 2026-03-15-preview/ListAccountsBySubscription.json
*/
/**
* Sample code: List Accounts by Subscription.
@@ -656,7 +736,7 @@ public final class AccountsListSamples {
*/
public final class AccountsListByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListAccountsByResourceGroup.json
+ * x-ms-original-file: 2026-03-15-preview/ListAccountsByResourceGroup.json
*/
/**
* Sample code: List Accounts by Resource Group.
@@ -678,7 +758,7 @@ public final class AccountsListByResourceGroupSamples {
*/
public final class AccountsListKeysSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListKeys.json
+ * x-ms-original-file: 2026-03-15-preview/ListKeys.json
*/
/**
* Sample code: List Keys.
@@ -699,7 +779,7 @@ public final class AccountsListKeysSamples {
*/
public final class AccountsListModelsSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListAccountModels.json
+ * x-ms-original-file: 2026-03-15-preview/ListAccountModels.json
*/
/**
* Sample code: List AccountModels.
@@ -720,7 +800,7 @@ public final class AccountsListModelsSamples {
*/
public final class AccountsListSkusSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListSkus.json
+ * x-ms-original-file: 2026-03-15-preview/ListSkus.json
*/
/**
* Sample code: List SKUs.
@@ -741,7 +821,7 @@ public final class AccountsListSkusSamples {
*/
public final class AccountsListUsagesSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetUsages.json
+ * x-ms-original-file: 2026-03-15-preview/GetUsages.json
*/
/**
* Sample code: Get Usages.
@@ -754,7 +834,7 @@ public final class AccountsListUsagesSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/GetUsagesClassicScope.json
+ * x-ms-original-file: 2026-03-15-preview/GetUsagesClassicScope.json
*/
/**
* Sample code: Get Usages Classic Scope.
@@ -768,7 +848,7 @@ public final class AccountsListUsagesSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/GetUsagesDataZoneScope.json
+ * x-ms-original-file: 2026-03-15-preview/GetUsagesDataZoneScope.json
*/
/**
* Sample code: Get Usages DataZone Scope.
@@ -782,7 +862,7 @@ public final class AccountsListUsagesSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/GetUsagesGlobalScope.json
+ * x-ms-original-file: 2026-03-15-preview/GetUsagesGlobalScope.json
*/
/**
* Sample code: Get Usages Global Scope.
@@ -808,7 +888,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameter
*/
public final class AccountsRegenerateKeySamples {
/*
- * x-ms-original-file: 2026-01-15-preview/RegenerateKey.json
+ * x-ms-original-file: 2026-03-15-preview/RegenerateKey.json
*/
/**
* Sample code: Regenerate Keys.
@@ -834,7 +914,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku;
*/
public final class AccountsUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/UpdateAccount.json
+ * x-ms-original-file: 2026-03-15-preview/UpdateAccount.json
*/
/**
* Sample code: Update Account.
@@ -862,7 +942,7 @@ import java.util.Map;
*/
public final class AgentApplicationsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentApplication/createOrUpdate.json
+ * x-ms-original-file: 2026-03-15-preview/AgentApplication/createOrUpdate.json
*/
/**
* Sample code: Create or Update Account Agent Application.
@@ -903,7 +983,7 @@ public final class AgentApplicationsCreateOrUpdateSamples {
*/
public final class AgentApplicationsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentApplication/delete.json
+ * x-ms-original-file: 2026-03-15-preview/AgentApplication/delete.json
*/
/**
* Sample code: Delete Account Agent Application.
@@ -927,7 +1007,7 @@ public final class AgentApplicationsDeleteSamples {
*/
public final class AgentApplicationsDisableSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentApplication/disable.json
+ * x-ms-original-file: 2026-03-15-preview/AgentApplication/disable.json
*/
/**
* Sample code: Disable Agent Application.
@@ -951,7 +1031,7 @@ public final class AgentApplicationsDisableSamples {
*/
public final class AgentApplicationsEnableSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentApplication/enable.json
+ * x-ms-original-file: 2026-03-15-preview/AgentApplication/enable.json
*/
/**
* Sample code: Enable Agent Application.
@@ -975,7 +1055,7 @@ public final class AgentApplicationsEnableSamples {
*/
public final class AgentApplicationsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentApplication/get.json
+ * x-ms-original-file: 2026-03-15-preview/AgentApplication/get.json
*/
/**
* Sample code: Get Account Agent Application.
@@ -1001,7 +1081,7 @@ import java.util.Arrays;
*/
public final class AgentApplicationsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentApplication/list.json
+ * x-ms-original-file: 2026-03-15-preview/AgentApplication/list.json
*/
/**
* Sample code: List Account Agent Applications.
@@ -1025,7 +1105,7 @@ public final class AgentApplicationsListSamples {
*/
public final class AgentApplicationsListAgentsSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentApplication/listAgents.json
+ * x-ms-original-file: 2026-03-15-preview/AgentApplication/listAgents.json
*/
/**
* Sample code: List Agents for Agent Application.
@@ -1056,7 +1136,7 @@ import java.util.Arrays;
*/
public final class AgentDeploymentsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentDeployment/createOrUpdate.json
+ * x-ms-original-file: 2026-03-15-preview/AgentDeployment/createOrUpdate.json
*/
/**
* Sample code: Create or Update Agent Deployment.
@@ -1088,7 +1168,7 @@ public final class AgentDeploymentsCreateOrUpdateSamples {
*/
public final class AgentDeploymentsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentDeployment/delete.json
+ * x-ms-original-file: 2026-03-15-preview/AgentDeployment/delete.json
*/
/**
* Sample code: Delete Agent Deployment.
@@ -1112,7 +1192,7 @@ public final class AgentDeploymentsDeleteSamples {
*/
public final class AgentDeploymentsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentDeployment/get.json
+ * x-ms-original-file: 2026-03-15-preview/AgentDeployment/get.json
*/
/**
* Sample code: Get Agent Deployment.
@@ -1137,7 +1217,7 @@ public final class AgentDeploymentsGetSamples {
*/
public final class AgentDeploymentsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentDeployment/list.json
+ * x-ms-original-file: 2026-03-15-preview/AgentDeployment/list.json
*/
/**
* Sample code: List Agent Deployments.
@@ -1161,7 +1241,7 @@ public final class AgentDeploymentsListSamples {
*/
public final class AgentDeploymentsStartSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentDeployment/start.json
+ * x-ms-original-file: 2026-03-15-preview/AgentDeployment/start.json
*/
/**
* Sample code: Start Agent Deployment.
@@ -1185,7 +1265,7 @@ public final class AgentDeploymentsStartSamples {
*/
public final class AgentDeploymentsStopSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AgentDeployment/stop.json
+ * x-ms-original-file: 2026-03-15-preview/AgentDeployment/stop.json
*/
/**
* Sample code: Stop Agent Deployment.
@@ -1214,7 +1294,7 @@ import com.azure.resourcemanager.cognitiveservices.models.HostingModel;
*/
public final class CommitmentPlansCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutCommitmentPlan.json
+ * x-ms-original-file: 2026-03-15-preview/PutCommitmentPlan.json
*/
/**
* Sample code: PutCommitmentPlan.
@@ -1242,7 +1322,7 @@ public final class CommitmentPlansCreateOrUpdateSamples {
*/
public final class CommitmentPlansCreateOrUpdateAssociationSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CreateSharedCommitmentPlanAssociation.json
+ * x-ms-original-file: 2026-03-15-preview/CreateSharedCommitmentPlanAssociation.json
*/
/**
* Sample code: PutCommitmentPlan.
@@ -1273,7 +1353,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku;
*/
public final class CommitmentPlansCreateOrUpdatePlanSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CreateSharedCommitmentPlan.json
+ * x-ms-original-file: 2026-03-15-preview/CreateSharedCommitmentPlan.json
*/
/**
* Sample code: Create Commitment Plan.
@@ -1305,7 +1385,7 @@ public final class CommitmentPlansCreateOrUpdatePlanSamples {
*/
public final class CommitmentPlansDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteCommitmentPlan.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteCommitmentPlan.json
*/
/**
* Sample code: DeleteCommitmentPlan.
@@ -1328,7 +1408,7 @@ public final class CommitmentPlansDeleteSamples {
*/
public final class CommitmentPlansDeleteAssociationSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteSharedCommitmentPlanAssociation.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteSharedCommitmentPlanAssociation.json
*/
/**
* Sample code: DeleteCommitmentPlan.
@@ -1352,7 +1432,7 @@ public final class CommitmentPlansDeleteAssociationSamples {
*/
public final class CommitmentPlansDeletePlanSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteSharedCommitmentPlan.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteSharedCommitmentPlan.json
*/
/**
* Sample code: Delete Commitment Plan.
@@ -1375,7 +1455,7 @@ public final class CommitmentPlansDeletePlanSamples {
*/
public final class CommitmentPlansGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetCommitmentPlan.json
+ * x-ms-original-file: 2026-03-15-preview/GetCommitmentPlan.json
*/
/**
* Sample code: GetCommitmentPlan.
@@ -1398,7 +1478,7 @@ public final class CommitmentPlansGetSamples {
*/
public final class CommitmentPlansGetAssociationSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetSharedCommitmentPlanAssociation.json
+ * x-ms-original-file: 2026-03-15-preview/GetSharedCommitmentPlanAssociation.json
*/
/**
* Sample code: GetCommitmentPlan.
@@ -1421,7 +1501,7 @@ public final class CommitmentPlansGetAssociationSamples {
*/
public final class CommitmentPlansGetByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetSharedCommitmentPlan.json
+ * x-ms-original-file: 2026-03-15-preview/GetSharedCommitmentPlan.json
*/
/**
* Sample code: Get Commitment Plan.
@@ -1444,7 +1524,7 @@ public final class CommitmentPlansGetByResourceGroupSamples {
*/
public final class CommitmentPlansListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListCommitmentPlans.json
+ * x-ms-original-file: 2026-03-15-preview/ListCommitmentPlans.json
*/
/**
* Sample code: ListCommitmentPlans.
@@ -1466,7 +1546,7 @@ public final class CommitmentPlansListSamples {
*/
public final class CommitmentPlansListAssociationsSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListSharedCommitmentPlanAssociations.json
+ * x-ms-original-file: 2026-03-15-preview/ListSharedCommitmentPlanAssociations.json
*/
/**
* Sample code: ListCommitmentPlans.
@@ -1489,7 +1569,7 @@ public final class CommitmentPlansListAssociationsSamples {
*/
public final class CommitmentPlansListByResourceGroupSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListSharedCommitmentPlansByResourceGroup.json
+ * x-ms-original-file: 2026-03-15-preview/ListSharedCommitmentPlansByResourceGroup.json
*/
/**
* Sample code: List Commitment Plans by Resource Group.
@@ -1511,7 +1591,7 @@ public final class CommitmentPlansListByResourceGroupSamples {
*/
public final class CommitmentPlansListPlansBySubscriptionSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListSharedCommitmentPlansBySubscription.json
+ * x-ms-original-file: 2026-03-15-preview/ListSharedCommitmentPlansBySubscription.json
*/
/**
* Sample code: List Accounts by Subscription.
@@ -1537,7 +1617,7 @@ import java.util.Map;
*/
public final class CommitmentPlansUpdatePlanSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/UpdateSharedCommitmentPlan.json
+ * x-ms-original-file: 2026-03-15-preview/UpdateSharedCommitmentPlan.json
*/
/**
* Sample code: Create Commitment Plan.
@@ -1574,7 +1654,7 @@ public final class CommitmentPlansUpdatePlanSamples {
*/
public final class CommitmentTiersListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListCommitmentTiers.json
+ * x-ms-original-file: 2026-03-15-preview/ListCommitmentTiers.json
*/
/**
* Sample code: ListCommitmentTiers.
@@ -1596,7 +1676,7 @@ public final class CommitmentTiersListSamples {
*/
public final class ComputeOperationsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetComputeOperationStatus.json
+ * x-ms-original-file: 2026-03-15-preview/GetComputeOperationStatus.json
*/
/**
* Sample code: GetComputeOperationStatus.
@@ -1611,6 +1691,272 @@ public final class ComputeOperationsGetSamples {
}
```
+### Computes_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.ClusterComputeProperties;
+import com.azure.resourcemanager.cognitiveservices.models.ContainerInstanceComputeProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Identity;
+import com.azure.resourcemanager.cognitiveservices.models.Pool;
+import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType;
+import com.azure.resourcemanager.cognitiveservices.models.SshSettings;
+import com.azure.resourcemanager.cognitiveservices.models.UserAssignedIdentity;
+import com.azure.resourcemanager.cognitiveservices.models.VmPriority;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for Computes CreateOrUpdate.
+ */
+public final class ComputesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/PutContainerInstanceCompute.json
+ */
+ /**
+ * Sample code: PutContainerInstanceCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ putContainerInstanceCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes()
+ .define("myContainerInstance")
+ .withExistingAccount("rgcognitiveservices", "myAccount")
+ .withProperties(new ContainerInstanceComputeProperties().withTargetClusterId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster")
+ .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:latest")
+ .withIdleTimeBeforeShutdown("PT30M")
+ .withSshSettings(new SshSettings().withSshPublicKey("fakeTokenPlaceholder").withAdminEnabled(true)))
+ .withRegion("eastus")
+ .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity",
+ new UserAssignedIdentity())))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-03-15-preview/PutCompute.json
+ */
+ /**
+ * Sample code: PutCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void putCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes()
+ .define("myCompute")
+ .withExistingAccount("rgcognitiveservices", "myAccount")
+ .withProperties(new ClusterComputeProperties()
+ .withPools(Arrays.asList(new Pool().withName("default")
+ .withVmPriority(VmPriority.REGULAR)
+ .withInstanceType("Standard_DS3_v2")
+ .withNodeCount(2)))
+ .withSubnetArmId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/default"))
+ .withRegion("eastus")
+ .withIdentity(new Identity().withType(ResourceIdentityType.NONE))
+ .create();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Computes_Delete
+
+```java
+/**
+ * Samples for Computes Delete.
+ */
+public final class ComputesDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/DeleteCompute.json
+ */
+ /**
+ * Sample code: DeleteCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deleteCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes().delete("rgcognitiveservices", "myAccount", "myCompute", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Computes_Get
+
+```java
+/**
+ * Samples for Computes Get.
+ */
+public final class ComputesGetSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/GetContainerInstanceCompute.json
+ */
+ /**
+ * Sample code: GetContainerInstanceCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ getContainerInstanceCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes()
+ .getWithResponse("rgcognitiveservices", "myAccount", "myContainerInstance",
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-03-15-preview/GetCompute.json
+ */
+ /**
+ * Sample code: GetCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes()
+ .getWithResponse("rgcognitiveservices", "myAccount", "myCompute", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Computes_List
+
+```java
+/**
+ * Samples for Computes List.
+ */
+public final class ComputesListSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/ListComputes.json
+ */
+ /**
+ * Sample code: ListComputes.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listComputes(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes().list("rgcognitiveservices", "myAccount", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Computes_Restart
+
+```java
+/**
+ * Samples for Computes Restart.
+ */
+public final class ComputesRestartSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/RestartContainerInstanceCompute.json
+ */
+ /**
+ * Sample code: RestartContainerInstanceCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ restartContainerInstanceCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes()
+ .restart("rgcognitiveservices", "myAccount", "myContainerInstance", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Computes_Start
+
+```java
+/**
+ * Samples for Computes Start.
+ */
+public final class ComputesStartSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/StartContainerInstanceCompute.json
+ */
+ /**
+ * Sample code: StartContainerInstanceCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ startContainerInstanceCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes()
+ .start("rgcognitiveservices", "myAccount", "myContainerInstance", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Computes_Stop
+
+```java
+/**
+ * Samples for Computes Stop.
+ */
+public final class ComputesStopSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/StopContainerInstanceCompute.json
+ */
+ /**
+ * Sample code: StopContainerInstanceCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ stopContainerInstanceCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.computes()
+ .stop("rgcognitiveservices", "myAccount", "myContainerInstance", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Computes_Update
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.ClusterComputeProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Compute;
+import com.azure.resourcemanager.cognitiveservices.models.Pool;
+import com.azure.resourcemanager.cognitiveservices.models.VmPriority;
+import java.util.Arrays;
+
+/**
+ * Samples for Computes Update.
+ */
+public final class ComputesUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/UpdateCompute.json
+ */
+ /**
+ * Sample code: UpdateCompute.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void updateCompute(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ Compute resource = manager.computes()
+ .getWithResponse("rgcognitiveservices", "myAccount", "myCompute", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withProperties(new ClusterComputeProperties().withPools(Arrays.asList(new Pool().withName("default")
+ .withVmPriority(VmPriority.REGULAR)
+ .withInstanceType("Standard_DS3_v2")
+ .withNodeCount(4))))
+ .apply();
+ }
+}
+```
+
### DefenderForAISettings_CreateOrUpdate
```java
@@ -1621,7 +1967,7 @@ import com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettingSt
*/
public final class DefenderForAISettingsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutDefenderForAISetting.json
+ * x-ms-original-file: 2026-03-15-preview/PutDefenderForAISetting.json
*/
/**
* Sample code: PutDefenderForAISetting.
@@ -1647,7 +1993,7 @@ public final class DefenderForAISettingsCreateOrUpdateSamples {
*/
public final class DefenderForAISettingsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetDefenderForAISetting.json
+ * x-ms-original-file: 2026-03-15-preview/GetDefenderForAISetting.json
*/
/**
* Sample code: GetDefenderForAISetting.
@@ -1670,7 +2016,7 @@ public final class DefenderForAISettingsGetSamples {
*/
public final class DefenderForAISettingsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListDefenderForAISetting.json
+ * x-ms-original-file: 2026-03-15-preview/ListDefenderForAISetting.json
*/
/**
* Sample code: ListDefenderForAISetting.
@@ -1695,7 +2041,7 @@ import com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettingSt
*/
public final class DefenderForAISettingsUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/UpdateDefenderForAISetting.json
+ * x-ms-original-file: 2026-03-15-preview/UpdateDefenderForAISetting.json
*/
/**
* Sample code: UpdateDefenderForAISetting.
@@ -1720,7 +2066,7 @@ public final class DefenderForAISettingsUpdateSamples {
*/
public final class DeletedAccountsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetDeletedAccount.json
+ * x-ms-original-file: 2026-03-15-preview/GetDeletedAccount.json
*/
/**
* Sample code: Get Account.
@@ -1742,7 +2088,7 @@ public final class DeletedAccountsGetSamples {
*/
public final class DeletedAccountsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListDeletedAccountsBySubscription.json
+ * x-ms-original-file: 2026-03-15-preview/ListDeletedAccountsBySubscription.json
*/
/**
* Sample code: List Deleted Accounts by Subscription.
@@ -1764,7 +2110,7 @@ public final class DeletedAccountsListSamples {
*/
public final class DeletedAccountsPurgeSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PurgeDeletedAccount.json
+ * x-ms-original-file: 2026-03-15-preview/PurgeDeletedAccount.json
*/
/**
* Sample code: Delete Account.
@@ -1791,7 +2137,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku;
*/
public final class DeploymentsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutDeployment.json
+ * x-ms-original-file: 2026-03-15-preview/PutDeployment.json
*/
/**
* Sample code: PutDeployment.
@@ -1820,7 +2166,7 @@ public final class DeploymentsCreateOrUpdateSamples {
*/
public final class DeploymentsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteDeployment.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteDeployment.json
*/
/**
* Sample code: DeleteDeployment.
@@ -1842,7 +2188,7 @@ public final class DeploymentsDeleteSamples {
*/
public final class DeploymentsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetDeployment.json
+ * x-ms-original-file: 2026-03-15-preview/GetDeployment.json
*/
/**
* Sample code: GetDeployment.
@@ -1864,7 +2210,7 @@ public final class DeploymentsGetSamples {
*/
public final class DeploymentsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListDeployments.json
+ * x-ms-original-file: 2026-03-15-preview/ListDeployments.json
*/
/**
* Sample code: ListDeployments.
@@ -1885,7 +2231,7 @@ public final class DeploymentsListSamples {
*/
public final class DeploymentsListSkusSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListDeploymentSkus.json
+ * x-ms-original-file: 2026-03-15-preview/ListDeploymentSkus.json
*/
/**
* Sample code: ListDeploymentSkus.
@@ -1908,7 +2254,7 @@ public final class DeploymentsListSkusSamples {
*/
public final class DeploymentsPauseSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PauseDeployment.json
+ * x-ms-original-file: 2026-03-15-preview/PauseDeployment.json
*/
/**
* Sample code: PauseDeployment.
@@ -1930,7 +2276,7 @@ public final class DeploymentsPauseSamples {
*/
public final class DeploymentsResumeSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ResumeDeployment.json
+ * x-ms-original-file: 2026-03-15-preview/ResumeDeployment.json
*/
/**
* Sample code: ResumeDeployment.
@@ -1955,7 +2301,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku;
*/
public final class DeploymentsUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/UpdateDeployment.json
+ * x-ms-original-file: 2026-03-15-preview/UpdateDeployment.json
*/
/**
* Sample code: UpdateDeployment.
@@ -1984,7 +2330,7 @@ import com.azure.resourcemanager.cognitiveservices.models.KeyVaultProperties;
*/
public final class EncryptionScopesCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutEncryptionScope.json
+ * x-ms-original-file: 2026-03-15-preview/PutEncryptionScope.json
*/
/**
* Sample code: PutEncryptionScope.
@@ -2016,7 +2362,7 @@ public final class EncryptionScopesCreateOrUpdateSamples {
*/
public final class EncryptionScopesDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteEncryptionScope.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteEncryptionScope.json
*/
/**
* Sample code: DeleteEncryptionScope.
@@ -2039,7 +2385,7 @@ public final class EncryptionScopesDeleteSamples {
*/
public final class EncryptionScopesGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetEncryptionScope.json
+ * x-ms-original-file: 2026-03-15-preview/GetEncryptionScope.json
*/
/**
* Sample code: GetEncryptionScope.
@@ -2063,7 +2409,7 @@ public final class EncryptionScopesGetSamples {
*/
public final class EncryptionScopesListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListEncryptionScopes.json
+ * x-ms-original-file: 2026-03-15-preview/ListEncryptionScopes.json
*/
/**
* Sample code: ListEncryptionScopes.
@@ -2085,7 +2431,7 @@ public final class EncryptionScopesListSamples {
*/
public final class LocationBasedModelCapacitiesListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListLocationBasedModelCapacitiesGlobalScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListLocationBasedModelCapacitiesGlobalScope.json
*/
/**
* Sample code: ListLocationBasedModelCapacities Global Scope.
@@ -2098,7 +2444,7 @@ public final class LocationBasedModelCapacitiesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListLocationBasedModelCapacitiesClassicScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListLocationBasedModelCapacitiesClassicScope.json
*/
/**
* Sample code: ListLocationBasedModelCapacities Classic Scope.
@@ -2111,7 +2457,7 @@ public final class LocationBasedModelCapacitiesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListLocationBasedModelCapacitiesDataZoneScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListLocationBasedModelCapacitiesDataZoneScope.json
*/
/**
* Sample code: ListLocationBasedModelCapacities DataZone Scope.
@@ -2124,7 +2470,7 @@ public final class LocationBasedModelCapacitiesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListLocationBasedModelCapacities.json
+ * x-ms-original-file: 2026-03-15-preview/ListLocationBasedModelCapacities.json
*/
/**
* Sample code: ListLocationBasedModelCapacities.
@@ -2138,6 +2484,248 @@ public final class LocationBasedModelCapacitiesListSamples {
}
```
+### ManagedComputeCapacities_List
+
+```java
+/**
+ * Samples for ManagedComputeCapacities List.
+ */
+public final class ManagedComputeCapacitiesListSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/ListManagedComputeCapacities.json
+ */
+ /**
+ * Sample code: List Managed Compute Capacities.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ listManagedComputeCapacities(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeCapacities().list("MaaP", null, null, com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ManagedComputeDeployments_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.DeploymentModelVersionUpgradeOption;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+
+/**
+ * Samples for ManagedComputeDeployments CreateOrUpdate.
+ */
+public final class ManagedComputeDeploymentsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/CreateOrUpdateManagedComputeDeployment.json
+ */
+ /**
+ * Sample code: CreateOrUpdateManagedComputeDeployment.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void createOrUpdateManagedComputeDeployment(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeDeployments()
+ .define("gpt-oss-120b-gpu")
+ .withExistingAccount("resourceGroupName", "accountName")
+ .withProperties(new ManagedComputeDeploymentProperties()
+ .withModel("azureml://registries/azureml-openai-oss/models/gpt-oss-120b/versions/4")
+ .withDeploymentTemplate(
+ "azureml://registries/azureml-openai-oss/deploymenttemplates/gpt-oss-120b-short-context/versions/1")
+ .withAcceleratorType("H100_80GB")
+ .withVersionUpgradeOption(DeploymentModelVersionUpgradeOption.ONCE_NEW_DEFAULT_VERSION_AVAILABLE))
+ .withSku(new Sku().withName("GlobalManagedCompute").withCapacity(1))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: 2026-03-15-preview/CreateOrUpdateVmManagedComputeDeployment.json
+ */
+ /**
+ * Sample code: CreateOrUpdateVmManagedComputeDeployment.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void createOrUpdateVmManagedComputeDeployment(
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeDeployments()
+ .define("gpt-oss-120b-byoc")
+ .withExistingAccount("resourceGroupName", "accountName")
+ .withProperties(new ManagedComputeDeploymentProperties()
+ .withModel("azureml://registries/azureml-openai-oss/models/gpt-oss-120b/versions/4")
+ .withDeploymentTemplate("projects/my-project/deploymentTemplates/gpt-oss-120b-vllm-tuned/versions/2")
+ .withComputeId(
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.CognitiveServices/accounts/accountName/computes/my-h100-pool")
+ .withPriority("High"))
+ .withSku(new Sku().withName("VmManagedCompute").withCapacity(2))
+ .create();
+ }
+}
+```
+
+### ManagedComputeDeployments_Delete
+
+```java
+/**
+ * Samples for ManagedComputeDeployments Delete.
+ */
+public final class ManagedComputeDeploymentsDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/DeleteManagedComputeDeployment.json
+ */
+ /**
+ * Sample code: DeleteManagedComputeDeployment.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ deleteManagedComputeDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeDeployments()
+ .delete("resourceGroupName", "accountName", "gpt-oss-120b-gpu", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ManagedComputeDeployments_Get
+
+```java
+/**
+ * Samples for ManagedComputeDeployments Get.
+ */
+public final class ManagedComputeDeploymentsGetSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/GetVmManagedComputeDeployment.json
+ */
+ /**
+ * Sample code: GetVmManagedComputeDeployment.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ getVmManagedComputeDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeDeployments()
+ .getWithResponse("resourceGroupName", "accountName", "gpt-oss-120b-byoc", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-03-15-preview/GetManagedComputeDeployment.json
+ */
+ /**
+ * Sample code: GetManagedComputeDeployment.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ getManagedComputeDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeDeployments()
+ .getWithResponse("resourceGroupName", "accountName", "gpt-oss-120b-gpu", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ManagedComputeDeployments_List
+
+```java
+/**
+ * Samples for ManagedComputeDeployments List.
+ */
+public final class ManagedComputeDeploymentsListSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/ListVmManagedComputeDeployments.json
+ */
+ /**
+ * Sample code: ListVmManagedComputeDeployments.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ listVmManagedComputeDeployments(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeDeployments().list("resourceGroupName", "accountName", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2026-03-15-preview/ListManagedComputeDeployments.json
+ */
+ /**
+ * Sample code: ListManagedComputeDeployments.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ listManagedComputeDeployments(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeDeployments().list("resourceGroupName", "accountName", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ManagedComputeDeployments_Update
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeployment;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+
+/**
+ * Samples for ManagedComputeDeployments Update.
+ */
+public final class ManagedComputeDeploymentsUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/UpdateVmManagedComputeDeployment.json
+ */
+ /**
+ * Sample code: UpdateVmManagedComputeDeployment.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ updateVmManagedComputeDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ ManagedComputeDeployment resource = manager.managedComputeDeployments()
+ .getWithResponse("resourceGroupName", "accountName", "gpt-oss-120b-byoc", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().withSku(new Sku().withName("VmManagedCompute").withCapacity(2)).apply();
+ }
+
+ /*
+ * x-ms-original-file: 2026-03-15-preview/UpdateManagedComputeDeployment.json
+ */
+ /**
+ * Sample code: UpdateManagedComputeDeployment.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ updateManagedComputeDeployment(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ ManagedComputeDeployment resource = manager.managedComputeDeployments()
+ .getWithResponse("resourceGroupName", "accountName", "gpt-oss-120b-gpu", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update().withSku(new Sku().withName("GlobalManagedCompute").withCapacity(2)).apply();
+ }
+}
+```
+
+### ManagedComputeUsagesOperationGroup_List
+
+```java
+/**
+ * Samples for ManagedComputeUsagesOperationGroup List.
+ */
+public final class ManagedComputeUsagesOperationGroupListSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/ListManagedComputeUsages.json
+ */
+ /**
+ * Sample code: List Managed Compute Usages.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void
+ listManagedComputeUsages(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.managedComputeUsagesOperationGroups().list("eastus", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
### ManagedNetworkProvisions_ProvisionManagedNetwork
```java
@@ -2148,7 +2736,7 @@ import com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkProvisio
*/
public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/provisionManagedNetwork.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/provisionManagedNetwork.json
*/
/**
* Sample code: Provision ManagedNetwork.
@@ -2172,7 +2760,7 @@ public final class ManagedNetworkProvisionsProvisionManagedNetworkSamples {
*/
public final class ManagedNetworkSettingsOperationDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/deleteManagedNetworkV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/deleteManagedNetworkV2.json
*/
/**
* Sample code: Delete ManagedNetworkSettings.
@@ -2195,7 +2783,7 @@ public final class ManagedNetworkSettingsOperationDeleteSamples {
*/
public final class ManagedNetworkSettingsOperationGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/getManagedNetworkV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/getManagedNetworkV2.json
*/
/**
* Sample code: Get ManagedNetworkSettings.
@@ -2218,7 +2806,7 @@ public final class ManagedNetworkSettingsOperationGetSamples {
*/
public final class ManagedNetworkSettingsOperationListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/listManagedNetworkV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/listManagedNetworkV2.json
*/
/**
* Sample code: List ManagedNetworkSettings.
@@ -2251,7 +2839,7 @@ import java.util.Map;
*/
public final class ManagedNetworkSettingsOperationPatchSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/patchManagedNetworkV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/patchManagedNetworkV2.json
*/
/**
* Sample code: Patch ManagedNetworkSettings.
@@ -2304,7 +2892,7 @@ import java.util.Map;
*/
public final class ManagedNetworkSettingsOperationPutSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/createOrUpdateManagedNetworkV2.json
*/
/**
* Sample code: Put ManagedNetworkSettings.
@@ -2347,7 +2935,7 @@ public final class ManagedNetworkSettingsOperationPutSamples {
*/
public final class ModelCapacitiesListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListModelCapacities.json
+ * x-ms-original-file: 2026-03-15-preview/ListModelCapacities.json
*/
/**
* Sample code: ListModelCapacities.
@@ -2360,7 +2948,7 @@ public final class ModelCapacitiesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListModelCapacitiesDataZoneScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListModelCapacitiesDataZoneScope.json
*/
/**
* Sample code: ListModelCapacities DataZone Scope.
@@ -2373,7 +2961,7 @@ public final class ModelCapacitiesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListModelCapacitiesGlobalScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListModelCapacitiesGlobalScope.json
*/
/**
* Sample code: ListModelCapacities Global Scope.
@@ -2386,7 +2974,7 @@ public final class ModelCapacitiesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListModelCapacitiesClassicScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListModelCapacitiesClassicScope.json
*/
/**
* Sample code: ListModelCapacities Classic Scope.
@@ -2408,7 +2996,7 @@ public final class ModelCapacitiesListSamples {
*/
public final class ModelsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListLocationModels.json
+ * x-ms-original-file: 2026-03-15-preview/ListLocationModels.json
*/
/**
* Sample code: ListLocationModels.
@@ -2430,7 +3018,7 @@ public final class ModelsListSamples {
*/
public final class NetworkSecurityPerimeterConfigurationsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetNetworkSecurityPerimeterConfigurations.json
+ * x-ms-original-file: 2026-03-15-preview/GetNetworkSecurityPerimeterConfigurations.json
*/
/**
* Sample code: GetNetworkSecurityPerimeterConfigurations.
@@ -2454,7 +3042,7 @@ public final class NetworkSecurityPerimeterConfigurationsGetSamples {
*/
public final class NetworkSecurityPerimeterConfigurationsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListNetworkSecurityPerimeterConfigurations.json
+ * x-ms-original-file: 2026-03-15-preview/ListNetworkSecurityPerimeterConfigurations.json
*/
/**
* Sample code: ListNetworkSecurityPerimeterConfigurations.
@@ -2477,7 +3065,7 @@ public final class NetworkSecurityPerimeterConfigurationsListSamples {
*/
public final class NetworkSecurityPerimeterConfigurationsReconcileSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ReconcileNetworkSecurityPerimeterConfigurations.json
+ * x-ms-original-file: 2026-03-15-preview/ReconcileNetworkSecurityPerimeterConfigurations.json
*/
/**
* Sample code: ReconcileNetworkSecurityPerimeterConfigurations.
@@ -2500,7 +3088,7 @@ public final class NetworkSecurityPerimeterConfigurationsReconcileSamples {
*/
public final class OperationsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetOperations.json
+ * x-ms-original-file: 2026-03-15-preview/GetOperations.json
*/
/**
* Sample code: Get Operations.
@@ -2525,7 +3113,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RuleStatus;
*/
public final class OutboundRuleCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/createOrUpdateRuleV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/createOrUpdateRuleV2.json
*/
/**
* Sample code: CreateOrUpdate OutboundRule.
@@ -2553,7 +3141,7 @@ public final class OutboundRuleCreateOrUpdateSamples {
*/
public final class OutboundRuleDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/deleteRuleV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/deleteRuleV2.json
*/
/**
* Sample code: Delete OutboundRule.
@@ -2576,7 +3164,7 @@ public final class OutboundRuleDeleteSamples {
*/
public final class OutboundRuleGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/getRuleV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/getRuleV2.json
*/
/**
* Sample code: Get OutboundRule.
@@ -2599,7 +3187,7 @@ public final class OutboundRuleGetSamples {
*/
public final class OutboundRuleListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/listRuleV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/listRuleV2.json
*/
/**
* Sample code: List OutboundRules.
@@ -2629,7 +3217,7 @@ import java.util.Map;
*/
public final class OutboundRulesOperationPostSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ManagedNetwork/postOutboundRulesV2.json
+ * x-ms-original-file: 2026-03-15-preview/ManagedNetwork/postOutboundRulesV2.json
*/
/**
* Sample code: Post OutboundRules.
@@ -2674,7 +3262,7 @@ import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConn
*/
public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutPrivateEndpointConnection.json
+ * x-ms-original-file: 2026-03-15-preview/PutPrivateEndpointConnection.json
*/
/**
* Sample code: PutPrivateEndpointConnection.
@@ -2702,7 +3290,7 @@ public final class PrivateEndpointConnectionsCreateOrUpdateSamples {
*/
public final class PrivateEndpointConnectionsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeletePrivateEndpointConnection.json
+ * x-ms-original-file: 2026-03-15-preview/DeletePrivateEndpointConnection.json
*/
/**
* Sample code: DeletePrivateEndpointConnection.
@@ -2725,7 +3313,7 @@ public final class PrivateEndpointConnectionsDeleteSamples {
*/
public final class PrivateEndpointConnectionsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetPrivateEndpointConnection.json
+ * x-ms-original-file: 2026-03-15-preview/GetPrivateEndpointConnection.json
*/
/**
* Sample code: GetPrivateEndpointConnection.
@@ -2748,7 +3336,7 @@ public final class PrivateEndpointConnectionsGetSamples {
*/
public final class PrivateEndpointConnectionsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListPrivateEndpointConnections.json
+ * x-ms-original-file: 2026-03-15-preview/ListPrivateEndpointConnections.json
*/
/**
* Sample code: GetPrivateEndpointConnection.
@@ -2770,7 +3358,7 @@ public final class PrivateEndpointConnectionsListSamples {
*/
public final class PrivateLinkResourcesListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListPrivateLinkResources.json
+ * x-ms-original-file: 2026-03-15-preview/ListPrivateLinkResources.json
*/
/**
* Sample code: ListPrivateLinkResources.
@@ -2795,7 +3383,7 @@ import java.util.Arrays;
*/
public final class ProjectCapabilityHostsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectCapabilityHost/createOrUpdate.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectCapabilityHost/createOrUpdate.json
*/
/**
* Sample code: CreateOrUpdate Project CapabilityHost.
@@ -2825,7 +3413,7 @@ public final class ProjectCapabilityHostsCreateOrUpdateSamples {
*/
public final class ProjectCapabilityHostsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectCapabilityHost/delete.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectCapabilityHost/delete.json
*/
/**
* Sample code: Delete Project CapabilityHost.
@@ -2848,7 +3436,7 @@ public final class ProjectCapabilityHostsDeleteSamples {
*/
public final class ProjectCapabilityHostsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectCapabilityHost/get.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectCapabilityHost/get.json
*/
/**
* Sample code: Get Project CapabilityHost.
@@ -2872,7 +3460,7 @@ public final class ProjectCapabilityHostsGetSamples {
*/
public final class ProjectCapabilityHostsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectCapabilityHost/list.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectCapabilityHost/list.json
*/
/**
* Sample code: List Project CapabilityHosts.
@@ -2898,7 +3486,7 @@ import java.time.OffsetDateTime;
*/
public final class ProjectConnectionsCreateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectConnection/create.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectConnection/create.json
*/
/**
* Sample code: CreateProjectConnection.
@@ -2926,7 +3514,7 @@ public final class ProjectConnectionsCreateSamples {
*/
public final class ProjectConnectionsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectConnection/delete.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectConnection/delete.json
*/
/**
* Sample code: DeleteProjectConnection.
@@ -2950,7 +3538,7 @@ public final class ProjectConnectionsDeleteSamples {
*/
public final class ProjectConnectionsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectConnection/get.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectConnection/get.json
*/
/**
* Sample code: GetProjectConnection.
@@ -2974,7 +3562,7 @@ public final class ProjectConnectionsGetSamples {
*/
public final class ProjectConnectionsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectConnection/list.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectConnection/list.json
*/
/**
* Sample code: ListProjectConnection.
@@ -3006,7 +3594,7 @@ import java.util.Map;
*/
public final class ProjectConnectionsUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ProjectConnection/update.json
+ * x-ms-original-file: 2026-03-15-preview/ProjectConnection/update.json
*/
/**
* Sample code: UpdateProjectConnection.
@@ -3054,7 +3642,7 @@ import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType;
*/
public final class ProjectsCreateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CreateProjectMin.json
+ * x-ms-original-file: 2026-03-15-preview/CreateProjectMin.json
*/
/**
* Sample code: Create Project Min.
@@ -3072,7 +3660,7 @@ public final class ProjectsCreateSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/CreateProject.json
+ * x-ms-original-file: 2026-03-15-preview/CreateProject.json
*/
/**
* Sample code: Create Project.
@@ -3100,7 +3688,7 @@ public final class ProjectsCreateSamples {
*/
public final class ProjectsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteProject.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteProject.json
*/
/**
* Sample code: Delete Project.
@@ -3121,7 +3709,7 @@ public final class ProjectsDeleteSamples {
*/
public final class ProjectsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetProject.json
+ * x-ms-original-file: 2026-03-15-preview/GetProject.json
*/
/**
* Sample code: Get Project.
@@ -3143,7 +3731,7 @@ public final class ProjectsGetSamples {
*/
public final class ProjectsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListProjects.json
+ * x-ms-original-file: 2026-03-15-preview/ListProjects.json
*/
/**
* Sample code: List Project.
@@ -3167,7 +3755,7 @@ import com.azure.resourcemanager.cognitiveservices.models.ProjectProperties;
*/
public final class ProjectsUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/UpdateProjects.json
+ * x-ms-original-file: 2026-03-15-preview/UpdateProjects.json
*/
/**
* Sample code: Update Project.
@@ -3194,7 +3782,7 @@ import com.azure.resourcemanager.cognitiveservices.models.TierUpgradePolicy;
*/
public final class QuotaTiersCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CreateOrUpdateQuotaTier.json
+ * x-ms-original-file: 2026-03-15-preview/CreateOrUpdateQuotaTier.json
*/
/**
* Sample code: Update the quota tier resource for a subscription.
@@ -3219,7 +3807,7 @@ public final class QuotaTiersCreateOrUpdateSamples {
*/
public final class QuotaTiersGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetQuotaTier.json
+ * x-ms-original-file: 2026-03-15-preview/GetQuotaTier.json
*/
/**
* Sample code: Get the Quota Tier information for a subscription.
@@ -3241,7 +3829,7 @@ public final class QuotaTiersGetSamples {
*/
public final class QuotaTiersListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListQuotaTiers.json
+ * x-ms-original-file: 2026-03-15-preview/ListQuotaTiers.json
*/
/**
* Sample code: List the Quota Tier for a subscription.
@@ -3267,7 +3855,7 @@ import com.azure.resourcemanager.cognitiveservices.models.TierUpgradePolicy;
*/
public final class QuotaTiersUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/UpdateQuotaTier.json
+ * x-ms-original-file: 2026-03-15-preview/UpdateQuotaTier.json
*/
/**
* Sample code: Update the quota tier resource for a subscription.
@@ -3297,7 +3885,7 @@ import java.util.Arrays;
*/
public final class RaiBlocklistItemsBatchAddSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/AddRaiBlocklistItems.json
+ * x-ms-original-file: 2026-03-15-preview/AddRaiBlocklistItems.json
*/
/**
* Sample code: AddRaiBlocklistItems.
@@ -3329,7 +3917,7 @@ import java.util.Arrays;
*/
public final class RaiBlocklistItemsBatchDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteRaiBlocklistItems.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteRaiBlocklistItems.json
*/
/**
* Sample code: DeleteRaiBlocklistItems.
@@ -3355,7 +3943,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistItemProper
*/
public final class RaiBlocklistItemsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutRaiBlocklistItem.json
+ * x-ms-original-file: 2026-03-15-preview/PutRaiBlocklistItem.json
*/
/**
* Sample code: PutRaiBlocklistItem.
@@ -3381,7 +3969,7 @@ public final class RaiBlocklistItemsCreateOrUpdateSamples {
*/
public final class RaiBlocklistItemsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteRaiBlocklistItem.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteRaiBlocklistItem.json
*/
/**
* Sample code: DeleteRaiBlocklistItem.
@@ -3405,7 +3993,7 @@ public final class RaiBlocklistItemsDeleteSamples {
*/
public final class RaiBlocklistItemsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetRaiBlocklistItem.json
+ * x-ms-original-file: 2026-03-15-preview/GetRaiBlocklistItem.json
*/
/**
* Sample code: GetRaiBlocklistItem.
@@ -3429,7 +4017,7 @@ public final class RaiBlocklistItemsGetSamples {
*/
public final class RaiBlocklistItemsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListBlocklistItems.json
+ * x-ms-original-file: 2026-03-15-preview/ListBlocklistItems.json
*/
/**
* Sample code: ListBlocklistItems.
@@ -3454,7 +4042,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiBlocklistProperties
*/
public final class RaiBlocklistsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutRaiBlocklist.json
+ * x-ms-original-file: 2026-03-15-preview/PutRaiBlocklist.json
*/
/**
* Sample code: PutRaiBlocklist.
@@ -3479,7 +4067,7 @@ public final class RaiBlocklistsCreateOrUpdateSamples {
*/
public final class RaiBlocklistsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteRaiBlocklist.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteRaiBlocklist.json
*/
/**
* Sample code: DeleteRaiBlocklist.
@@ -3502,7 +4090,7 @@ public final class RaiBlocklistsDeleteSamples {
*/
public final class RaiBlocklistsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetRaiBlocklist.json
+ * x-ms-original-file: 2026-03-15-preview/GetRaiBlocklist.json
*/
/**
* Sample code: GetRaiBlocklist.
@@ -3524,7 +4112,7 @@ public final class RaiBlocklistsGetSamples {
*/
public final class RaiBlocklistsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListBlocklists.json
+ * x-ms-original-file: 2026-03-15-preview/ListBlocklists.json
*/
/**
* Sample code: ListBlocklists.
@@ -3545,7 +4133,7 @@ public final class RaiBlocklistsListSamples {
*/
public final class RaiContentFiltersGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetRaiContentFilter.json
+ * x-ms-original-file: 2026-03-15-preview/GetRaiContentFilter.json
*/
/**
* Sample code: GetRaiContentFilters.
@@ -3567,7 +4155,7 @@ public final class RaiContentFiltersGetSamples {
*/
public final class RaiContentFiltersListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListRaiContentFilters.json
+ * x-ms-original-file: 2026-03-15-preview/ListRaiContentFilters.json
*/
/**
* Sample code: ListRaiContentFilters.
@@ -3592,7 +4180,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProvi
*/
public final class RaiExternalSafetyProviderCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutRaiExternalSafetyProvider.json
+ * x-ms-original-file: 2026-03-15-preview/PutRaiExternalSafetyProvider.json
*/
/**
* Sample code: PutRaiExternalSafetyProvider.
@@ -3623,7 +4211,7 @@ public final class RaiExternalSafetyProviderCreateOrUpdateSamples {
*/
public final class RaiExternalSafetyProviderDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteRaiExternalSafetyProvider.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteRaiExternalSafetyProvider.json
*/
/**
* Sample code: DeleteRaiTopic.
@@ -3644,7 +4232,7 @@ public final class RaiExternalSafetyProviderDeleteSamples {
*/
public final class RaiExternalSafetyProviderGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetRaiExternalSafetyProvider.json
+ * x-ms-original-file: 2026-03-15-preview/GetRaiExternalSafetyProvider.json
*/
/**
* Sample code: GetRaiExternalSafetyProvider.
@@ -3666,7 +4254,7 @@ public final class RaiExternalSafetyProviderGetSamples {
*/
public final class RaiExternalSafetyProvidersOperationListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListRaiExternalSafetyProviders.json
+ * x-ms-original-file: 2026-03-15-preview/ListRaiExternalSafetyProviders.json
*/
/**
* Sample code: ListRaiExternalSafetyProviders.
@@ -3695,7 +4283,7 @@ import java.util.Arrays;
*/
public final class RaiPoliciesCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutRaiPolicy.json
+ * x-ms-original-file: 2026-03-15-preview/PutRaiPolicy.json
*/
/**
* Sample code: PutRaiPolicy.
@@ -3778,7 +4366,7 @@ public final class RaiPoliciesCreateOrUpdateSamples {
*/
public final class RaiPoliciesDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteRaiPolicy.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteRaiPolicy.json
*/
/**
* Sample code: DeleteRaiPolicy.
@@ -3800,7 +4388,7 @@ public final class RaiPoliciesDeleteSamples {
*/
public final class RaiPoliciesGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetRaiPolicy.json
+ * x-ms-original-file: 2026-03-15-preview/GetRaiPolicy.json
*/
/**
* Sample code: GetRaiPolicy.
@@ -3822,7 +4410,7 @@ public final class RaiPoliciesGetSamples {
*/
public final class RaiPoliciesListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListRaiPolicies.json
+ * x-ms-original-file: 2026-03-15-preview/ListRaiPolicies.json
*/
/**
* Sample code: ListRaiPolicies.
@@ -3850,7 +4438,7 @@ import java.util.Map;
*/
public final class RaiToolLabelsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutRaiToolLabel.json
+ * x-ms-original-file: 2026-03-15-preview/PutRaiToolLabel.json
*/
/**
* Sample code: PutRaiToolLabel.
@@ -3894,7 +4482,7 @@ public final class RaiToolLabelsCreateOrUpdateSamples {
*/
public final class RaiToolLabelsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteRaiToolLabel.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteRaiToolLabel.json
*/
/**
* Sample code: DeleteRaiToolLabel.
@@ -3917,7 +4505,7 @@ public final class RaiToolLabelsDeleteSamples {
*/
public final class RaiToolLabelsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetRaiToolLabel.json
+ * x-ms-original-file: 2026-03-15-preview/GetRaiToolLabel.json
*/
/**
* Sample code: GetRaiToolLabel.
@@ -3939,7 +4527,7 @@ public final class RaiToolLabelsGetSamples {
*/
public final class RaiToolLabelsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListRaiToolLabels.json
+ * x-ms-original-file: 2026-03-15-preview/ListRaiToolLabels.json
*/
/**
* Sample code: ListRaiToolLabels.
@@ -3962,7 +4550,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiTopicProperties;
*/
public final class RaiTopicsCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutRaiTopic.json
+ * x-ms-original-file: 2026-03-15-preview/PutRaiTopic.json
*/
/**
* Sample code: PutRaiTopic.
@@ -3989,7 +4577,7 @@ public final class RaiTopicsCreateOrUpdateSamples {
*/
public final class RaiTopicsDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteRaiTopic.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteRaiTopic.json
*/
/**
* Sample code: DeleteRaiTopic.
@@ -4011,7 +4599,7 @@ public final class RaiTopicsDeleteSamples {
*/
public final class RaiTopicsGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetRaiTopic.json
+ * x-ms-original-file: 2026-03-15-preview/GetRaiTopic.json
*/
/**
* Sample code: GetRaiTopic.
@@ -4033,7 +4621,7 @@ public final class RaiTopicsGetSamples {
*/
public final class RaiTopicsListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListRaiTopics.json
+ * x-ms-original-file: 2026-03-15-preview/ListRaiTopics.json
*/
/**
* Sample code: ListRaiTopics.
@@ -4060,7 +4648,7 @@ import java.util.Arrays;
*/
public final class ResourceProviderCalculateModelCapacitySamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CalculateModelCapacity.json
+ * x-ms-original-file: 2026-03-15-preview/CalculateModelCapacity.json
*/
/**
* Sample code: Calculate Model Capacity.
@@ -4095,7 +4683,7 @@ import com.azure.resourcemanager.cognitiveservices.models.CheckDomainAvailabilit
*/
public final class ResourceProviderCheckDomainAvailabilitySamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CheckDomainAvailability.json
+ * x-ms-original-file: 2026-03-15-preview/CheckDomainAvailability.json
*/
/**
* Sample code: Check SKU Availability.
@@ -4124,7 +4712,7 @@ import java.util.Arrays;
*/
public final class ResourceProviderCheckSkuAvailabilitySamples {
/*
- * x-ms-original-file: 2026-01-15-preview/CheckSkuAvailability.json
+ * x-ms-original-file: 2026-03-15-preview/CheckSkuAvailability.json
*/
/**
* Sample code: Check SKU Availability.
@@ -4151,7 +4739,7 @@ public final class ResourceProviderCheckSkuAvailabilitySamples {
*/
public final class ResourceSkusListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetSkus.json
+ * x-ms-original-file: 2026-03-15-preview/GetSkus.json
*/
/**
* Sample code: Regenerate Keys.
@@ -4180,7 +4768,7 @@ import java.util.Arrays;
*/
public final class SubscriptionRaiPolicyCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/PutSubscriptionRaiPolicy.json
+ * x-ms-original-file: 2026-03-15-preview/PutSubscriptionRaiPolicy.json
*/
/**
* Sample code: PutRaiPolicy.
@@ -4263,7 +4851,7 @@ public final class SubscriptionRaiPolicyCreateOrUpdateSamples {
*/
public final class SubscriptionRaiPolicyDeleteSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/DeleteSubscriptionRaiPolicy.json
+ * x-ms-original-file: 2026-03-15-preview/DeleteSubscriptionRaiPolicy.json
*/
/**
* Sample code: DeleteRaiPolicy.
@@ -4284,7 +4872,7 @@ public final class SubscriptionRaiPolicyDeleteSamples {
*/
public final class SubscriptionRaiPolicyGetSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/GetSubscriptionRaiPolicy.json
+ * x-ms-original-file: 2026-03-15-preview/GetSubscriptionRaiPolicy.json
*/
/**
* Sample code: GetRaiPolicy.
@@ -4307,7 +4895,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RaiExternalSafetyProvi
*/
public final class TestRaiExternalSafetyProviderCreateOrUpdateSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/TestRaiExternalSafetyProvider.json
+ * x-ms-original-file: 2026-03-15-preview/TestRaiExternalSafetyProvider.json
*/
/**
* Sample code: TestRaiExternalSafetyProvider.
@@ -4340,7 +4928,7 @@ public final class TestRaiExternalSafetyProviderCreateOrUpdateSamples {
*/
public final class UsagesListSamples {
/*
- * x-ms-original-file: 2026-01-15-preview/ListUsages.json
+ * x-ms-original-file: 2026-03-15-preview/ListUsages.json
*/
/**
* Sample code: Get Usages.
@@ -4352,7 +4940,7 @@ public final class UsagesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListUsagesClassicScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListUsagesClassicScope.json
*/
/**
* Sample code: Get Usages Classic Scope.
@@ -4365,7 +4953,7 @@ public final class UsagesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListUsagesDataZoneScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListUsagesDataZoneScope.json
*/
/**
* Sample code: Get Usages DataZone Scope.
@@ -4378,7 +4966,7 @@ public final class UsagesListSamples {
}
/*
- * x-ms-original-file: 2026-01-15-preview/ListUsagesGlobalScope.json
+ * x-ms-original-file: 2026-03-15-preview/ListUsagesGlobalScope.json
*/
/**
* Sample code: Get Usages Global Scope.
@@ -4392,3 +4980,241 @@ public final class UsagesListSamples {
}
```
+### Workbenches_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.Identity;
+import com.azure.resourcemanager.cognitiveservices.models.ResourceIdentityType;
+import com.azure.resourcemanager.cognitiveservices.models.SshSettings;
+import com.azure.resourcemanager.cognitiveservices.models.UserAssignedIdentity;
+import com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for Workbenches CreateOrUpdate.
+ */
+public final class WorkbenchesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/PutWorkbench.json
+ */
+ /**
+ * Sample code: PutWorkbench.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void putWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.workbenches()
+ .define("myWorkbench")
+ .withExistingProject("rgcognitiveservices", "myAccount", "myProject")
+ .withProperties(new WorkbenchProperties().withTargetClusterId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster")
+ .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:latest")
+ .withIdleTimeBeforeShutdown("PT30M")
+ .withDatasetId("dataset-12345")
+ .withSshSettings(new SshSettings().withSshPublicKey("fakeTokenPlaceholder").withAdminEnabled(true)))
+ .withRegion("eastus")
+ .withIdentity(new Identity().withType(ResourceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity",
+ new UserAssignedIdentity())))
+ .create();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Workbenches_Delete
+
+```java
+/**
+ * Samples for Workbenches Delete.
+ */
+public final class WorkbenchesDeleteSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/DeleteWorkbench.json
+ */
+ /**
+ * Sample code: DeleteWorkbench.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void deleteWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.workbenches()
+ .delete("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workbenches_Get
+
+```java
+/**
+ * Samples for Workbenches Get.
+ */
+public final class WorkbenchesGetSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/GetWorkbench.json
+ */
+ /**
+ * Sample code: GetWorkbench.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void getWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.workbenches()
+ .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench",
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workbenches_List
+
+```java
+/**
+ * Samples for Workbenches List.
+ */
+public final class WorkbenchesListSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/ListWorkbenches.json
+ */
+ /**
+ * Sample code: ListWorkbenches.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void listWorkbenches(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.workbenches().list("rgcognitiveservices", "myAccount", "myProject", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workbenches_Restart
+
+```java
+/**
+ * Samples for Workbenches Restart.
+ */
+public final class WorkbenchesRestartSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/RestartWorkbench.json
+ */
+ /**
+ * Sample code: RestartWorkbench.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void restartWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.workbenches()
+ .restart("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workbenches_Start
+
+```java
+/**
+ * Samples for Workbenches Start.
+ */
+public final class WorkbenchesStartSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/StartWorkbench.json
+ */
+ /**
+ * Sample code: StartWorkbench.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void startWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.workbenches()
+ .start("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workbenches_Stop
+
+```java
+/**
+ * Samples for Workbenches Stop.
+ */
+public final class WorkbenchesStopSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/StopWorkbench.json
+ */
+ /**
+ * Sample code: StopWorkbench.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void stopWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ manager.workbenches()
+ .stop("rgcognitiveservices", "myAccount", "myProject", "myWorkbench", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### Workbenches_Update
+
+```java
+import com.azure.resourcemanager.cognitiveservices.models.SshSettings;
+import com.azure.resourcemanager.cognitiveservices.models.Workbench;
+import com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Samples for Workbenches Update.
+ */
+public final class WorkbenchesUpdateSamples {
+ /*
+ * x-ms-original-file: 2026-03-15-preview/UpdateWorkbench.json
+ */
+ /**
+ * Sample code: UpdateWorkbench.
+ *
+ * @param manager Entry point to CognitiveServicesManager.
+ */
+ public static void updateWorkbench(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) {
+ Workbench resource = manager.workbenches()
+ .getWithResponse("rgcognitiveservices", "myAccount", "myProject", "myWorkbench",
+ com.azure.core.util.Context.NONE)
+ .getValue();
+ resource.update()
+ .withTags(mapOf("environment", "production"))
+ .withProperties(new WorkbenchProperties().withTargetClusterId(
+ "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rgcognitiveservices/providers/Microsoft.CognitiveServices/accounts/myAccount/computes/myCluster")
+ .withImageLink("mcr.microsoft.com/azureml/curated/pytorch-gpu:v2")
+ .withIdleTimeBeforeShutdown("PT1H")
+ .withDatasetId("dataset-67890")
+ .withSshSettings(new SshSettings().withSshPublicKey("fakeTokenPlaceholder").withAdminEnabled(true)))
+ .apply();
+ }
+
+ // Use "Map.of" if available
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
index 860d05c11216..c89b21b1639c 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
@@ -18,7 +18,7 @@
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 api-version 2026-01-15-preview.
+ 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 api-version 2026-03-15-preview.
https://github.com/Azure/azure-sdk-for-java
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 250727eb5d11..43a40fd85e12 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
@@ -34,11 +34,15 @@
import com.azure.resourcemanager.cognitiveservices.implementation.CommitmentPlansImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.CommitmentTiersImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.ComputeOperationsImpl;
+import com.azure.resourcemanager.cognitiveservices.implementation.ComputesImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.DefenderForAISettingsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.DeletedAccountsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.DeploymentsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.EncryptionScopesImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.LocationBasedModelCapacitiesImpl;
+import com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeCapacitiesImpl;
+import com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeDeploymentsImpl;
+import com.azure.resourcemanager.cognitiveservices.implementation.ManagedComputeUsagesOperationGroupsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.ManagedNetworkProvisionsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.ManagedNetworkSettingsOperationsImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.ModelCapacitiesImpl;
@@ -66,6 +70,7 @@
import com.azure.resourcemanager.cognitiveservices.implementation.SubscriptionRaiPoliciesImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.TestRaiExternalSafetyProvidersImpl;
import com.azure.resourcemanager.cognitiveservices.implementation.UsagesImpl;
+import com.azure.resourcemanager.cognitiveservices.implementation.WorkbenchesImpl;
import com.azure.resourcemanager.cognitiveservices.models.AccountCapabilityHosts;
import com.azure.resourcemanager.cognitiveservices.models.AccountConnections;
import com.azure.resourcemanager.cognitiveservices.models.Accounts;
@@ -74,11 +79,15 @@
import com.azure.resourcemanager.cognitiveservices.models.CommitmentPlans;
import com.azure.resourcemanager.cognitiveservices.models.CommitmentTiers;
import com.azure.resourcemanager.cognitiveservices.models.ComputeOperations;
+import com.azure.resourcemanager.cognitiveservices.models.Computes;
import com.azure.resourcemanager.cognitiveservices.models.DefenderForAISettings;
import com.azure.resourcemanager.cognitiveservices.models.DeletedAccounts;
import com.azure.resourcemanager.cognitiveservices.models.Deployments;
import com.azure.resourcemanager.cognitiveservices.models.EncryptionScopes;
import com.azure.resourcemanager.cognitiveservices.models.LocationBasedModelCapacities;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacities;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeployments;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeUsagesOperationGroups;
import com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkProvisions;
import com.azure.resourcemanager.cognitiveservices.models.ManagedNetworkSettingsOperations;
import com.azure.resourcemanager.cognitiveservices.models.ModelCapacities;
@@ -106,6 +115,7 @@
import com.azure.resourcemanager.cognitiveservices.models.SubscriptionRaiPolicies;
import com.azure.resourcemanager.cognitiveservices.models.TestRaiExternalSafetyProviders;
import com.azure.resourcemanager.cognitiveservices.models.Usages;
+import com.azure.resourcemanager.cognitiveservices.models.Workbenches;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
@@ -163,8 +173,18 @@ public final class CognitiveServicesManager {
private AgentApplications agentApplications;
+ private ManagedComputeDeployments managedComputeDeployments;
+
private ComputeOperations computeOperations;
+ private ManagedComputeUsagesOperationGroups managedComputeUsagesOperationGroups;
+
+ private Computes computes;
+
+ private Workbenches workbenches;
+
+ private ManagedComputeCapacities managedComputeCapacities;
+
private PrivateLinkResources privateLinkResources;
private TestRaiExternalSafetyProviders testRaiExternalSafetyProviders;
@@ -682,6 +702,19 @@ public AgentApplications agentApplications() {
return agentApplications;
}
+ /**
+ * Gets the resource collection API of ManagedComputeDeployments. It manages ManagedComputeDeployment.
+ *
+ * @return Resource collection API of ManagedComputeDeployments.
+ */
+ public ManagedComputeDeployments managedComputeDeployments() {
+ if (this.managedComputeDeployments == null) {
+ this.managedComputeDeployments
+ = new ManagedComputeDeploymentsImpl(clientObject.getManagedComputeDeployments(), this);
+ }
+ return managedComputeDeployments;
+ }
+
/**
* Gets the resource collection API of ComputeOperations.
*
@@ -694,6 +727,56 @@ public ComputeOperations computeOperations() {
return computeOperations;
}
+ /**
+ * Gets the resource collection API of ManagedComputeUsagesOperationGroups.
+ *
+ * @return Resource collection API of ManagedComputeUsagesOperationGroups.
+ */
+ public ManagedComputeUsagesOperationGroups managedComputeUsagesOperationGroups() {
+ if (this.managedComputeUsagesOperationGroups == null) {
+ this.managedComputeUsagesOperationGroups = new ManagedComputeUsagesOperationGroupsImpl(
+ clientObject.getManagedComputeUsagesOperationGroups(), this);
+ }
+ return managedComputeUsagesOperationGroups;
+ }
+
+ /**
+ * Gets the resource collection API of Computes. It manages Compute.
+ *
+ * @return Resource collection API of Computes.
+ */
+ public Computes computes() {
+ if (this.computes == null) {
+ this.computes = new ComputesImpl(clientObject.getComputes(), this);
+ }
+ return computes;
+ }
+
+ /**
+ * Gets the resource collection API of Workbenches. It manages Workbench.
+ *
+ * @return Resource collection API of Workbenches.
+ */
+ public Workbenches workbenches() {
+ if (this.workbenches == null) {
+ this.workbenches = new WorkbenchesImpl(clientObject.getWorkbenches(), this);
+ }
+ return workbenches;
+ }
+
+ /**
+ * Gets the resource collection API of ManagedComputeCapacities.
+ *
+ * @return Resource collection API of ManagedComputeCapacities.
+ */
+ public ManagedComputeCapacities managedComputeCapacities() {
+ if (this.managedComputeCapacities == null) {
+ this.managedComputeCapacities
+ = new ManagedComputeCapacitiesImpl(clientObject.getManagedComputeCapacities(), this);
+ }
+ return managedComputeCapacities;
+ }
+
/**
* Gets the resource collection API of PrivateLinkResources.
*
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 0e89180537dc..165058be53d9 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
@@ -15,7 +15,9 @@
import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountSkuListResultInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.ApiKeysInner;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.EvaluateDeploymentPoliciesResponseInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.UsageListResultInner;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesRequest;
import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters;
/**
@@ -430,4 +432,35 @@ Response listUsagesWithResponse(String resourceGroupName,
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listModels(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Evaluate Azure Policy compliance for a set of hypothetical deployments without creating them.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param body The content of the action request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response body for the evaluateDeploymentPolicies action along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response evaluateDeploymentPoliciesWithResponse(String resourceGroupName,
+ String accountName, EvaluateDeploymentPoliciesRequest body, Context context);
+
+ /**
+ * Evaluate Azure Policy compliance for a set of hypothetical deployments without creating them.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param body The content of the action request.
+ * @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 response body for the evaluateDeploymentPolicies action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EvaluateDeploymentPoliciesResponseInner evaluateDeploymentPolicies(String resourceGroupName, String accountName,
+ EvaluateDeploymentPoliciesRequest body);
}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java
index 61ed2e9750b4..a4627997b782 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CognitiveServicesManagementClient.java
@@ -200,6 +200,13 @@ public interface CognitiveServicesManagementClient {
*/
AgentApplicationsClient getAgentApplications();
+ /**
+ * Gets the ManagedComputeDeploymentsClient object to access its operations.
+ *
+ * @return the ManagedComputeDeploymentsClient object.
+ */
+ ManagedComputeDeploymentsClient getManagedComputeDeployments();
+
/**
* Gets the ComputeOperationsClient object to access its operations.
*
@@ -207,6 +214,34 @@ public interface CognitiveServicesManagementClient {
*/
ComputeOperationsClient getComputeOperations();
+ /**
+ * Gets the ManagedComputeUsagesOperationGroupsClient object to access its operations.
+ *
+ * @return the ManagedComputeUsagesOperationGroupsClient object.
+ */
+ ManagedComputeUsagesOperationGroupsClient getManagedComputeUsagesOperationGroups();
+
+ /**
+ * Gets the ComputesClient object to access its operations.
+ *
+ * @return the ComputesClient object.
+ */
+ ComputesClient getComputes();
+
+ /**
+ * Gets the WorkbenchesClient object to access its operations.
+ *
+ * @return the WorkbenchesClient object.
+ */
+ WorkbenchesClient getWorkbenches();
+
+ /**
+ * Gets the ManagedComputeCapacitiesClient object to access its operations.
+ *
+ * @return the ManagedComputeCapacitiesClient object.
+ */
+ ManagedComputeCapacitiesClient getManagedComputeCapacities();
+
/**
* Gets the PrivateLinkResourcesClient object to access its operations.
*
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ComputesClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ComputesClient.java
new file mode 100644
index 000000000000..f10d17f244bc
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ComputesClient.java
@@ -0,0 +1,461 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ComputesClient.
+ */
+public interface ComputesClient {
+ /**
+ * Gets the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified compute associated with the Cognitive Services account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String accountName, String computeName,
+ Context context);
+
+ /**
+ * Gets the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified compute associated with the Cognitive Services account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComputeInner get(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName, String accountName,
+ String computeName, ComputeInner resource);
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName, String accountName,
+ String computeName, ComputeInner resource, Context context);
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComputeInner createOrUpdate(String resourceGroupName, String accountName, String computeName,
+ ComputeInner resource);
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComputeInner createOrUpdate(String resourceGroupName, String accountName, String computeName, ComputeInner resource,
+ Context context);
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @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 {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, String accountName,
+ String computeName, ComputeInner properties);
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, String accountName,
+ String computeName, ComputeInner properties, Context context);
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @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 cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComputeInner update(String resourceGroupName, String accountName, String computeName, ComputeInner properties);
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ComputeInner update(String resourceGroupName, String accountName, String computeName, ComputeInner properties,
+ Context context);
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String computeName,
+ Context context);
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String computeName, Context context);
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @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 computes associated with the Cognitive Services account as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String accountName);
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the computes associated with the Cognitive Services account as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String accountName, String computeName,
+ Context context);
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String accountName, String computeName, Context context);
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String accountName, String computeName,
+ Context context);
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String accountName, String computeName, Context context);
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRestart(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRestart(String resourceGroupName, String accountName, String computeName,
+ Context context);
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String accountName, String computeName);
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String accountName, String computeName, Context context);
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeCapacitiesClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeCapacitiesClient.java
new file mode 100644
index 000000000000..34d323f9432a
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeCapacitiesClient.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeCapacityInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedComputeCapacitiesClient.
+ */
+public interface ManagedComputeCapacitiesClient {
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @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 managed compute capacities for a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String offer);
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @param acceleratorType Optional accelerator type filter to narrow results to a specific accelerator type.
+ * @param deploymentId Optional deployment resource ID. When provided, returns capacity for the specific region
+ * where the deployment is hosted rather than the best available region.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the managed compute capacities for a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String offer, String acceleratorType, String deploymentId,
+ Context context);
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeDeploymentsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeDeploymentsClient.java
new file mode 100644
index 000000000000..f64588c2a057
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeDeploymentsClient.java
@@ -0,0 +1,275 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeDeploymentInner;
+import com.azure.resourcemanager.cognitiveservices.models.PatchResourceSku;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedComputeDeploymentsClient.
+ */
+public interface ManagedComputeDeploymentsClient {
+ /**
+ * Gets the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed compute deployment associated with the Cognitive Services account along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String accountName,
+ String deploymentName, Context context);
+
+ /**
+ * Gets the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed compute deployment associated with the Cognitive Services account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedComputeDeploymentInner get(String resourceGroupName, String accountName, String deploymentName);
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services account managed compute deployment, backed by
+ * managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedComputeDeploymentInner> beginCreateOrUpdate(
+ String resourceGroupName, String accountName, String deploymentName, ManagedComputeDeploymentInner resource);
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services account managed compute deployment, backed by
+ * managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedComputeDeploymentInner> beginCreateOrUpdate(
+ String resourceGroupName, String accountName, String deploymentName, ManagedComputeDeploymentInner resource,
+ Context context);
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services account managed compute deployment, backed by managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedComputeDeploymentInner createOrUpdate(String resourceGroupName, String accountName, String deploymentName,
+ ManagedComputeDeploymentInner resource);
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services account managed compute deployment, backed by managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedComputeDeploymentInner createOrUpdate(String resourceGroupName, String accountName, String deploymentName,
+ ManagedComputeDeploymentInner resource, Context context);
+
+ /**
+ * Updates the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param properties The managed compute deployment patch properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services account managed compute deployment, backed by
+ * managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedComputeDeploymentInner>
+ beginUpdate(String resourceGroupName, String accountName, String deploymentName, PatchResourceSku properties);
+
+ /**
+ * Updates the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param properties The managed compute deployment patch properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services account managed compute deployment, backed by
+ * managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ManagedComputeDeploymentInner> beginUpdate(
+ String resourceGroupName, String accountName, String deploymentName, PatchResourceSku properties,
+ Context context);
+
+ /**
+ * Updates the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param properties The managed compute deployment patch properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services account managed compute deployment, backed by managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedComputeDeploymentInner update(String resourceGroupName, String accountName, String deploymentName,
+ PatchResourceSku properties);
+
+ /**
+ * Updates the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param properties The managed compute deployment patch properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services account managed compute deployment, backed by managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ManagedComputeDeploymentInner update(String resourceGroupName, String accountName, String deploymentName,
+ PatchResourceSku properties, Context context);
+
+ /**
+ * Deletes the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String deploymentName);
+
+ /**
+ * Deletes the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String deploymentName,
+ Context context);
+
+ /**
+ * Deletes the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String deploymentName);
+
+ /**
+ * Deletes the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String deploymentName, Context context);
+
+ /**
+ * Gets the managed compute deployments associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @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 managed compute deployments associated with the Cognitive Services account as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String accountName);
+
+ /**
+ * Gets the managed compute deployments associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the managed compute deployments associated with the Cognitive Services account as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String accountName, Context context);
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeUsagesOperationGroupsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeUsagesOperationGroupsClient.java
new file mode 100644
index 000000000000..3ca36d9a9727
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ManagedComputeUsagesOperationGroupsClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeUsageInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedComputeUsagesOperationGroupsClient.
+ */
+public interface ManagedComputeUsagesOperationGroupsClient {
+ /**
+ * List managed compute quota usages for a subscription and location.
+ *
+ * @param location The location name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of managed compute quota entries as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String location);
+
+ /**
+ * List managed compute quota usages for a subscription and location.
+ *
+ * @param location The location name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of managed compute quota entries as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String location, Context context);
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java
new file mode 100644
index 000000000000..ada1d7322cf3
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/WorkbenchesClient.java
@@ -0,0 +1,503 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.WorkbenchInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in WorkbenchesClient.
+ */
+public interface WorkbenchesClient {
+ /**
+ * Gets the specified workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified workbench associated with the project along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String accountName, String projectName,
+ String workbenchName, Context context);
+
+ /**
+ * Gets the specified workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified workbench associated with the project.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbenchInner get(String resourceGroupName, String accountName, String projectName, String workbenchName);
+
+ /**
+ * Creates or updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param resource The workbench properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, WorkbenchInner> beginCreateOrUpdate(String resourceGroupName,
+ String accountName, String projectName, String workbenchName, WorkbenchInner resource);
+
+ /**
+ * Creates or updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param resource The workbench properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, WorkbenchInner> beginCreateOrUpdate(String resourceGroupName,
+ String accountName, String projectName, String workbenchName, WorkbenchInner resource, Context context);
+
+ /**
+ * Creates or updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param resource The workbench properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbenchInner createOrUpdate(String resourceGroupName, String accountName, String projectName,
+ String workbenchName, WorkbenchInner resource);
+
+ /**
+ * Creates or updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param resource The workbench properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbenchInner createOrUpdate(String resourceGroupName, String accountName, String projectName,
+ String workbenchName, WorkbenchInner resource, Context context);
+
+ /**
+ * Updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param properties The workbench properties to update.
+ * @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 {@link SyncPoller} for polling of workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, WorkbenchInner> beginUpdate(String resourceGroupName, String accountName,
+ String projectName, String workbenchName, WorkbenchInner properties);
+
+ /**
+ * Updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param properties The workbench properties to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, WorkbenchInner> beginUpdate(String resourceGroupName, String accountName,
+ String projectName, String workbenchName, WorkbenchInner properties, Context context);
+
+ /**
+ * Updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param properties The workbench properties to update.
+ * @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 workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbenchInner update(String resourceGroupName, String accountName, String projectName, String workbenchName,
+ WorkbenchInner properties);
+
+ /**
+ * Updates a workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param properties The workbench properties to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkbenchInner update(String resourceGroupName, String accountName, String projectName, String workbenchName,
+ WorkbenchInner properties, Context context);
+
+ /**
+ * Deletes the specified workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String projectName,
+ String workbenchName);
+
+ /**
+ * Deletes the specified workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String projectName,
+ String workbenchName, Context context);
+
+ /**
+ * Deletes the specified workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String projectName, String workbenchName);
+
+ /**
+ * Deletes the specified workbench associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String projectName, String workbenchName,
+ Context context);
+
+ /**
+ * Gets the workbenches associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @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 workbenches associated with the project as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String accountName, String projectName);
+
+ /**
+ * Gets the workbenches associated with the project.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the workbenches associated with the project as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceGroupName, String accountName, String projectName,
+ Context context);
+
+ /**
+ * Starts a stopped workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String accountName, String projectName,
+ String workbenchName);
+
+ /**
+ * Starts a stopped workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStart(String resourceGroupName, String accountName, String projectName,
+ String workbenchName, Context context);
+
+ /**
+ * Starts a stopped workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String accountName, String projectName, String workbenchName);
+
+ /**
+ * Starts a stopped workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void start(String resourceGroupName, String accountName, String projectName, String workbenchName, Context context);
+
+ /**
+ * Stops a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String accountName, String projectName,
+ String workbenchName);
+
+ /**
+ * Stops a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginStop(String resourceGroupName, String accountName, String projectName,
+ String workbenchName, Context context);
+
+ /**
+ * Stops a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String accountName, String projectName, String workbenchName);
+
+ /**
+ * Stops a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void stop(String resourceGroupName, String accountName, String projectName, String workbenchName, Context context);
+
+ /**
+ * Restarts a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRestart(String resourceGroupName, String accountName, String projectName,
+ String workbenchName);
+
+ /**
+ * Restarts a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginRestart(String resourceGroupName, String accountName, String projectName,
+ String workbenchName, Context context);
+
+ /**
+ * Restarts a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String accountName, String projectName, String workbenchName);
+
+ /**
+ * Restarts a running workbench resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Returns 204 if the workbench is already in the target state.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param projectName The name of Cognitive Services account's project.
+ * @param workbenchName The name of the workbench associated with the project.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void restart(String resourceGroupName, String accountName, String projectName, String workbenchName,
+ Context context);
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java
new file mode 100644
index 000000000000..6bdd7649390d
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ComputeInner.java
@@ -0,0 +1,289 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cognitiveservices.models.ComputeProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Identity;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Cognitive Services compute resource. Supports polymorphic compute types
+ * (Cluster, ContainerInstance) via the computeType discriminator in properties.
+ */
+@Fluent
+public final class ComputeInner extends ProxyResource {
+ /*
+ * Polymorphic properties of the compute resource. Use computeType to select Cluster or ContainerInstance.
+ */
+ private ComputeProperties properties;
+
+ /*
+ * Resource Etag.
+ */
+ private String etag;
+
+ /*
+ * The location of the compute resource.
+ */
+ private String location;
+
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
+ /*
+ * The kind (type) of compute resource.
+ */
+ private String kind;
+
+ /*
+ * Identity for the resource.
+ */
+ private Identity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ComputeInner class.
+ */
+ public ComputeInner() {
+ }
+
+ /**
+ * Get the properties property: Polymorphic properties of the compute resource. Use computeType to select Cluster or
+ * ContainerInstance.
+ *
+ * @return the properties value.
+ */
+ public ComputeProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Polymorphic properties of the compute resource. Use computeType to select Cluster or
+ * ContainerInstance.
+ *
+ * @param properties the properties value to set.
+ * @return the ComputeInner object itself.
+ */
+ public ComputeInner withProperties(ComputeProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the etag property: Resource Etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the location property: The location of the compute resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the compute resource.
+ *
+ * @param location the location value to set.
+ * @return the ComputeInner object itself.
+ */
+ public ComputeInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the ComputeInner object itself.
+ */
+ public ComputeInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the kind property: The kind (type) of compute resource.
+ *
+ * @return the kind value.
+ */
+ public String kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: The kind (type) of compute resource.
+ *
+ * @param kind the kind value to set.
+ * @return the ComputeInner object itself.
+ */
+ public ComputeInner withKind(String kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Identity for the resource.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Identity for the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the ComputeInner object itself.
+ */
+ public ComputeInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("kind", this.kind);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ComputeInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ComputeInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ComputeInner.
+ */
+ public static ComputeInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ComputeInner deserializedComputeInner = new ComputeInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedComputeInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedComputeInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedComputeInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedComputeInner.properties = ComputeProperties.fromJson(reader);
+ } else if ("etag".equals(fieldName)) {
+ deserializedComputeInner.etag = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedComputeInner.location = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedComputeInner.tags = tags;
+ } else if ("kind".equals(fieldName)) {
+ deserializedComputeInner.kind = reader.getString();
+ } else if ("identity".equals(fieldName)) {
+ deserializedComputeInner.identity = Identity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedComputeInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedComputeInner;
+ });
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/EvaluateDeploymentPoliciesResponseInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/EvaluateDeploymentPoliciesResponseInner.java
new file mode 100644
index 000000000000..3c4a513b409c
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/EvaluateDeploymentPoliciesResponseInner.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cognitiveservices.models.DeploymentPolicyEvaluationResult;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Response body for the evaluateDeploymentPolicies action.
+ */
+@Immutable
+public final class EvaluateDeploymentPoliciesResponseInner
+ implements JsonSerializable {
+ /*
+ * Per-deployment policy evaluation results, keyed by deployment name.
+ */
+ private Map results;
+
+ /**
+ * Creates an instance of EvaluateDeploymentPoliciesResponseInner class.
+ */
+ private EvaluateDeploymentPoliciesResponseInner() {
+ }
+
+ /**
+ * Get the results property: Per-deployment policy evaluation results, keyed by deployment name.
+ *
+ * @return the results value.
+ */
+ public Map results() {
+ return this.results;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeMapField("results", this.results, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of EvaluateDeploymentPoliciesResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of EvaluateDeploymentPoliciesResponseInner if the JsonReader was pointing to an instance of
+ * it, or null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the EvaluateDeploymentPoliciesResponseInner.
+ */
+ public static EvaluateDeploymentPoliciesResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ EvaluateDeploymentPoliciesResponseInner deserializedEvaluateDeploymentPoliciesResponseInner
+ = new EvaluateDeploymentPoliciesResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("results".equals(fieldName)) {
+ Map results
+ = reader.readMap(reader1 -> DeploymentPolicyEvaluationResult.fromJson(reader1));
+ deserializedEvaluateDeploymentPoliciesResponseInner.results = results;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedEvaluateDeploymentPoliciesResponseInner;
+ });
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeCapacityInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeCapacityInner.java
new file mode 100644
index 000000000000..8b3b052e9080
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeCapacityInner.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacityProperties;
+import java.io.IOException;
+
+/**
+ * Managed compute capacity information for Cognitive Services managed compute deployments.
+ * Provides available accelerator capacity per type and region at the subscription level.
+ */
+@Immutable
+public final class ManagedComputeCapacityInner extends ProxyResource {
+ /*
+ * Properties of the managed compute capacity resource.
+ */
+ private ManagedComputeCapacityProperties properties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ManagedComputeCapacityInner class.
+ */
+ private ManagedComputeCapacityInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of the managed compute capacity resource.
+ *
+ * @return the properties value.
+ */
+ public ManagedComputeCapacityProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedComputeCapacityInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedComputeCapacityInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ManagedComputeCapacityInner.
+ */
+ public static ManagedComputeCapacityInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedComputeCapacityInner deserializedManagedComputeCapacityInner = new ManagedComputeCapacityInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedManagedComputeCapacityInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedManagedComputeCapacityInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedManagedComputeCapacityInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedManagedComputeCapacityInner.properties
+ = ManagedComputeCapacityProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedManagedComputeCapacityInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedComputeCapacityInner;
+ });
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeDeploymentInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeDeploymentInner.java
new file mode 100644
index 000000000000..7d4d1d866f78
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeDeploymentInner.java
@@ -0,0 +1,202 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+import java.io.IOException;
+
+/**
+ * Cognitive Services account managed compute deployment, backed by managed compute (GPU) resources.
+ */
+@Fluent
+public final class ManagedComputeDeploymentInner extends ProxyResource {
+ /*
+ * Properties of the Cognitive Services managed compute deployment.
+ */
+ private ManagedComputeDeploymentProperties properties;
+
+ /*
+ * The resource model definition representing SKU
+ */
+ private Sku sku;
+
+ /*
+ * Resource Etag.
+ */
+ private String etag;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of ManagedComputeDeploymentInner class.
+ */
+ public ManagedComputeDeploymentInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of the Cognitive Services managed compute deployment.
+ *
+ * @return the properties value.
+ */
+ public ManagedComputeDeploymentProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the Cognitive Services managed compute deployment.
+ *
+ * @param properties the properties value to set.
+ * @return the ManagedComputeDeploymentInner object itself.
+ */
+ public ManagedComputeDeploymentInner withProperties(ManagedComputeDeploymentProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The resource model definition representing SKU.
+ *
+ * @return the sku value.
+ */
+ public Sku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The resource model definition representing SKU.
+ *
+ * @param sku the sku value to set.
+ * @return the ManagedComputeDeploymentInner object itself.
+ */
+ public ManagedComputeDeploymentInner withSku(Sku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the etag property: Resource Etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeJsonField("sku", this.sku);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedComputeDeploymentInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedComputeDeploymentInner if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ManagedComputeDeploymentInner.
+ */
+ public static ManagedComputeDeploymentInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedComputeDeploymentInner deserializedManagedComputeDeploymentInner
+ = new ManagedComputeDeploymentInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedManagedComputeDeploymentInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedManagedComputeDeploymentInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedManagedComputeDeploymentInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedManagedComputeDeploymentInner.properties
+ = ManagedComputeDeploymentProperties.fromJson(reader);
+ } else if ("sku".equals(fieldName)) {
+ deserializedManagedComputeDeploymentInner.sku = Sku.fromJson(reader);
+ } else if ("etag".equals(fieldName)) {
+ deserializedManagedComputeDeploymentInner.etag = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedManagedComputeDeploymentInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedComputeDeploymentInner;
+ });
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeUsageInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeUsageInner.java
new file mode 100644
index 000000000000..feadb95cca84
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ManagedComputeUsageInner.java
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentInfo;
+import com.azure.resourcemanager.cognitiveservices.models.MetricName;
+import com.azure.resourcemanager.cognitiveservices.models.UnitType;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Managed compute quota usage for a specific SKU.
+ */
+@Immutable
+public final class ManagedComputeUsageInner implements JsonSerializable {
+ /*
+ * Fully qualified resource ID for the managed compute usage.
+ */
+ private String id;
+
+ /*
+ * The name information for the metric.
+ */
+ private MetricName name;
+
+ /*
+ * The resource type.
+ */
+ private String type;
+
+ /*
+ * The unit of the metric.
+ */
+ private UnitType unit;
+
+ /*
+ * Maximum value for this metric.
+ */
+ private Double limit;
+
+ /*
+ * Current value for this metric.
+ */
+ private Double currentValue;
+
+ /*
+ * Offer scope (e.g., 'Global', 'Datazone-US').
+ */
+ private String offerScope;
+
+ /*
+ * Deployments consuming this managed compute quota.
+ */
+ private List deployments;
+
+ /**
+ * Creates an instance of ManagedComputeUsageInner class.
+ */
+ private ManagedComputeUsageInner() {
+ }
+
+ /**
+ * Get the id property: Fully qualified resource ID for the managed compute usage.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the name property: The name information for the metric.
+ *
+ * @return the name value.
+ */
+ public MetricName name() {
+ return this.name;
+ }
+
+ /**
+ * Get the type property: The resource type.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the unit property: The unit of the metric.
+ *
+ * @return the unit value.
+ */
+ public UnitType unit() {
+ return this.unit;
+ }
+
+ /**
+ * Get the limit property: Maximum value for this metric.
+ *
+ * @return the limit value.
+ */
+ public Double limit() {
+ return this.limit;
+ }
+
+ /**
+ * Get the currentValue property: Current value for this metric.
+ *
+ * @return the currentValue value.
+ */
+ public Double currentValue() {
+ return this.currentValue;
+ }
+
+ /**
+ * Get the offerScope property: Offer scope (e.g., 'Global', 'Datazone-US').
+ *
+ * @return the offerScope value.
+ */
+ public String offerScope() {
+ return this.offerScope;
+ }
+
+ /**
+ * Get the deployments property: Deployments consuming this managed compute quota.
+ *
+ * @return the deployments value.
+ */
+ public List deployments() {
+ return this.deployments;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("unit", this.unit == null ? null : this.unit.toString());
+ jsonWriter.writeNumberField("limit", this.limit);
+ jsonWriter.writeNumberField("currentValue", this.currentValue);
+ jsonWriter.writeStringField("offerScope", this.offerScope);
+ jsonWriter.writeArrayField("deployments", this.deployments, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ManagedComputeUsageInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ManagedComputeUsageInner if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ManagedComputeUsageInner.
+ */
+ public static ManagedComputeUsageInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ManagedComputeUsageInner deserializedManagedComputeUsageInner = new ManagedComputeUsageInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedManagedComputeUsageInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedManagedComputeUsageInner.name = MetricName.fromJson(reader);
+ } else if ("type".equals(fieldName)) {
+ deserializedManagedComputeUsageInner.type = reader.getString();
+ } else if ("unit".equals(fieldName)) {
+ deserializedManagedComputeUsageInner.unit = UnitType.fromString(reader.getString());
+ } else if ("limit".equals(fieldName)) {
+ deserializedManagedComputeUsageInner.limit = reader.getNullable(JsonReader::getDouble);
+ } else if ("currentValue".equals(fieldName)) {
+ deserializedManagedComputeUsageInner.currentValue = reader.getNullable(JsonReader::getDouble);
+ } else if ("offerScope".equals(fieldName)) {
+ deserializedManagedComputeUsageInner.offerScope = reader.getString();
+ } else if ("deployments".equals(fieldName)) {
+ List deployments
+ = reader.readArray(reader1 -> ManagedComputeDeploymentInfo.fromJson(reader1));
+ deserializedManagedComputeUsageInner.deployments = deployments;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedManagedComputeUsageInner;
+ });
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java
new file mode 100644
index 000000000000..861a72603d33
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/WorkbenchInner.java
@@ -0,0 +1,259 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.cognitiveservices.models.Identity;
+import com.azure.resourcemanager.cognitiveservices.models.WorkbenchProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Workbench resource under a Cognitive Services project.
+ * Provides interactive compute with data access for AI development.
+ */
+@Fluent
+public final class WorkbenchInner extends ProxyResource {
+ /*
+ * Properties of the workbench resource.
+ */
+ private WorkbenchProperties properties;
+
+ /*
+ * Resource Etag.
+ */
+ private String etag;
+
+ /*
+ * The location of the workbench resource.
+ */
+ private String location;
+
+ /*
+ * Resource tags.
+ */
+ private Map tags;
+
+ /*
+ * Identity for the resource.
+ */
+ private Identity identity;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of WorkbenchInner class.
+ */
+ public WorkbenchInner() {
+ }
+
+ /**
+ * Get the properties property: Properties of the workbench resource.
+ *
+ * @return the properties value.
+ */
+ public WorkbenchProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: Properties of the workbench resource.
+ *
+ * @param properties the properties value to set.
+ * @return the WorkbenchInner object itself.
+ */
+ public WorkbenchInner withProperties(WorkbenchProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the etag property: Resource Etag.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Get the location property: The location of the workbench resource.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: The location of the workbench resource.
+ *
+ * @param location the location value to set.
+ * @return the WorkbenchInner object itself.
+ */
+ public WorkbenchInner withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the WorkbenchInner object itself.
+ */
+ public WorkbenchInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the identity property: Identity for the resource.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Identity for the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the WorkbenchInner object itself.
+ */
+ public WorkbenchInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.properties);
+ jsonWriter.writeStringField("location", this.location);
+ jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of WorkbenchInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of WorkbenchInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the WorkbenchInner.
+ */
+ public static WorkbenchInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ WorkbenchInner deserializedWorkbenchInner = new WorkbenchInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedWorkbenchInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedWorkbenchInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedWorkbenchInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedWorkbenchInner.properties = WorkbenchProperties.fromJson(reader);
+ } else if ("etag".equals(fieldName)) {
+ deserializedWorkbenchInner.etag = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedWorkbenchInner.location = reader.getString();
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedWorkbenchInner.tags = tags;
+ } else if ("identity".equals(fieldName)) {
+ deserializedWorkbenchInner.identity = Identity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedWorkbenchInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedWorkbenchInner;
+ });
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountImpl.java
index a5df28d63d4c..de2703cce5b3 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountImpl.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountImpl.java
@@ -12,6 +12,8 @@
import com.azure.resourcemanager.cognitiveservices.models.Account;
import com.azure.resourcemanager.cognitiveservices.models.AccountProperties;
import com.azure.resourcemanager.cognitiveservices.models.ApiKeys;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesRequest;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesResponse;
import com.azure.resourcemanager.cognitiveservices.models.Identity;
import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters;
import com.azure.resourcemanager.cognitiveservices.models.Sku;
@@ -179,6 +181,16 @@ public ApiKeys regenerateKey(RegenerateKeyParameters parameters) {
return serviceManager.accounts().regenerateKey(resourceGroupName, accountName, parameters);
}
+ public Response
+ evaluateDeploymentPoliciesWithResponse(EvaluateDeploymentPoliciesRequest body, Context context) {
+ return serviceManager.accounts()
+ .evaluateDeploymentPoliciesWithResponse(resourceGroupName, accountName, body, context);
+ }
+
+ public EvaluateDeploymentPoliciesResponse evaluateDeploymentPolicies(EvaluateDeploymentPoliciesRequest body) {
+ return serviceManager.accounts().evaluateDeploymentPolicies(resourceGroupName, accountName, body);
+ }
+
public AccountImpl withRegion(Region location) {
this.innerModel().withLocation(location.toString());
return this;
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 ea31c10b88d5..bd9096ebc0db 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
@@ -39,9 +39,11 @@
import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountSkuListResultInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.ApiKeysInner;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.EvaluateDeploymentPoliciesResponseInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.UsageListResultInner;
import com.azure.resourcemanager.cognitiveservices.implementation.models.AccountListResult;
import com.azure.resourcemanager.cognitiveservices.implementation.models.AccountModelListResult;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesRequest;
import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters;
import java.nio.ByteBuffer;
import reactor.core.publisher.Flux;
@@ -274,6 +276,26 @@ Response listModelsSync(@HostParam("endpoint") String en
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
@HeaderParam("Accept") String accept, Context context);
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/evaluateDeploymentPolicies")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> evaluateDeploymentPolicies(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") EvaluateDeploymentPoliciesRequest body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/evaluateDeploymentPolicies")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response evaluateDeploymentPoliciesSync(
+ @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") EvaluateDeploymentPoliciesRequest body, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -1524,6 +1546,86 @@ public PagedIterable listModels(String resourceGroupName, Str
nextLink -> listModelsNextSinglePage(nextLink, context));
}
+ /**
+ * Evaluate Azure Policy compliance for a set of hypothetical deployments without creating them.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param body The content of the action request.
+ * @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 response body for the evaluateDeploymentPolicies action along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> evaluateDeploymentPoliciesWithResponseAsync(
+ String resourceGroupName, String accountName, EvaluateDeploymentPoliciesRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.evaluateDeploymentPolicies(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName,
+ contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Evaluate Azure Policy compliance for a set of hypothetical deployments without creating them.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param body The content of the action request.
+ * @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 response body for the evaluateDeploymentPolicies action on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono evaluateDeploymentPoliciesAsync(String resourceGroupName,
+ String accountName, EvaluateDeploymentPoliciesRequest body) {
+ return evaluateDeploymentPoliciesWithResponseAsync(resourceGroupName, accountName, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Evaluate Azure Policy compliance for a set of hypothetical deployments without creating them.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param body The content of the action request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response body for the evaluateDeploymentPolicies action along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response evaluateDeploymentPoliciesWithResponse(
+ String resourceGroupName, String accountName, EvaluateDeploymentPoliciesRequest body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.evaluateDeploymentPoliciesSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, body, context);
+ }
+
+ /**
+ * Evaluate Azure Policy compliance for a set of hypothetical deployments without creating them.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param body The content of the action request.
+ * @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 response body for the evaluateDeploymentPolicies action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EvaluateDeploymentPoliciesResponseInner evaluateDeploymentPolicies(String resourceGroupName,
+ String accountName, EvaluateDeploymentPoliciesRequest body) {
+ return evaluateDeploymentPoliciesWithResponse(resourceGroupName, accountName, body, Context.NONE).getValue();
+ }
+
/**
* Get the next page of items.
*
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsImpl.java
index 1a5e65814871..625765956fe8 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsImpl.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsImpl.java
@@ -14,12 +14,15 @@
import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountSkuListResultInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.ApiKeysInner;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.EvaluateDeploymentPoliciesResponseInner;
import com.azure.resourcemanager.cognitiveservices.fluent.models.UsageListResultInner;
import com.azure.resourcemanager.cognitiveservices.models.Account;
import com.azure.resourcemanager.cognitiveservices.models.AccountModel;
import com.azure.resourcemanager.cognitiveservices.models.AccountSkuListResult;
import com.azure.resourcemanager.cognitiveservices.models.Accounts;
import com.azure.resourcemanager.cognitiveservices.models.ApiKeys;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesRequest;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesResponse;
import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters;
import com.azure.resourcemanager.cognitiveservices.models.UsageListResult;
@@ -159,6 +162,25 @@ public PagedIterable listModels(String resourceGroupName, String a
return ResourceManagerUtils.mapPage(inner, inner1 -> new AccountModelImpl(inner1, this.manager()));
}
+ public Response evaluateDeploymentPoliciesWithResponse(String resourceGroupName,
+ String accountName, EvaluateDeploymentPoliciesRequest body, Context context) {
+ Response inner = this.serviceClient()
+ .evaluateDeploymentPoliciesWithResponse(resourceGroupName, accountName, body, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new EvaluateDeploymentPoliciesResponseImpl(inner.getValue(), this.manager()));
+ }
+
+ public EvaluateDeploymentPoliciesResponse evaluateDeploymentPolicies(String resourceGroupName, String accountName,
+ EvaluateDeploymentPoliciesRequest body) {
+ EvaluateDeploymentPoliciesResponseInner inner
+ = this.serviceClient().evaluateDeploymentPolicies(resourceGroupName, accountName, body);
+ if (inner != null) {
+ return new EvaluateDeploymentPoliciesResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
public Account getById(String id) {
String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java
index cdb25e0df05c..f4f6c9d04938 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CognitiveServicesManagementClientImpl.java
@@ -35,11 +35,15 @@
import com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient;
import com.azure.resourcemanager.cognitiveservices.fluent.CommitmentTiersClient;
import com.azure.resourcemanager.cognitiveservices.fluent.ComputeOperationsClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient;
import com.azure.resourcemanager.cognitiveservices.fluent.DefenderForAISettingsClient;
import com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient;
import com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient;
import com.azure.resourcemanager.cognitiveservices.fluent.EncryptionScopesClient;
import com.azure.resourcemanager.cognitiveservices.fluent.LocationBasedModelCapacitiesClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeCapacitiesClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeUsagesOperationGroupsClient;
import com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkProvisionsClient;
import com.azure.resourcemanager.cognitiveservices.fluent.ManagedNetworkSettingsOperationsClient;
import com.azure.resourcemanager.cognitiveservices.fluent.ModelCapacitiesClient;
@@ -67,6 +71,7 @@
import com.azure.resourcemanager.cognitiveservices.fluent.SubscriptionRaiPoliciesClient;
import com.azure.resourcemanager.cognitiveservices.fluent.TestRaiExternalSafetyProvidersClient;
import com.azure.resourcemanager.cognitiveservices.fluent.UsagesClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.WorkbenchesClient;
import java.io.IOException;
import java.lang.reflect.Type;
import java.nio.ByteBuffer;
@@ -473,6 +478,20 @@ public AgentApplicationsClient getAgentApplications() {
return this.agentApplications;
}
+ /**
+ * The ManagedComputeDeploymentsClient object to access its operations.
+ */
+ private final ManagedComputeDeploymentsClient managedComputeDeployments;
+
+ /**
+ * Gets the ManagedComputeDeploymentsClient object to access its operations.
+ *
+ * @return the ManagedComputeDeploymentsClient object.
+ */
+ public ManagedComputeDeploymentsClient getManagedComputeDeployments() {
+ return this.managedComputeDeployments;
+ }
+
/**
* The ComputeOperationsClient object to access its operations.
*/
@@ -487,6 +506,62 @@ public ComputeOperationsClient getComputeOperations() {
return this.computeOperations;
}
+ /**
+ * The ManagedComputeUsagesOperationGroupsClient object to access its operations.
+ */
+ private final ManagedComputeUsagesOperationGroupsClient managedComputeUsagesOperationGroups;
+
+ /**
+ * Gets the ManagedComputeUsagesOperationGroupsClient object to access its operations.
+ *
+ * @return the ManagedComputeUsagesOperationGroupsClient object.
+ */
+ public ManagedComputeUsagesOperationGroupsClient getManagedComputeUsagesOperationGroups() {
+ return this.managedComputeUsagesOperationGroups;
+ }
+
+ /**
+ * The ComputesClient object to access its operations.
+ */
+ private final ComputesClient computes;
+
+ /**
+ * Gets the ComputesClient object to access its operations.
+ *
+ * @return the ComputesClient object.
+ */
+ public ComputesClient getComputes() {
+ return this.computes;
+ }
+
+ /**
+ * The WorkbenchesClient object to access its operations.
+ */
+ private final WorkbenchesClient workbenches;
+
+ /**
+ * Gets the WorkbenchesClient object to access its operations.
+ *
+ * @return the WorkbenchesClient object.
+ */
+ public WorkbenchesClient getWorkbenches() {
+ return this.workbenches;
+ }
+
+ /**
+ * The ManagedComputeCapacitiesClient object to access its operations.
+ */
+ private final ManagedComputeCapacitiesClient managedComputeCapacities;
+
+ /**
+ * Gets the ManagedComputeCapacitiesClient object to access its operations.
+ *
+ * @return the ManagedComputeCapacitiesClient object.
+ */
+ public ManagedComputeCapacitiesClient getManagedComputeCapacities() {
+ return this.managedComputeCapacities;
+ }
+
/**
* The PrivateLinkResourcesClient object to access its operations.
*/
@@ -742,7 +817,7 @@ public ModelCapacitiesClient getModelCapacities() {
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
this.subscriptionId = subscriptionId;
- this.apiVersion = "2026-01-15-preview";
+ this.apiVersion = "2026-03-15-preview";
this.resourceProviders = new ResourceProvidersClientImpl(this);
this.operations = new OperationsClientImpl(this);
this.accounts = new AccountsClientImpl(this);
@@ -765,7 +840,12 @@ public ModelCapacitiesClient getModelCapacities() {
this.projectCapabilityHosts = new ProjectCapabilityHostsClientImpl(this);
this.quotaTiers = new QuotaTiersClientImpl(this);
this.agentApplications = new AgentApplicationsClientImpl(this);
+ this.managedComputeDeployments = new ManagedComputeDeploymentsClientImpl(this);
this.computeOperations = new ComputeOperationsClientImpl(this);
+ this.managedComputeUsagesOperationGroups = new ManagedComputeUsagesOperationGroupsClientImpl(this);
+ this.computes = new ComputesClientImpl(this);
+ this.workbenches = new WorkbenchesClientImpl(this);
+ this.managedComputeCapacities = new ManagedComputeCapacitiesClientImpl(this);
this.privateLinkResources = new PrivateLinkResourcesClientImpl(this);
this.testRaiExternalSafetyProviders = new TestRaiExternalSafetyProvidersClientImpl(this);
this.raiExternalSafetyProviders = new RaiExternalSafetyProvidersClientImpl(this);
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java
new file mode 100644
index 000000000000..61838cb3cfe8
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputeImpl.java
@@ -0,0 +1,215 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeInner;
+import com.azure.resourcemanager.cognitiveservices.models.Compute;
+import com.azure.resourcemanager.cognitiveservices.models.ComputeProperties;
+import com.azure.resourcemanager.cognitiveservices.models.Identity;
+import java.util.Collections;
+import java.util.Map;
+
+public final class ComputeImpl implements Compute, Compute.Definition, Compute.Update {
+ private ComputeInner innerObject;
+
+ private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ComputeProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public String kind() {
+ return this.innerModel().kind();
+ }
+
+ public Identity identity() {
+ return this.innerModel().identity();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ComputeInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String accountName;
+
+ private String computeName;
+
+ public ComputeImpl withExistingAccount(String resourceGroupName, String accountName) {
+ this.resourceGroupName = resourceGroupName;
+ this.accountName = accountName;
+ return this;
+ }
+
+ public Compute create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getComputes()
+ .createOrUpdate(resourceGroupName, accountName, computeName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Compute create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getComputes()
+ .createOrUpdate(resourceGroupName, accountName, computeName, this.innerModel(), context);
+ return this;
+ }
+
+ ComputeImpl(String name, com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerObject = new ComputeInner();
+ this.serviceManager = serviceManager;
+ this.computeName = name;
+ }
+
+ public ComputeImpl update() {
+ return this;
+ }
+
+ public Compute apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getComputes()
+ .update(resourceGroupName, accountName, computeName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Compute apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getComputes()
+ .update(resourceGroupName, accountName, computeName, this.innerModel(), context);
+ return this;
+ }
+
+ ComputeImpl(ComputeInner innerObject,
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts");
+ this.computeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "computes");
+ }
+
+ public Compute refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getComputes()
+ .getWithResponse(resourceGroupName, accountName, computeName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Compute refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getComputes()
+ .getWithResponse(resourceGroupName, accountName, computeName, context)
+ .getValue();
+ return this;
+ }
+
+ public void start() {
+ serviceManager.computes().start(resourceGroupName, accountName, computeName);
+ }
+
+ public void start(Context context) {
+ serviceManager.computes().start(resourceGroupName, accountName, computeName, context);
+ }
+
+ public void stop() {
+ serviceManager.computes().stop(resourceGroupName, accountName, computeName);
+ }
+
+ public void stop(Context context) {
+ serviceManager.computes().stop(resourceGroupName, accountName, computeName, context);
+ }
+
+ public void restart() {
+ serviceManager.computes().restart(resourceGroupName, accountName, computeName);
+ }
+
+ public void restart(Context context) {
+ serviceManager.computes().restart(resourceGroupName, accountName, computeName, context);
+ }
+
+ public ComputeImpl withProperties(ComputeProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public ComputeImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ComputeImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ComputeImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public ComputeImpl withKind(String kind) {
+ this.innerModel().withKind(kind);
+ return this;
+ }
+
+ public ComputeImpl withIdentity(Identity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesClientImpl.java
new file mode 100644
index 000000000000..7561c16b0aaf
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesClientImpl.java
@@ -0,0 +1,1551 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeInner;
+import com.azure.resourcemanager.cognitiveservices.implementation.models.ComputeListResult;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ComputesClient.
+ */
+public final class ComputesClientImpl implements ComputesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ComputesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CognitiveServicesManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ComputesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ComputesClientImpl(CognitiveServicesManagementClientImpl client) {
+ this.service = RestProxy.create(ComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CognitiveServicesManagementClientComputes to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CognitiveServicesManagementClientComputes")
+ public interface ComputesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ComputeInner resource,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ComputeInner resource,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ComputeInner properties,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ComputeInner properties,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}/start")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> start(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}/start")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response startSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}/stop")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> stop(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}/stop")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response stopSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}/restart")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> restart(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/computes/{computeName}/restart")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response restartSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("computeName") String computeName, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified compute associated with the Cognitive Services account along with {@link Response} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified compute associated with the Cognitive Services account on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String accountName, String computeName) {
+ return getWithResponseAsync(resourceGroupName, accountName, computeName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified compute associated with the Cognitive Services account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String accountName, String computeName,
+ Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, computeName, accept, context);
+ }
+
+ /**
+ * Gets the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified compute associated with the Cognitive Services account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComputeInner get(String resourceGroupName, String accountName, String computeName) {
+ return getWithResponse(resourceGroupName, accountName, computeName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String accountName, String computeName, ComputeInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, contentType, accept,
+ resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String accountName,
+ String computeName, ComputeInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, contentType, accept, resource,
+ Context.NONE);
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String accountName,
+ String computeName, ComputeInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, contentType, accept, resource,
+ context);
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ComputeInner> beginCreateOrUpdateAsync(String resourceGroupName,
+ String accountName, String computeName, ComputeInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, accountName, computeName, resource);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ ComputeInner.class, ComputeInner.class, this.client.getContext());
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName,
+ String accountName, String computeName, ComputeInner resource) {
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, accountName, computeName, resource);
+ return this.client.getLroResult(response, ComputeInner.class, ComputeInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ComputeInner> beginCreateOrUpdate(String resourceGroupName,
+ String accountName, String computeName, ComputeInner resource, Context context) {
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, accountName, computeName, resource, context);
+ return this.client.getLroResult(response, ComputeInner.class, ComputeInner.class,
+ context);
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String accountName, String computeName,
+ ComputeInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, accountName, computeName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComputeInner createOrUpdate(String resourceGroupName, String accountName, String computeName,
+ ComputeInner resource) {
+ return beginCreateOrUpdate(resourceGroupName, accountName, computeName, resource).getFinalResult();
+ }
+
+ /**
+ * Creates or updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param resource The compute properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComputeInner createOrUpdate(String resourceGroupName, String accountName, String computeName,
+ ComputeInner resource, Context context) {
+ return beginCreateOrUpdate(resourceGroupName, accountName, computeName, resource, context).getFinalResult();
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @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 cognitive Services compute resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName,
+ String computeName, ComputeInner properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, contentType, accept,
+ properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @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 cognitive Services compute resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String accountName, String computeName,
+ ComputeInner properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, contentType, accept,
+ properties, Context.NONE);
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String accountName, String computeName,
+ ComputeInner properties, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, contentType, accept,
+ properties, context);
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ComputeInner> beginUpdateAsync(String resourceGroupName,
+ String accountName, String computeName, ComputeInner properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, accountName, computeName, properties);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ ComputeInner.class, ComputeInner.class, this.client.getContext());
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, String accountName,
+ String computeName, ComputeInner properties) {
+ Response response = updateWithResponse(resourceGroupName, accountName, computeName, properties);
+ return this.client.getLroResult(response, ComputeInner.class, ComputeInner.class,
+ Context.NONE);
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ComputeInner> beginUpdate(String resourceGroupName, String accountName,
+ String computeName, ComputeInner properties, Context context) {
+ Response response
+ = updateWithResponse(resourceGroupName, accountName, computeName, properties, context);
+ return this.client.getLroResult(response, ComputeInner.class, ComputeInner.class,
+ context);
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @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 cognitive Services compute resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String accountName, String computeName,
+ ComputeInner properties) {
+ return beginUpdateAsync(resourceGroupName, accountName, computeName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @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 cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComputeInner update(String resourceGroupName, String accountName, String computeName,
+ ComputeInner properties) {
+ return beginUpdate(resourceGroupName, accountName, computeName, properties).getFinalResult();
+ }
+
+ /**
+ * Updates a compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param properties The compute properties to update.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services compute resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ComputeInner update(String resourceGroupName, String accountName, String computeName,
+ ComputeInner properties, Context context) {
+ return beginUpdate(resourceGroupName, accountName, computeName, properties, context).getFinalResult();
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String accountName, String computeName) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, Context.NONE);
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String accountName, String computeName,
+ Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, context);
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName,
+ String computeName) {
+ Response response = deleteWithResponse(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName,
+ String computeName, Context context) {
+ Response response = deleteWithResponse(resourceGroupName, accountName, computeName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String accountName, String computeName) {
+ return beginDeleteAsync(resourceGroupName, accountName, computeName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String accountName, String computeName) {
+ beginDelete(resourceGroupName, accountName, computeName).getFinalResult();
+ }
+
+ /**
+ * Deletes the specified compute associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String accountName, String computeName, Context context) {
+ beginDelete(resourceGroupName, accountName, computeName, context).getFinalResult();
+ }
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @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 computes associated with the Cognitive Services account along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceGroupName, String accountName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @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 computes associated with the Cognitive Services account as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceGroupName, String accountName) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @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 computes associated with the Cognitive Services account along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String accountName) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the computes associated with the Cognitive Services account along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceGroupName, String accountName, Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @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 computes associated with the Cognitive Services account as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String accountName) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Gets the computes associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the computes associated with the Cognitive Services account as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceGroupName, String accountName, Context context) {
+ return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> startWithResponseAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ return FluxUtil
+ .withContext(context -> service.start(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response startWithResponse(String resourceGroupName, String accountName, String computeName) {
+ return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, Context.NONE);
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response startWithResponse(String resourceGroupName, String accountName, String computeName,
+ Context context) {
+ return service.startSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, context);
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStartAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ Mono>> mono = startWithResponseAsync(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStart(String resourceGroupName, String accountName,
+ String computeName) {
+ Response response = startWithResponse(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStart(String resourceGroupName, String accountName,
+ String computeName, Context context) {
+ Response response = startWithResponse(resourceGroupName, accountName, computeName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono startAsync(String resourceGroupName, String accountName, String computeName) {
+ return beginStartAsync(resourceGroupName, accountName, computeName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void start(String resourceGroupName, String accountName, String computeName) {
+ beginStart(resourceGroupName, accountName, computeName).getFinalResult();
+ }
+
+ /**
+ * Starts a stopped ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void start(String resourceGroupName, String accountName, String computeName, Context context) {
+ beginStart(resourceGroupName, accountName, computeName, context).getFinalResult();
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> stopWithResponseAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ return FluxUtil
+ .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response stopWithResponse(String resourceGroupName, String accountName, String computeName) {
+ return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, computeName, Context.NONE);
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response stopWithResponse(String resourceGroupName, String accountName, String computeName,
+ Context context) {
+ return service.stopSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, computeName, context);
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginStopAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ Mono>> mono = stopWithResponseAsync(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStop(String resourceGroupName, String accountName,
+ String computeName) {
+ Response response = stopWithResponse(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginStop(String resourceGroupName, String accountName,
+ String computeName, Context context) {
+ Response response = stopWithResponse(resourceGroupName, accountName, computeName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono stopAsync(String resourceGroupName, String accountName, String computeName) {
+ return beginStopAsync(resourceGroupName, accountName, computeName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void stop(String resourceGroupName, String accountName, String computeName) {
+ beginStop(resourceGroupName, accountName, computeName).getFinalResult();
+ }
+
+ /**
+ * Stops a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void stop(String resourceGroupName, String accountName, String computeName, Context context) {
+ beginStop(resourceGroupName, accountName, computeName, context).getFinalResult();
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> restartWithResponseAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ return FluxUtil
+ .withContext(context -> service.restart(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response restartWithResponse(String resourceGroupName, String accountName, String computeName) {
+ return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, Context.NONE);
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response restartWithResponse(String resourceGroupName, String accountName, String computeName,
+ Context context) {
+ return service.restartSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, computeName, context);
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginRestartAsync(String resourceGroupName, String accountName,
+ String computeName) {
+ Mono>> mono = restartWithResponseAsync(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginRestart(String resourceGroupName, String accountName,
+ String computeName) {
+ Response response = restartWithResponse(resourceGroupName, accountName, computeName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginRestart(String resourceGroupName, String accountName,
+ String computeName, Context context) {
+ Response response = restartWithResponse(resourceGroupName, accountName, computeName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono restartAsync(String resourceGroupName, String accountName, String computeName) {
+ return beginRestartAsync(resourceGroupName, accountName, computeName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void restart(String resourceGroupName, String accountName, String computeName) {
+ beginRestart(resourceGroupName, accountName, computeName).getFinalResult();
+ }
+
+ /**
+ * Restarts a running ContainerInstance compute resource.
+ * This is a long-running operation that returns 202 Accepted.
+ * Only applicable when computeType is ContainerInstance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param computeName The name of the compute associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void restart(String resourceGroupName, String accountName, String computeName, Context context) {
+ beginRestart(resourceGroupName, accountName, computeName, context).getFinalResult();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 computes associated with the Cognitive Services account along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 computes associated with the Cognitive Services account along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the computes associated with the Cognitive Services account along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesImpl.java
new file mode 100644
index 000000000000..4ba56e8e424e
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ComputesImpl.java
@@ -0,0 +1,176 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.cognitiveservices.fluent.ComputesClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ComputeInner;
+import com.azure.resourcemanager.cognitiveservices.models.Compute;
+import com.azure.resourcemanager.cognitiveservices.models.Computes;
+
+public final class ComputesImpl implements Computes {
+ private static final ClientLogger LOGGER = new ClientLogger(ComputesImpl.class);
+
+ private final ComputesClient innerClient;
+
+ private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager;
+
+ public ComputesImpl(ComputesClient innerClient,
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceGroupName, String accountName, String computeName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, accountName, computeName, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new ComputeImpl(inner.getValue(), this.manager()));
+ }
+
+ public Compute get(String resourceGroupName, String accountName, String computeName) {
+ ComputeInner inner = this.serviceClient().get(resourceGroupName, accountName, computeName);
+ if (inner != null) {
+ return new ComputeImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String accountName, String computeName) {
+ this.serviceClient().delete(resourceGroupName, accountName, computeName);
+ }
+
+ public void delete(String resourceGroupName, String accountName, String computeName, Context context) {
+ this.serviceClient().delete(resourceGroupName, accountName, computeName, context);
+ }
+
+ public PagedIterable list(String resourceGroupName, String accountName) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceGroupName, String accountName, Context context) {
+ PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ComputeImpl(inner1, this.manager()));
+ }
+
+ public void start(String resourceGroupName, String accountName, String computeName) {
+ this.serviceClient().start(resourceGroupName, accountName, computeName);
+ }
+
+ public void start(String resourceGroupName, String accountName, String computeName, Context context) {
+ this.serviceClient().start(resourceGroupName, accountName, computeName, context);
+ }
+
+ public void stop(String resourceGroupName, String accountName, String computeName) {
+ this.serviceClient().stop(resourceGroupName, accountName, computeName);
+ }
+
+ public void stop(String resourceGroupName, String accountName, String computeName, Context context) {
+ this.serviceClient().stop(resourceGroupName, accountName, computeName, context);
+ }
+
+ public void restart(String resourceGroupName, String accountName, String computeName) {
+ this.serviceClient().restart(resourceGroupName, accountName, computeName);
+ }
+
+ public void restart(String resourceGroupName, String accountName, String computeName, Context context) {
+ this.serviceClient().restart(resourceGroupName, accountName, computeName, context);
+ }
+
+ public Compute getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes");
+ if (computeName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, accountName, computeName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes");
+ if (computeName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, accountName, computeName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes");
+ if (computeName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id)));
+ }
+ this.delete(resourceGroupName, accountName, computeName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "accounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id)));
+ }
+ String computeName = ResourceManagerUtils.getValueFromIdByName(id, "computes");
+ if (computeName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'computes'.", id)));
+ }
+ this.delete(resourceGroupName, accountName, computeName, context);
+ }
+
+ private ComputesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() {
+ return this.serviceManager;
+ }
+
+ public ComputeImpl define(String name) {
+ return new ComputeImpl(name, this.manager());
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EvaluateDeploymentPoliciesResponseImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EvaluateDeploymentPoliciesResponseImpl.java
new file mode 100644
index 000000000000..7e0fd4377f0e
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/EvaluateDeploymentPoliciesResponseImpl.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.resourcemanager.cognitiveservices.fluent.models.EvaluateDeploymentPoliciesResponseInner;
+import com.azure.resourcemanager.cognitiveservices.models.DeploymentPolicyEvaluationResult;
+import com.azure.resourcemanager.cognitiveservices.models.EvaluateDeploymentPoliciesResponse;
+import java.util.Collections;
+import java.util.Map;
+
+public final class EvaluateDeploymentPoliciesResponseImpl implements EvaluateDeploymentPoliciesResponse {
+ private EvaluateDeploymentPoliciesResponseInner innerObject;
+
+ private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager;
+
+ EvaluateDeploymentPoliciesResponseImpl(EvaluateDeploymentPoliciesResponseInner innerObject,
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Map results() {
+ Map inner = this.innerModel().results();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public EvaluateDeploymentPoliciesResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesClientImpl.java
new file mode 100644
index 000000000000..c27e8b813013
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesClientImpl.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeCapacitiesClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeCapacityInner;
+import com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeCapacityListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedComputeCapacitiesClient.
+ */
+public final class ManagedComputeCapacitiesClientImpl implements ManagedComputeCapacitiesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ManagedComputeCapacitiesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CognitiveServicesManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ManagedComputeCapacitiesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ManagedComputeCapacitiesClientImpl(CognitiveServicesManagementClientImpl client) {
+ this.service = RestProxy.create(ManagedComputeCapacitiesService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CognitiveServicesManagementClientManagedComputeCapacities to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CognitiveServicesManagementClientManagedComputeCapacities")
+ public interface ManagedComputeCapacitiesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/managedComputeCapacities")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("offer") String offer, @QueryParam("acceleratorType") String acceleratorType,
+ @QueryParam("deploymentId") String deploymentId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/managedComputeCapacities")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("offer") String offer, @QueryParam("acceleratorType") String acceleratorType,
+ @QueryParam("deploymentId") String deploymentId, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @param acceleratorType Optional accelerator type filter to narrow results to a specific accelerator type.
+ * @param deploymentId Optional deployment resource ID. When provided, returns capacity for the specific region
+ * where the deployment is hosted rather than the best available region.
+ * @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 managed compute capacities for a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String offer, String acceleratorType,
+ String deploymentId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), offer, acceleratorType, deploymentId, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @param acceleratorType Optional accelerator type filter to narrow results to a specific accelerator type.
+ * @param deploymentId Optional deployment resource ID. When provided, returns capacity for the specific region
+ * where the deployment is hosted rather than the best available region.
+ * @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 managed compute capacities for a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String offer, String acceleratorType,
+ String deploymentId) {
+ return new PagedFlux<>(() -> listSinglePageAsync(offer, acceleratorType, deploymentId),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @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 managed compute capacities for a subscription as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String offer) {
+ final String acceleratorType = null;
+ final String deploymentId = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(offer, acceleratorType, deploymentId),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @param acceleratorType Optional accelerator type filter to narrow results to a specific accelerator type.
+ * @param deploymentId Optional deployment resource ID. When provided, returns capacity for the specific region
+ * where the deployment is hosted rather than the best available region.
+ * @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 managed compute capacities for a subscription along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String offer, String acceleratorType,
+ String deploymentId) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ offer, acceleratorType, deploymentId, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @param acceleratorType Optional accelerator type filter to narrow results to a specific accelerator type.
+ * @param deploymentId Optional deployment resource ID. When provided, returns capacity for the specific region
+ * where the deployment is hosted rather than the best available region.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the managed compute capacities for a subscription along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String offer, String acceleratorType,
+ String deploymentId, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ offer, acceleratorType, deploymentId, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @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 managed compute capacities for a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String offer) {
+ final String acceleratorType = null;
+ final String deploymentId = null;
+ return new PagedIterable<>(() -> listSinglePage(offer, acceleratorType, deploymentId),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * Gets the managed compute capacities for a subscription. Returns available capacity
+ * per accelerator type, including deployment size information.
+ *
+ * @param offer The offer name to query capacity for (required).
+ * @param acceleratorType Optional accelerator type filter to narrow results to a specific accelerator type.
+ * @param deploymentId Optional deployment resource ID. When provided, returns capacity for the specific region
+ * where the deployment is hosted rather than the best available region.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the managed compute capacities for a subscription as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String offer, String acceleratorType, String deploymentId,
+ Context context) {
+ return new PagedIterable<>(() -> listSinglePage(offer, acceleratorType, deploymentId, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 managed compute capacities for a subscription along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @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 managed compute capacities for a subscription along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the managed compute capacities for a subscription along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesImpl.java
new file mode 100644
index 000000000000..30fb72330d9e
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacitiesImpl.java
@@ -0,0 +1,47 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeCapacitiesClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeCapacityInner;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacities;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacity;
+
+public final class ManagedComputeCapacitiesImpl implements ManagedComputeCapacities {
+ private static final ClientLogger LOGGER = new ClientLogger(ManagedComputeCapacitiesImpl.class);
+
+ private final ManagedComputeCapacitiesClient innerClient;
+
+ private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager;
+
+ public ManagedComputeCapacitiesImpl(ManagedComputeCapacitiesClient innerClient,
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list(String offer) {
+ PagedIterable inner = this.serviceClient().list(offer);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedComputeCapacityImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String offer, String acceleratorType, String deploymentId,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(offer, acceleratorType, deploymentId, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedComputeCapacityImpl(inner1, this.manager()));
+ }
+
+ private ManagedComputeCapacitiesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacityImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacityImpl.java
new file mode 100644
index 000000000000..55f46e65428e
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeCapacityImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeCapacityInner;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacity;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeCapacityProperties;
+
+public final class ManagedComputeCapacityImpl implements ManagedComputeCapacity {
+ private ManagedComputeCapacityInner innerObject;
+
+ private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager;
+
+ ManagedComputeCapacityImpl(ManagedComputeCapacityInner innerObject,
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ManagedComputeCapacityProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ManagedComputeCapacityInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentImpl.java
new file mode 100644
index 000000000000..f144373f890e
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentImpl.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeDeploymentInner;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeployment;
+import com.azure.resourcemanager.cognitiveservices.models.ManagedComputeDeploymentProperties;
+import com.azure.resourcemanager.cognitiveservices.models.PatchResourceSku;
+import com.azure.resourcemanager.cognitiveservices.models.Sku;
+
+public final class ManagedComputeDeploymentImpl
+ implements ManagedComputeDeployment, ManagedComputeDeployment.Definition, ManagedComputeDeployment.Update {
+ private ManagedComputeDeploymentInner innerObject;
+
+ private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public ManagedComputeDeploymentProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public Sku sku() {
+ return this.innerModel().sku();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public ManagedComputeDeploymentInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String accountName;
+
+ private String deploymentName;
+
+ private PatchResourceSku updateProperties;
+
+ public ManagedComputeDeploymentImpl withExistingAccount(String resourceGroupName, String accountName) {
+ this.resourceGroupName = resourceGroupName;
+ this.accountName = accountName;
+ return this;
+ }
+
+ public ManagedComputeDeployment create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedComputeDeployments()
+ .createOrUpdate(resourceGroupName, accountName, deploymentName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public ManagedComputeDeployment create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedComputeDeployments()
+ .createOrUpdate(resourceGroupName, accountName, deploymentName, this.innerModel(), context);
+ return this;
+ }
+
+ ManagedComputeDeploymentImpl(String name,
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerObject = new ManagedComputeDeploymentInner();
+ this.serviceManager = serviceManager;
+ this.deploymentName = name;
+ }
+
+ public ManagedComputeDeploymentImpl update() {
+ this.updateProperties = new PatchResourceSku();
+ return this;
+ }
+
+ public ManagedComputeDeployment apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedComputeDeployments()
+ .update(resourceGroupName, accountName, deploymentName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public ManagedComputeDeployment apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedComputeDeployments()
+ .update(resourceGroupName, accountName, deploymentName, updateProperties, context);
+ return this;
+ }
+
+ ManagedComputeDeploymentImpl(ManagedComputeDeploymentInner innerObject,
+ com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "accounts");
+ this.deploymentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedComputeDeployments");
+ }
+
+ public ManagedComputeDeployment refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedComputeDeployments()
+ .getWithResponse(resourceGroupName, accountName, deploymentName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public ManagedComputeDeployment refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getManagedComputeDeployments()
+ .getWithResponse(resourceGroupName, accountName, deploymentName, context)
+ .getValue();
+ return this;
+ }
+
+ public ManagedComputeDeploymentImpl withProperties(ManagedComputeDeploymentProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public ManagedComputeDeploymentImpl withSku(Sku sku) {
+ if (isInCreateMode()) {
+ this.innerModel().withSku(sku);
+ return this;
+ } else {
+ this.updateProperties.withSku(sku);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel() == null || this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentsClientImpl.java
new file mode 100644
index 000000000000..e62a84240b77
--- /dev/null
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ManagedComputeDeploymentsClientImpl.java
@@ -0,0 +1,999 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.cognitiveservices.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.cognitiveservices.fluent.ManagedComputeDeploymentsClient;
+import com.azure.resourcemanager.cognitiveservices.fluent.models.ManagedComputeDeploymentInner;
+import com.azure.resourcemanager.cognitiveservices.implementation.models.ManagedComputeDeploymentListResult;
+import com.azure.resourcemanager.cognitiveservices.models.PatchResourceSku;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in ManagedComputeDeploymentsClient.
+ */
+public final class ManagedComputeDeploymentsClientImpl implements ManagedComputeDeploymentsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final ManagedComputeDeploymentsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CognitiveServicesManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ManagedComputeDeploymentsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ManagedComputeDeploymentsClientImpl(CognitiveServicesManagementClientImpl client) {
+ this.service = RestProxy.create(ManagedComputeDeploymentsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CognitiveServicesManagementClientManagedComputeDeployments to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "CognitiveServicesManagementClientManagedComputeDeployments")
+ public interface ManagedComputeDeploymentsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, @HeaderParam("Accept") String accept, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedComputeDeploymentInner resource,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") ManagedComputeDeploymentInner resource,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") PatchResourceSku properties,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") PatchResourceSku properties,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments/{deploymentName}")
+ @ExpectedResponses({ 200, 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("deploymentName") String deploymentName, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/managedComputeDeployments")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Gets the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed compute deployment associated with the Cognitive Services account along with
+ * {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName,
+ String accountName, String deploymentName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, deploymentName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed compute deployment associated with the Cognitive Services account on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String accountName,
+ String deploymentName) {
+ return getWithResponseAsync(resourceGroupName, accountName, deploymentName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed compute deployment associated with the Cognitive Services account along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String accountName,
+ String deploymentName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, deploymentName, accept, context);
+ }
+
+ /**
+ * Gets the specified managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the specified managed compute deployment associated with the Cognitive Services account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ManagedComputeDeploymentInner get(String resourceGroupName, String accountName, String deploymentName) {
+ return getWithResponse(resourceGroupName, accountName, deploymentName, Context.NONE).getValue();
+ }
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services account managed compute deployment, backed by managed compute (GPU) resources along
+ * with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String accountName, String deploymentName, ManagedComputeDeploymentInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, deploymentName, contentType, accept,
+ resource, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services account managed compute deployment, backed by managed compute (GPU) resources along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String accountName,
+ String deploymentName, ManagedComputeDeploymentInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, deploymentName, contentType, accept,
+ resource, Context.NONE);
+ }
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cognitive Services account managed compute deployment, backed by managed compute (GPU) resources along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String accountName,
+ String deploymentName, ManagedComputeDeploymentInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, deploymentName, contentType, accept,
+ resource, context);
+ }
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of cognitive Services account managed compute deployment, backed by
+ * managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, ManagedComputeDeploymentInner>
+ beginCreateOrUpdateAsync(String resourceGroupName, String accountName, String deploymentName,
+ ManagedComputeDeploymentInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, accountName, deploymentName, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), ManagedComputeDeploymentInner.class, ManagedComputeDeploymentInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Creates or updates a managed compute deployment associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param deploymentName The name of the managed compute deployment associated with the Cognitive Services Account.
+ * @param resource The managed compute deployment properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of cognitive Services account managed compute deployment, backed by
+ * managed compute (GPU) resources.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller