From 5bf5ad7bf4acc78abf254d5fd856355692ebb349 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 10 Mar 2022 06:45:55 +0000 Subject: [PATCH] CodeGen from PR 17712 in Azure/azure-rest-api-specs Merge a894a331491839aca2d9c597b537171987bda704 into 8174b2fc60e288a9d7fcdff5f9414e43a6ad5989 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 86 ++-- .../pom.xml | 2 +- .../CognitiveServicesManager.java | 10 +- .../fluent/AccountsClient.java | 72 ++- .../fluent/CommitmentPlansClient.java | 14 +- .../fluent/CommitmentTiersClient.java | 6 +- .../fluent/DeletedAccountsClient.java | 12 +- .../fluent/DeploymentsClient.java | 16 +- .../fluent/OperationsClient.java | 6 +- .../PrivateEndpointConnectionsClient.java | 14 +- .../fluent/PrivateLinkResourcesClient.java | 3 +- .../fluent/ResourceProvidersClient.java | 4 +- .../fluent/ResourceSkusClient.java | 6 +- .../fluent/models/AccountInner.java | 4 - .../fluent/models/AccountModelInner.java | 174 +++++++ .../models/AccountSkuListResultInner.java | 4 - .../fluent/models/ApiKeysInner.java | 4 - .../fluent/models/CommitmentPlanInner.java | 4 - .../fluent/models/CommitmentTierInner.java | 4 - .../fluent/models/DeploymentInner.java | 4 - .../models/DomainAvailabilityInner.java | 4 - .../fluent/models/OperationInner.java | 4 - .../PrivateEndpointConnectionInner.java | 4 - ...vateEndpointConnectionListResultInner.java | 4 - .../PrivateLinkResourceListResultInner.java | 4 - .../fluent/models/ResourceSkuInner.java | 4 - .../SkuAvailabilityListResultInner.java | 4 - .../fluent/models/UsageListResultInner.java | 4 - .../implementation/AccountModelImpl.java | 71 +++ .../implementation/AccountsClientImpl.java | 451 +++++++++++++++--- .../implementation/AccountsImpl.java | 32 +- ...CognitiveServicesManagementClientImpl.java | 8 +- .../CommitmentPlansClientImpl.java | 67 +-- .../implementation/CommitmentPlansImpl.java | 27 +- .../CommitmentTiersClientImpl.java | 25 +- .../implementation/CommitmentTiersImpl.java | 3 +- .../DeletedAccountsClientImpl.java | 52 +- .../implementation/DeletedAccountsImpl.java | 3 +- .../implementation/DeploymentsClientImpl.java | 81 ++-- .../implementation/DeploymentsImpl.java | 27 +- .../implementation/OperationsClientImpl.java | 27 +- .../implementation/OperationsImpl.java | 3 +- .../PrivateEndpointConnectionsClientImpl.java | 66 +-- .../PrivateEndpointConnectionsImpl.java | 27 +- .../PrivateLinkResourcesClientImpl.java | 15 +- .../PrivateLinkResourcesImpl.java | 3 +- .../ResourceProvidersClientImpl.java | 19 +- .../implementation/ResourceProvidersImpl.java | 3 +- .../ResourceSkusClientImpl.java | 27 +- .../implementation/ResourceSkusImpl.java | 3 +- .../cognitiveservices/models/Account.java | 4 +- .../models/AccountListResult.java | 4 - .../models/AccountModel.java | 75 +++ .../models/AccountModelListResult.java | 77 +++ .../models/AccountProperties.java | 69 ++- .../cognitiveservices/models/AccountSku.java | 4 - .../cognitiveservices/models/Accounts.java | 53 +- .../models/ApiProperties.java | 3 - .../models/AzureEntityResource.java | 4 - .../models/CallRateLimit.java | 4 - .../CheckDomainAvailabilityParameter.java | 9 +- .../models/CheckSkuAvailabilityParameter.java | 11 +- .../models/CommitmentCost.java | 4 - .../models/CommitmentPeriod.java | 4 - .../models/CommitmentPlanListResult.java | 4 - .../models/CommitmentPlanProperties.java | 4 - .../models/CommitmentPlans.java | 12 +- .../models/CommitmentQuota.java | 4 - .../models/CommitmentTierListResult.java | 4 - .../models/CommitmentTiers.java | 6 +- .../models/DeletedAccounts.java | 8 +- .../models/DeploymentListResult.java | 4 - .../models/DeploymentModel.java | 6 +- .../models/DeploymentProperties.java | 4 - .../models/DeploymentScaleSettings.java | 21 +- .../cognitiveservices/models/Deployments.java | 12 +- .../cognitiveservices/models/Encryption.java | 4 - .../cognitiveservices/models/Identity.java | 4 - .../cognitiveservices/models/IpRule.java | 7 +- .../models/KeyVaultProperties.java | 4 - .../cognitiveservices/models/MetricName.java | 4 - .../models/ModelDeprecationInfo.java | 72 +++ .../models/NetworkRuleSet.java | 4 - .../models/OperationDisplay.java | 4 - .../models/OperationListResult.java | 4 - .../cognitiveservices/models/Operations.java | 6 +- .../models/PrivateEndpoint.java | 4 - .../PrivateEndpointConnectionProperties.java | 7 +- .../models/PrivateEndpointConnections.java | 12 +- .../models/PrivateLinkResource.java | 4 - .../models/PrivateLinkResourceProperties.java | 4 - .../models/PrivateLinkResources.java | 3 +- .../PrivateLinkServiceConnectionState.java | 4 - .../cognitiveservices/models/QuotaLimit.java | 4 - .../models/RegenerateKeyParameters.java | 7 +- .../models/RequestMatchPattern.java | 4 - .../models/ResourceProviders.java | 4 +- .../models/ResourceSkuListResult.java | 7 +- .../models/ResourceSkuRestrictionInfo.java | 4 - .../models/ResourceSkuRestrictions.java | 4 - .../models/ResourceSkus.java | 6 +- .../cognitiveservices/models/Sku.java | 7 +- .../models/SkuAvailability.java | 4 - .../models/SkuCapability.java | 4 - .../models/SkuChangeInfo.java | 4 - .../models/ThrottlingRule.java | 4 - .../cognitiveservices/models/Usage.java | 4 - .../models/UserAssignedIdentity.java | 4 - .../models/UserOwnedStorage.java | 4 - .../models/VirtualNetworkRule.java | 7 +- .../generated/AccountsCreateSamples.java | 4 +- .../generated/AccountsDeleteSamples.java | 2 +- .../AccountsGetByResourceGroupSamples.java | 2 +- .../AccountsListByResourceGroupSamples.java | 2 +- .../generated/AccountsListKeysSamples.java | 2 +- .../generated/AccountsListModelsSamples.java | 22 + .../generated/AccountsListSamples.java | 2 +- .../generated/AccountsListSkusSamples.java | 2 +- .../generated/AccountsListUsagesSamples.java | 2 +- .../AccountsRegenerateKeySamples.java | 2 +- .../generated/AccountsUpdateSamples.java | 2 +- .../CommitmentPlansCreateOrUpdateSamples.java | 2 +- .../CommitmentPlansDeleteSamples.java | 2 +- .../generated/CommitmentPlansGetSamples.java | 2 +- .../generated/CommitmentPlansListSamples.java | 2 +- .../generated/CommitmentTiersListSamples.java | 2 +- .../generated/DeletedAccountsGetSamples.java | 2 +- .../generated/DeletedAccountsListSamples.java | 2 +- .../DeletedAccountsPurgeSamples.java | 2 +- .../DeploymentsCreateOrUpdateSamples.java | 2 +- .../generated/DeploymentsDeleteSamples.java | 2 +- .../generated/DeploymentsGetSamples.java | 2 +- .../generated/DeploymentsListSamples.java | 2 +- .../generated/OperationsListSamples.java | 2 +- ...pointConnectionsCreateOrUpdateSamples.java | 2 +- ...ivateEndpointConnectionsDeleteSamples.java | 2 +- .../PrivateEndpointConnectionsGetSamples.java | 2 +- ...PrivateEndpointConnectionsListSamples.java | 2 +- .../PrivateLinkResourcesListSamples.java | 2 +- ...roviderCheckDomainAvailabilitySamples.java | 2 +- ...ceProviderCheckSkuAvailabilitySamples.java | 2 +- .../generated/ResourceSkusListSamples.java | 2 +- 144 files changed, 1542 insertions(+), 720 deletions(-) create mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountModelInner.java create mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountModelImpl.java create mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModel.java create mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModelListResult.java create mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelDeprecationInfo.java create mode 100644 sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md index 364e647de323..c1dbac25ae7d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2022-03-10) + +- Azure Resource Manager CognitiveServices client library for Java. This package contains Microsoft Azure SDK for CognitiveServices Management SDK. Cognitive Services Management Client. Package tag package-2022-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/README.md index c8fc74cae8a7..46edaeafaa87 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 tag package-2021-10. 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 tag package-2022-03. 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.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md index 0d297c3d55f0..b24f00e57cb8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/SAMPLE.md @@ -9,6 +9,7 @@ - [List](#accounts_list) - [ListByResourceGroup](#accounts_listbyresourcegroup) - [ListKeys](#accounts_listkeys) +- [ListModels](#accounts_listmodels) - [ListSkus](#accounts_listskus) - [ListUsages](#accounts_listusages) - [RegenerateKey](#accounts_regeneratekey) @@ -77,7 +78,7 @@ import java.util.Arrays; /** Samples for Accounts Create. */ public final class AccountsCreateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CreateAccountMin.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CreateAccountMin.json */ /** * Sample code: Create Account Min. @@ -98,7 +99,7 @@ public final class AccountsCreateSamples { } /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CreateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CreateAccount.json */ /** * Sample code: Create Account. @@ -143,7 +144,7 @@ import com.azure.core.util.Context; /** Samples for Accounts Delete. */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeleteAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeleteAccount.json */ /** * Sample code: Delete Account. @@ -164,7 +165,7 @@ import com.azure.core.util.Context; /** Samples for Accounts GetByResourceGroup. */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetAccount.json */ /** * Sample code: Get Account. @@ -185,7 +186,7 @@ import com.azure.core.util.Context; /** Samples for Accounts List. */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountsBySubscription.json */ /** * Sample code: List Accounts by Subscription. @@ -207,7 +208,7 @@ import com.azure.core.util.Context; /** Samples for Accounts ListByResourceGroup. */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListAccountsByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountsByResourceGroup.json */ /** * Sample code: List Accounts by Resource Group. @@ -229,7 +230,7 @@ import com.azure.core.util.Context; /** Samples for Accounts ListKeys. */ public final class AccountsListKeysSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListKeys.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListKeys.json */ /** * Sample code: List Keys. @@ -242,6 +243,27 @@ public final class AccountsListKeysSamples { } ``` +### Accounts_ListModels + +```java +import com.azure.core.util.Context; + +/** Samples for Accounts ListModels. */ +public final class AccountsListModelsSamples { + /* + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountModels.json + */ + /** + * Sample code: List AccountModels. + * + * @param manager Entry point to CognitiveServicesManager. + */ + public static void listAccountModels(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { + manager.accounts().listModels("resourceGroupName", "accountName", Context.NONE); + } +} +``` + ### Accounts_ListSkus ```java @@ -250,7 +272,7 @@ import com.azure.core.util.Context; /** Samples for Accounts ListSkus. */ public final class AccountsListSkusSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListSkus.json */ /** * Sample code: List SKUs. @@ -271,7 +293,7 @@ import com.azure.core.util.Context; /** Samples for Accounts ListUsages. */ public final class AccountsListUsagesSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetUsages.json */ /** * Sample code: Get Usages. @@ -294,7 +316,7 @@ import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameter /** Samples for Accounts RegenerateKey. */ public final class AccountsRegenerateKeySamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/RegenerateKey.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/RegenerateKey.json */ /** * Sample code: Regenerate Keys. @@ -320,7 +342,7 @@ import com.azure.resourcemanager.cognitiveservices.models.Sku; /** Samples for Accounts Update. */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/UpdateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/UpdateAccount.json */ /** * Sample code: Update Account. @@ -345,7 +367,7 @@ import com.azure.resourcemanager.cognitiveservices.models.HostingModel; /** Samples for CommitmentPlans CreateOrUpdate. */ public final class CommitmentPlansCreateOrUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PutCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PutCommitmentPlan.json */ /** * Sample code: PutCommitmentPlan. @@ -376,7 +398,7 @@ import com.azure.core.util.Context; /** Samples for CommitmentPlans Delete. */ public final class CommitmentPlansDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeleteCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeleteCommitmentPlan.json */ /** * Sample code: DeleteCommitmentPlan. @@ -398,7 +420,7 @@ import com.azure.core.util.Context; /** Samples for CommitmentPlans Get. */ public final class CommitmentPlansGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetCommitmentPlan.json */ /** * Sample code: GetCommitmentPlan. @@ -421,7 +443,7 @@ import com.azure.core.util.Context; /** Samples for CommitmentPlans List. */ public final class CommitmentPlansListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListCommitmentPlans.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListCommitmentPlans.json */ /** * Sample code: ListCommitmentPlans. @@ -443,7 +465,7 @@ import com.azure.core.util.Context; /** Samples for CommitmentTiers List. */ public final class CommitmentTiersListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListCommitmentTiers.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListCommitmentTiers.json */ /** * Sample code: ListCommitmentTiers. @@ -465,7 +487,7 @@ import com.azure.core.util.Context; /** Samples for DeletedAccounts Get. */ public final class DeletedAccountsGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetDeletedAccount.json */ /** * Sample code: Get Account. @@ -486,7 +508,7 @@ import com.azure.core.util.Context; /** Samples for DeletedAccounts List. */ public final class DeletedAccountsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountsBySubscription.json */ /** * Sample code: List Deleted Accounts by Subscription. @@ -508,7 +530,7 @@ import com.azure.core.util.Context; /** Samples for DeletedAccounts Purge. */ public final class DeletedAccountsPurgeSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PurgeDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PurgeDeletedAccount.json */ /** * Sample code: Delete Account. @@ -532,7 +554,7 @@ import com.azure.resourcemanager.cognitiveservices.models.DeploymentScaleType; /** Samples for Deployments CreateOrUpdate. */ public final class DeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PutDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PutDeployment.json */ /** * Sample code: PutDeployment. @@ -562,7 +584,7 @@ import com.azure.core.util.Context; /** Samples for Deployments Delete. */ public final class DeploymentsDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeleteDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeleteDeployment.json */ /** * Sample code: DeleteDeployment. @@ -583,7 +605,7 @@ import com.azure.core.util.Context; /** Samples for Deployments Get. */ public final class DeploymentsGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetDeployment.json */ /** * Sample code: GetDeployment. @@ -604,7 +626,7 @@ import com.azure.core.util.Context; /** Samples for Deployments List. */ public final class DeploymentsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListDeployments.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListDeployments.json */ /** * Sample code: ListDeployments. @@ -625,7 +647,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetOperations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetOperations.json */ /** * Sample code: Get Operations. @@ -648,7 +670,7 @@ import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkServiceConn /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PutPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PutPrivateEndpointConnection.json */ /** * Sample code: PutPrivateEndpointConnection. @@ -680,7 +702,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeletePrivateEndpointConnection.json */ /** * Sample code: DeletePrivateEndpointConnection. @@ -704,7 +726,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetPrivateEndpointConnection.json */ /** * Sample code: GetPrivateEndpointConnection. @@ -728,7 +750,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListPrivateEndpointConnections.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListPrivateEndpointConnections.json */ /** * Sample code: GetPrivateEndpointConnection. @@ -750,7 +772,7 @@ import com.azure.core.util.Context; /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListPrivateLinkResources.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListPrivateLinkResources.json */ /** * Sample code: ListPrivateLinkResources. @@ -773,7 +795,7 @@ import com.azure.resourcemanager.cognitiveservices.models.CheckDomainAvailabilit /** Samples for ResourceProvider CheckDomainAvailability. */ public final class ResourceProviderCheckDomainAvailabilitySamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CheckDomainAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CheckDomainAvailability.json */ /** * Sample code: Check SKU Availability. @@ -803,7 +825,7 @@ import java.util.Arrays; /** Samples for ResourceProvider CheckSkuAvailability. */ public final class ResourceProviderCheckSkuAvailabilitySamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CheckSkuAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CheckSkuAvailability.json */ /** * Sample code: Check SKU Availability. @@ -833,7 +855,7 @@ import com.azure.core.util.Context; /** Samples for ResourceSkus List. */ public final class ResourceSkusListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetSkus.json */ /** * Sample code: Regenerate Keys. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml index 62469ac2e4a3..8b0264afe22d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml @@ -13,7 +13,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 tag package-2021-10. + This package contains Microsoft Azure SDK for CognitiveServices Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Cognitive Services Management Client. Package tag package-2022-03. 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 6a7981bfc3ea..c7f52038c5e9 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 @@ -110,7 +110,7 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -184,9 +184,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -208,7 +210,7 @@ public CognitiveServicesManager authenticate(TokenCredential credential, AzurePr .append("-") .append("com.azure.resourcemanager.cognitiveservices") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") 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 90e20a4f77bd..e5c9fc1f5629 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 @@ -12,6 +12,7 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner; +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.UsageListResultInner; @@ -29,8 +30,8 @@ public interface AccountsClient { * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccountInner> beginCreate( @@ -47,8 +48,8 @@ SyncPoller, AccountInner> beginCreate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccountInner> beginCreate( @@ -96,8 +97,8 @@ SyncPoller, AccountInner> beginCreate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccountInner> beginUpdate( @@ -113,8 +114,8 @@ SyncPoller, AccountInner> beginUpdate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, AccountInner> beginUpdate( @@ -159,7 +160,7 @@ SyncPoller, AccountInner> beginUpdate( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName); @@ -173,7 +174,7 @@ SyncPoller, AccountInner> beginUpdate( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context); @@ -227,7 +228,7 @@ SyncPoller, AccountInner> beginUpdate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -240,7 +241,8 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -253,7 +255,8 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -263,7 +266,8 @@ Response getByResourceGroupWithResponse( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -275,7 +279,8 @@ Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -302,7 +307,7 @@ Response getByResourceGroupWithResponse( * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -331,7 +336,7 @@ Response getByResourceGroupWithResponse( * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response regenerateKeyWithResponse( @@ -359,7 +364,7 @@ Response regenerateKeyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listSkusWithResponse( @@ -389,9 +394,38 @@ Response listSkusWithResponse( * @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 usages for the requested Cognitive Services account. + * @return usages for the requested Cognitive Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listUsagesWithResponse( String resourceGroupName, String accountName, String filter, Context context); + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listModels(String resourceGroupName, String accountName); + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listModels(String resourceGroupName, String accountName, Context context); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentPlansClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentPlansClient.java index a0686e903ff5..26a8e2e58bc5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentPlansClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentPlansClient.java @@ -23,7 +23,8 @@ public interface CommitmentPlansClient { * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -37,7 +38,8 @@ public interface CommitmentPlansClient { * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -66,7 +68,7 @@ public interface CommitmentPlansClient { * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -99,7 +101,7 @@ CommitmentPlanInner createOrUpdate( * @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 commitment plan. + * @return cognitive Services account commitment plan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( @@ -118,7 +120,7 @@ Response createOrUpdateWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -134,7 +136,7 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentTiersClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentTiersClient.java index e4353141bbe7..eeda9b8a07ce 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentTiersClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/CommitmentTiersClient.java @@ -19,7 +19,8 @@ public interface CommitmentTiersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String location); @@ -32,7 +33,8 @@ public interface CommitmentTiersClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response 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/DeletedAccountsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java index c44ab1375c78..e4244b53ddd2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeletedAccountsClient.java @@ -41,7 +41,7 @@ public interface DeletedAccountsClient { * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -56,7 +56,7 @@ Response getWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginPurge(String location, String resourceGroupName, String accountName); @@ -71,7 +71,7 @@ Response getWithResponse( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginPurge( @@ -109,7 +109,8 @@ SyncPoller, Void> beginPurge( * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -121,7 +122,8 @@ SyncPoller, Void> beginPurge( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeploymentsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeploymentsClient.java index f416c7dcf3b4..b45819e9410c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeploymentsClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/DeploymentsClient.java @@ -23,7 +23,8 @@ public interface DeploymentsClient { * @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 deployments associated with the Cognitive Services account. + * @return the deployments associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -37,7 +38,8 @@ public interface DeploymentsClient { * @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 deployments associated with the Cognitive Services account. + * @return the 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); @@ -66,7 +68,7 @@ public interface DeploymentsClient { * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments associated with the Cognitive Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -82,7 +84,7 @@ Response getWithResponse( * @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 deployment. + * @return the {@link SyncPoller} for polling of cognitive Services account deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DeploymentInner> beginCreateOrUpdate( @@ -99,7 +101,7 @@ SyncPoller, DeploymentInner> beginCreateOrUpdate( * @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 deployment. + * @return the {@link SyncPoller} for polling of cognitive Services account deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DeploymentInner> beginCreateOrUpdate( @@ -155,7 +157,7 @@ DeploymentInner createOrUpdate( * @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 completion. + * @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); @@ -170,7 +172,7 @@ DeploymentInner createOrUpdate( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OperationsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OperationsClient.java index a5d3fcd426a8..0bdaa8ee4162 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OperationsClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/OperationsClient.java @@ -17,7 +17,8 @@ public interface OperationsClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface OperationsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java index cbc670b56a7b..9c4f11d7fcdc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateEndpointConnectionsClient.java @@ -37,7 +37,8 @@ public interface PrivateEndpointConnectionsClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connections associated with the Cognitive Services account. + * @return the private endpoint connections associated with the Cognitive Services account along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( @@ -70,7 +71,8 @@ PrivateEndpointConnectionInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -87,7 +89,7 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -108,7 +110,7 @@ SyncPoller, PrivateEndpointConnection * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -170,7 +172,7 @@ PrivateEndpointConnectionInner createOrUpdate( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( @@ -187,7 +189,7 @@ SyncPoller, Void> beginDelete( * @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 completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateLinkResourcesClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateLinkResourcesClient.java index e1364b14dff0..01b170e1d560 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateLinkResourcesClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/PrivateLinkResourcesClient.java @@ -34,7 +34,8 @@ public interface PrivateLinkResourcesClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Cognitive Services account. + * @return the private link resources that need to be created for a Cognitive Services account along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response listWithResponse( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceProvidersClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceProvidersClient.java index 2acb2d576970..c1d9a7d64c4e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceProvidersClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceProvidersClient.java @@ -37,7 +37,7 @@ public interface ResourceProvidersClient { * @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 check SKU availability result list. + * @return check SKU availability result list along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkSkuAvailabilityWithResponse( @@ -63,7 +63,7 @@ Response checkSkuAvailabilityWithResponse( * @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 domain availability. + * @return domain availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkDomainAvailabilityWithResponse( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java index 10fc189c75f8..9fc0824b91ae 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/ResourceSkusClient.java @@ -17,7 +17,8 @@ public interface ResourceSkusClient { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +30,8 @@ public interface ResourceSkusClient { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java index d339cb7a759c..999e75d1c79d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountInner.java @@ -6,12 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.AccountProperties; import com.azure.resourcemanager.cognitiveservices.models.AzureEntityResource; import com.azure.resourcemanager.cognitiveservices.models.Identity; import com.azure.resourcemanager.cognitiveservices.models.Sku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -21,8 +19,6 @@ */ @Fluent public final class AccountInner extends AzureEntityResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountInner.class); - /* * The Kind of the resource. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountModelInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountModelInner.java new file mode 100644 index 000000000000..32eaf7e73aa0 --- /dev/null +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountModelInner.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cognitiveservices.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.cognitiveservices.models.DeploymentModel; +import com.azure.resourcemanager.cognitiveservices.models.ModelDeprecationInfo; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Cognitive Services account Model. */ +@Fluent +public final class AccountModelInner extends DeploymentModel { + /* + * Base Model Identifier. + */ + @JsonProperty(value = "baseModel") + private DeploymentModel baseModel; + + /* + * The max capacity. + */ + @JsonProperty(value = "maxCapacity") + private Integer maxCapacity; + + /* + * The capabilities. + */ + @JsonProperty(value = "capabilities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map capabilities; + + /* + * Cognitive Services account ModelDeprecationInfo. + */ + @JsonProperty(value = "deprecation") + private ModelDeprecationInfo deprecation; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the baseModel property: Base Model Identifier. + * + * @return the baseModel value. + */ + public DeploymentModel baseModel() { + return this.baseModel; + } + + /** + * Set the baseModel property: Base Model Identifier. + * + * @param baseModel the baseModel value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withBaseModel(DeploymentModel baseModel) { + this.baseModel = baseModel; + return this; + } + + /** + * Get the maxCapacity property: The max capacity. + * + * @return the maxCapacity value. + */ + public Integer maxCapacity() { + return this.maxCapacity; + } + + /** + * Set the maxCapacity property: The max capacity. + * + * @param maxCapacity the maxCapacity value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withMaxCapacity(Integer maxCapacity) { + this.maxCapacity = maxCapacity; + return this; + } + + /** + * Get the capabilities property: The capabilities. + * + * @return the capabilities value. + */ + public Map capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: The capabilities. + * + * @param capabilities the capabilities value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withCapabilities(Map capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Get the deprecation property: Cognitive Services account ModelDeprecationInfo. + * + * @return the deprecation value. + */ + public ModelDeprecationInfo deprecation() { + return this.deprecation; + } + + /** + * Set the deprecation property: Cognitive Services account ModelDeprecationInfo. + * + * @param deprecation the deprecation value to set. + * @return the AccountModelInner object itself. + */ + public AccountModelInner withDeprecation(ModelDeprecationInfo deprecation) { + this.deprecation = deprecation; + return this; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** {@inheritDoc} */ + @Override + public AccountModelInner withFormat(String format) { + super.withFormat(format); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccountModelInner withName(String name) { + super.withName(name); + return this; + } + + /** {@inheritDoc} */ + @Override + public AccountModelInner withVersion(String version) { + super.withVersion(version); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (baseModel() != null) { + baseModel().validate(); + } + if (deprecation() != null) { + deprecation().validate(); + } + } +} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountSkuListResultInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountSkuListResultInner.java index 80db47d277a6..60c70bb36a81 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountSkuListResultInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/AccountSkuListResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.AccountSku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of cognitive services accounts operation response. */ @Fluent public final class AccountSkuListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountSkuListResultInner.class); - /* * Gets the list of Cognitive Services accounts and their properties. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ApiKeysInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ApiKeysInner.java index ceb49fecbedf..0c2e41e136b8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ApiKeysInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ApiKeysInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The access keys for the cognitive services account. */ @Fluent public final class ApiKeysInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiKeysInner.class); - /* * Gets the value of key 1. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanInner.java index 67e62b565900..0fc131a579ae 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentPlanInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.CommitmentPlanProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cognitive Services account commitment plan. */ @Fluent public final class CommitmentPlanInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentPlanInner.class); - /* * Metadata pertaining to creation and last modification of the resource. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentTierInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentTierInner.java index f26ad978393d..5a88e4b5f045 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentTierInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/CommitmentTierInner.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.CommitmentCost; import com.azure.resourcemanager.cognitiveservices.models.CommitmentQuota; import com.azure.resourcemanager.cognitiveservices.models.HostingModel; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cognitive Services account commitment tier. */ @Fluent public final class CommitmentTierInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentTierInner.class); - /* * The Kind of the resource. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DeploymentInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DeploymentInner.java index 6e4513153a3b..bd4767a2e454 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DeploymentInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DeploymentInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.DeploymentProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cognitive Services account deployment. */ @Fluent public final class DeploymentInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentInner.class); - /* * Metadata pertaining to creation and last modification of the resource. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DomainAvailabilityInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DomainAvailabilityInner.java index aef005ff0c7a..f08b594d88b5 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DomainAvailabilityInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/DomainAvailabilityInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Domain availability. */ @Fluent public final class DomainAvailabilityInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainAvailabilityInner.class); - /* * Indicates the given SKU is available or not. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java index 615f640bd692..d316853abf2c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/OperationInner.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.ActionType; import com.azure.resourcemanager.cognitiveservices.models.OperationDisplay; import com.azure.resourcemanager.cognitiveservices.models.Origin; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* * The name of the operation, as per Resource-Based Access Control (RBAC). * Examples: "Microsoft.Compute/virtualMachines/write", diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionInner.java index 3478d33e7e15..98be6fcdd894 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionInner.java @@ -6,17 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.AzureEntityResource; import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Private Endpoint Connection resource. */ @Fluent public final class PrivateEndpointConnectionInner extends AzureEntityResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); - /* * Resource properties. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionListResultInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionListResultInner.java index cc520ba18b45..73392c701298 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionListResultInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateEndpointConnectionListResultInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of private endpoint connections. */ @Fluent public final class PrivateEndpointConnectionListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionListResultInner.class); - /* * Array of private endpoint connections */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateLinkResourceListResultInner.java index b37eb70f003f..814f883733c0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateLinkResourceListResultInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/PrivateLinkResourceListResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResource; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A list of private link resources. */ @Fluent public final class PrivateLinkResourceListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceListResultInner.class); - /* * Array of private link resources */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ResourceSkuInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ResourceSkuInner.java index 908e194677fa..36df2bd2b0cd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ResourceSkuInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/ResourceSkuInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.ResourceSkuRestrictions; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes an available Cognitive Services SKU. */ @Fluent public final class ResourceSkuInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuInner.class); - /* * The type of resource the SKU applies to. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuAvailabilityListResultInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuAvailabilityListResultInner.java index c57bbce8d187..87698d378389 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuAvailabilityListResultInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/SkuAvailabilityListResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.SkuAvailability; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Check SKU availability result list. */ @Fluent public final class SkuAvailabilityListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuAvailabilityListResultInner.class); - /* * Check SKU availability result list. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageListResultInner.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageListResultInner.java index 017dc4884447..9ba561e2f56c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageListResultInner.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/fluent/models/UsageListResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.models.Usage; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The response to a list usage request. */ @Fluent public final class UsageListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageListResultInner.class); - /* * The list of usages for Cognitive Service account. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountModelImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountModelImpl.java new file mode 100644 index 000000000000..72c7c76dafde --- /dev/null +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountModelImpl.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cognitiveservices.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner; +import com.azure.resourcemanager.cognitiveservices.models.AccountModel; +import com.azure.resourcemanager.cognitiveservices.models.DeploymentModel; +import com.azure.resourcemanager.cognitiveservices.models.ModelDeprecationInfo; +import java.util.Collections; +import java.util.Map; + +public final class AccountModelImpl implements AccountModel { + private AccountModelInner innerObject; + + private final com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager; + + AccountModelImpl( + AccountModelInner innerObject, + com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String format() { + return this.innerModel().format(); + } + + public String name() { + return this.innerModel().name(); + } + + public String version() { + return this.innerModel().version(); + } + + public DeploymentModel baseModel() { + return this.innerModel().baseModel(); + } + + public Integer maxCapacity() { + return this.innerModel().maxCapacity(); + } + + public Map capabilities() { + Map inner = this.innerModel().capabilities(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ModelDeprecationInfo deprecation() { + return this.innerModel().deprecation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AccountModelInner 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/AccountsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java index a593c083f264..e7b31e729983 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 @@ -31,15 +31,16 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner; +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.UsageListResultInner; import com.azure.resourcemanager.cognitiveservices.models.AccountListResult; +import com.azure.resourcemanager.cognitiveservices.models.AccountModelListResult; import com.azure.resourcemanager.cognitiveservices.models.RegenerateKeyParameters; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -47,8 +48,6 @@ /** An instance of this class provides access to all the operations defined in AccountsClient. */ public final class AccountsClientImpl implements AccountsClient { - private final ClientLogger logger = new ClientLogger(AccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AccountsService service; @@ -221,6 +220,21 @@ Mono> listUsages( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices" + + "/accounts/{accountName}/models") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listModels( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("accountName") String accountName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -240,6 +254,16 @@ Mono> listNext( @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listModelsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -253,7 +277,7 @@ Mono> listNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -311,7 +335,7 @@ private Mono>> createWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -364,8 +388,8 @@ private Mono>> createWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link PollerFlux} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AccountInner> beginCreateAsync( @@ -374,7 +398,7 @@ private PollerFlux, AccountInner> beginCreateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), AccountInner.class, AccountInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), AccountInner.class, AccountInner.class, this.client.getContext()); } /** @@ -388,8 +412,8 @@ private PollerFlux, AccountInner> beginCreateAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link PollerFlux} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AccountInner> beginCreateAsync( @@ -413,8 +437,8 @@ private PollerFlux, AccountInner> beginCreateAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccountInner> beginCreate( @@ -433,8 +457,8 @@ public SyncPoller, AccountInner> beginCreate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccountInner> beginCreate( @@ -453,7 +477,7 @@ public SyncPoller, AccountInner> beginCreate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String accountName, AccountInner account) { @@ -474,7 +498,7 @@ private Mono createAsync(String resourceGroupName, String accountN * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -531,7 +555,7 @@ public AccountInner create(String resourceGroupName, String accountName, Account * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -588,7 +612,7 @@ private Mono>> updateWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -640,8 +664,8 @@ private Mono>> updateWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link PollerFlux} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AccountInner> beginUpdateAsync( @@ -650,7 +674,7 @@ private PollerFlux, AccountInner> beginUpdateAsync( return this .client .getLroResult( - mono, this.client.getHttpPipeline(), AccountInner.class, AccountInner.class, Context.NONE); + mono, this.client.getHttpPipeline(), AccountInner.class, AccountInner.class, this.client.getContext()); } /** @@ -663,8 +687,8 @@ private PollerFlux, AccountInner> beginUpdateAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link PollerFlux} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, AccountInner> beginUpdateAsync( @@ -687,8 +711,8 @@ private PollerFlux, AccountInner> beginUpdateAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccountInner> beginUpdate( @@ -706,8 +730,8 @@ public SyncPoller, AccountInner> beginUpdate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * @return the {@link SyncPoller} for polling of cognitive Services account is an Azure resource representing the + * provisioned account, it's type, location and SKU. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, AccountInner> beginUpdate( @@ -725,7 +749,7 @@ public SyncPoller, AccountInner> beginUpdate( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String accountName, AccountInner account) { @@ -745,7 +769,7 @@ private Mono updateAsync(String resourceGroupName, String accountN * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -798,7 +822,7 @@ public AccountInner update(String resourceGroupName, String accountName, 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 completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName) { @@ -846,7 +870,7 @@ private Mono>> deleteWithResponseAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -891,14 +915,15 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -910,7 +935,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -930,7 +955,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { @@ -946,7 +971,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -962,7 +987,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName) { @@ -978,7 +1003,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, Context context) { @@ -1025,7 +1050,7 @@ public void delete(String resourceGroupName, String accountName, Context context * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1075,7 +1100,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1121,7 +1146,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { @@ -1162,7 +1187,7 @@ public AccountInner getByResourceGroup(String resourceGroupName, String accountN * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1177,7 +1202,8 @@ public Response getByResourceGroupWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1229,7 +1255,8 @@ private Mono> listByResourceGroupSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1278,7 +1305,7 @@ private Mono> listByResourceGroupSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1295,7 +1322,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1311,7 +1338,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1326,7 +1354,8 @@ public PagedIterable listByResourceGroup(String resourceGroupName) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1338,7 +1367,8 @@ public PagedIterable listByResourceGroup(String resourceGroupName, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1384,7 +1414,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1425,7 +1456,7 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1439,7 +1470,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1452,7 +1483,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1466,7 +1498,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1481,7 +1514,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync(String resourceGroupName, String accountName) { @@ -1529,7 +1563,8 @@ private Mono> listKeysWithResponseAsync(String resourceGr * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listKeysWithResponseAsync( @@ -1574,7 +1609,7 @@ private Mono> listKeysWithResponseAsync( * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listKeysAsync(String resourceGroupName, String accountName) { @@ -1613,7 +1648,7 @@ public ApiKeysInner listKeys(String resourceGroupName, String accountName) { * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listKeysWithResponse(String resourceGroupName, String accountName, Context context) { @@ -1629,7 +1664,8 @@ public Response listKeysWithResponse(String resourceGroupName, Str * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeyWithResponseAsync( @@ -1685,7 +1721,8 @@ private Mono> regenerateKeyWithResponseAsync( * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeyWithResponseAsync( @@ -1737,7 +1774,7 @@ private Mono> regenerateKeyWithResponseAsync( * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono regenerateKeyAsync( @@ -1780,7 +1817,7 @@ public ApiKeysInner regenerateKey( * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse( @@ -1796,7 +1833,8 @@ public Response regenerateKeyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusWithResponseAsync( @@ -1845,7 +1883,8 @@ private Mono> listSkusWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSkusWithResponseAsync( @@ -1890,7 +1929,7 @@ private Mono> listSkusWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listSkusAsync(String resourceGroupName, String accountName) { @@ -1929,7 +1968,7 @@ public AccountSkuListResultInner listSkus(String resourceGroupName, String accou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listSkusWithResponse( @@ -1947,7 +1986,8 @@ public Response listSkusWithResponse( * @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 usages for the requested Cognitive Services account. + * @return usages for the requested Cognitive Services account along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listUsagesWithResponseAsync( @@ -1999,7 +2039,8 @@ private Mono> listUsagesWithResponseAsync( * @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 usages for the requested Cognitive Services account. + * @return usages for the requested Cognitive Services account along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listUsagesWithResponseAsync( @@ -2047,7 +2088,7 @@ private Mono> listUsagesWithResponseAsync( * @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 usages for the requested Cognitive Services account. + * @return usages for the requested Cognitive Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listUsagesAsync(String resourceGroupName, String accountName, String filter) { @@ -2070,7 +2111,7 @@ private Mono listUsagesAsync(String resourceGroupName, Str * @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 usages for the requested Cognitive Services account. + * @return usages for the requested Cognitive Services account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listUsagesAsync(String resourceGroupName, String accountName) { @@ -2113,7 +2154,7 @@ public UsageListResultInner listUsages(String resourceGroupName, String accountN * @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 usages for the requested Cognitive Services account. + * @return usages for the requested Cognitive Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listUsagesWithResponse( @@ -2121,6 +2162,189 @@ public Response listUsagesWithResponse( return listUsagesWithResponseAsync(resourceGroupName, accountName, filter, context).block(); } + /** + * List available Models for the requested 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 list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listModelsSinglePageAsync( + String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listModels( + this.client.getEndpoint(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listModelsSinglePageAsync( + String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listModels( + this.client.getEndpoint(), + resourceGroupName, + accountName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listModelsAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>( + () -> listModelsSinglePageAsync(resourceGroupName, accountName), + nextLink -> listModelsNextSinglePageAsync(nextLink)); + } + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listModelsAsync( + String resourceGroupName, String accountName, Context context) { + return new PagedFlux<>( + () -> listModelsSinglePageAsync(resourceGroupName, accountName, context), + nextLink -> listModelsNextSinglePageAsync(nextLink, context)); + } + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listModels(String resourceGroupName, String accountName) { + return new PagedIterable<>(listModelsAsync(resourceGroupName, accountName)); + } + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listModels(String resourceGroupName, String accountName, Context context) { + return new PagedIterable<>(listModelsAsync(resourceGroupName, accountName, context)); + } + /** * Get the next page of items. * @@ -2128,7 +2352,8 @@ public Response listUsagesWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2165,7 +2390,8 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -2200,7 +2426,8 @@ private Mono> listByResourceGroupNextSinglePageAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2236,7 +2463,8 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2263,4 +2491,77 @@ private Mono> listNextSinglePageAsync(String nextLin res.getValue().nextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listModelsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listModelsNext(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 nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listModelsNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listModelsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + 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/AccountsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsImpl.java index 6088dcbae9f5..e1e6acbd65fb 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 @@ -11,19 +11,20 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.AccountsClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner; +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.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.RegenerateKeyParameters; import com.azure.resourcemanager.cognitiveservices.models.UsageListResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AccountsImpl implements Accounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AccountsImpl.class); private final AccountsClient innerClient; @@ -183,10 +184,21 @@ public Response listUsagesWithResponse( } } + public PagedIterable listModels(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().listModels(resourceGroupName, accountName); + return Utils.mapPage(inner, inner1 -> new AccountModelImpl(inner1, this.manager())); + } + + public PagedIterable listModels(String resourceGroupName, String accountName, Context context) { + PagedIterable inner = + this.serviceClient().listModels(resourceGroupName, accountName, context); + return Utils.mapPage(inner, inner1 -> new AccountModelImpl(inner1, this.manager())); + } + public Account getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -194,7 +206,7 @@ public Account getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); @@ -205,7 +217,7 @@ public Account getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -213,7 +225,7 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); @@ -224,7 +236,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -232,7 +244,7 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); @@ -243,7 +255,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -251,7 +263,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); 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 c54b51ca85ad..51b24a60de14 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 @@ -45,8 +45,6 @@ /** Initializes a new instance of the CognitiveServicesManagementClientImpl type. */ @ServiceClient(builder = CognitiveServicesManagementClientBuilder.class) public final class CognitiveServicesManagementClientImpl implements CognitiveServicesManagementClient { - private final ClientLogger logger = new ClientLogger(CognitiveServicesManagementClientImpl.class); - /** The ID of the target subscription. */ private final String subscriptionId; @@ -261,7 +259,7 @@ public CommitmentPlansClient getCommitmentPlans() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-10-01"; + this.apiVersion = "2022-03-01"; this.accounts = new AccountsClientImpl(this); this.deletedAccounts = new DeletedAccountsClientImpl(this); this.resourceSkus = new ResourceSkusClientImpl(this); @@ -357,7 +355,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -416,4 +414,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(CognitiveServicesManagementClientImpl.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansClientImpl.java index 46a1cf59b4f1..49cda72737ad 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.CommitmentPlansClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in CommitmentPlansClient. */ public final class CommitmentPlansClientImpl implements CommitmentPlansClient { - private final ClientLogger logger = new ClientLogger(CommitmentPlansClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CommitmentPlansService service; @@ -150,7 +147,8 @@ Mono> listNext( * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans 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) { @@ -207,7 +205,8 @@ private Mono> listSinglePageAsync(String reso * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -261,7 +260,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -278,7 +278,8 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { @@ -295,7 +296,8 @@ private PagedFlux listAsync(String resourceGroupName, Strin * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -311,7 +313,8 @@ public PagedIterable list(String resourceGroupName, String * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans 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) { @@ -327,7 +330,8 @@ public PagedIterable list(String resourceGroupName, String * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -382,7 +386,8 @@ private Mono> getWithResponseAsync( * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -433,7 +438,8 @@ private Mono> getWithResponseAsync( * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -475,7 +481,7 @@ public CommitmentPlanInner get(String resourceGroupName, String accountName, Str * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -493,7 +499,8 @@ public Response getWithResponse( * @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 commitment plan. + * @return cognitive Services account commitment plan along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -555,7 +562,8 @@ private Mono> createOrUpdateWithResponseAsync( * @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 commitment plan. + * @return cognitive Services account commitment plan along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( @@ -617,7 +625,7 @@ private Mono> createOrUpdateWithResponseAsync( * @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 commitment plan. + * @return cognitive Services account commitment plan on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -662,7 +670,7 @@ public CommitmentPlanInner createOrUpdate( * @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 commitment plan. + * @return cognitive Services account commitment plan along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( @@ -685,7 +693,7 @@ public Response createOrUpdateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -740,7 +748,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -791,7 +799,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -800,7 +808,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, accountName, commitmentPlanName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -813,7 +822,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -835,7 +844,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -853,7 +862,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -870,7 +879,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String commitmentPlanName) { @@ -889,7 +898,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -937,7 +946,8 @@ public void delete(String resourceGroupName, String accountName, String commitme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -973,7 +983,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansImpl.java index 188b68b826ef..631772805c88 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentPlansImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanInner; import com.azure.resourcemanager.cognitiveservices.models.CommitmentPlan; import com.azure.resourcemanager.cognitiveservices.models.CommitmentPlans; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CommitmentPlansImpl implements CommitmentPlans { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentPlansImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CommitmentPlansImpl.class); private final CommitmentPlansClient innerClient; @@ -74,7 +73,7 @@ public void delete(String resourceGroupName, String accountName, String commitme public CommitmentPlan getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -82,14 +81,14 @@ public CommitmentPlan getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String commitmentPlanName = Utils.getValueFromIdByName(id, "commitmentPlans"); if (commitmentPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -101,7 +100,7 @@ public CommitmentPlan getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -109,14 +108,14 @@ public Response getByIdWithResponse(String id, Context context) } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String commitmentPlanName = Utils.getValueFromIdByName(id, "commitmentPlans"); if (commitmentPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -128,7 +127,7 @@ public Response getByIdWithResponse(String id, Context context) public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -136,14 +135,14 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String commitmentPlanName = Utils.getValueFromIdByName(id, "commitmentPlans"); if (commitmentPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -155,7 +154,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -163,14 +162,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String commitmentPlanName = Utils.getValueFromIdByName(id, "commitmentPlans"); if (commitmentPlanName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersClientImpl.java index 4c64101cda12..f943824c261d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.CommitmentTiersClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentTierInner; import com.azure.resourcemanager.cognitiveservices.models.CommitmentTierListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in CommitmentTiersClient. */ public final class CommitmentTiersClientImpl implements CommitmentTiersClient { - private final ClientLogger logger = new ClientLogger(CommitmentTiersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final CommitmentTiersService service; @@ -91,7 +88,8 @@ Mono> listNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location) { @@ -142,7 +140,8 @@ private Mono> listSinglePageAsync(String loca * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String location, Context context) { @@ -189,7 +188,7 @@ private Mono> listSinglePageAsync(String loca * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location) { @@ -204,7 +203,7 @@ private PagedFlux listAsync(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String location, Context context) { @@ -219,7 +218,8 @@ private PagedFlux listAsync(String location, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location) { @@ -234,7 +234,8 @@ public PagedIterable list(String location) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String location, Context context) { @@ -248,7 +249,8 @@ public PagedIterable list(String location, Context context) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -284,7 +286,8 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersImpl.java index 7b8aefbb5b4c..5c324f1da224 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/CommitmentTiersImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentTierInner; import com.azure.resourcemanager.cognitiveservices.models.CommitmentTier; import com.azure.resourcemanager.cognitiveservices.models.CommitmentTiers; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class CommitmentTiersImpl implements CommitmentTiers { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentTiersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(CommitmentTiersImpl.class); private final CommitmentTiersClient innerClient; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java index 26844c4edd94..2f81277e53d2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsClientImpl.java @@ -27,7 +27,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.DeletedAccountsClient; @@ -39,8 +38,6 @@ /** An instance of this class provides access to all the operations defined in DeletedAccountsClient. */ public final class DeletedAccountsClientImpl implements DeletedAccountsClient { - private final ClientLogger logger = new ClientLogger(DeletedAccountsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DeletedAccountsService service; @@ -129,7 +126,7 @@ Mono> listNext( * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return cognitive Services account is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -184,7 +181,7 @@ private Mono> getWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -235,7 +232,7 @@ private Mono> getWithResponseAsync( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String resourceGroupName, String accountName) { @@ -278,7 +275,7 @@ public AccountInner get(String location, String resourceGroupName, String accoun * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -295,7 +292,7 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> purgeWithResponseAsync( @@ -349,7 +346,7 @@ private Mono>> purgeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> purgeWithResponseAsync( @@ -399,7 +396,7 @@ private Mono>> purgeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPurgeAsync( @@ -407,7 +404,8 @@ private PollerFlux, Void> beginPurgeAsync( Mono>> mono = purgeWithResponseAsync(location, resourceGroupName, accountName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -420,7 +418,7 @@ private PollerFlux, Void> beginPurgeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginPurgeAsync( @@ -442,7 +440,7 @@ private PollerFlux, Void> beginPurgeAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPurge( @@ -460,7 +458,7 @@ public SyncPoller, Void> beginPurge( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginPurge( @@ -477,7 +475,7 @@ public SyncPoller, Void> beginPurge( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono purgeAsync(String location, String resourceGroupName, String accountName) { @@ -496,7 +494,7 @@ private Mono purgeAsync(String location, String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono purgeAsync(String location, String resourceGroupName, String accountName, Context context) { @@ -541,7 +539,8 @@ public void purge(String location, String resourceGroupName, String accountName, * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -587,7 +586,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -628,7 +628,7 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -642,7 +642,7 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -655,7 +655,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -669,7 +670,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -683,7 +685,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -719,7 +722,8 @@ private Mono> listNextSinglePageAsync(String nextLin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsImpl.java index deceaf7ca4f9..4d048f67d86c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeletedAccountsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner; import com.azure.resourcemanager.cognitiveservices.models.Account; import com.azure.resourcemanager.cognitiveservices.models.DeletedAccounts; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DeletedAccountsImpl implements DeletedAccounts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedAccountsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DeletedAccountsImpl.class); private final DeletedAccountsClient innerClient; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsClientImpl.java index 6e7529b03b6d..4955cce362b8 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.DeploymentsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in DeploymentsClient. */ public final class DeploymentsClientImpl implements DeploymentsClient { - private final ClientLogger logger = new ClientLogger(DeploymentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DeploymentsService service; @@ -150,7 +147,8 @@ Mono> listNext( * @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 deployments associated with the Cognitive Services account. + * @return the deployments 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) { @@ -207,7 +205,8 @@ private Mono> listSinglePageAsync(String resource * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the deployments associated with the Cognitive Services account. + * @return the deployments associated with the Cognitive Services account along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -261,7 +260,8 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the deployments associated with the Cognitive Services account. + * @return the deployments associated with the Cognitive Services account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -278,7 +278,8 @@ private PagedFlux listAsync(String resourceGroupName, String ac * @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 deployments associated with the Cognitive Services account. + * @return the deployments associated with the Cognitive Services account as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, Context context) { @@ -295,7 +296,8 @@ private PagedFlux listAsync(String resourceGroupName, String ac * @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 deployments associated with the Cognitive Services account. + * @return the deployments associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -311,7 +313,8 @@ public PagedIterable list(String resourceGroupName, String acco * @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 deployments associated with the Cognitive Services account. + * @return the deployments 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) { @@ -327,7 +330,8 @@ public PagedIterable list(String resourceGroupName, String acco * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments associated with the Cognitive Services account along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -381,7 +385,8 @@ private Mono> getWithResponseAsync( * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments associated with the Cognitive Services account along with {@link Response} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -431,7 +436,8 @@ private Mono> getWithResponseAsync( * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments 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) { @@ -472,7 +478,7 @@ public DeploymentInner get(String resourceGroupName, String accountName, String * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments associated with the Cognitive Services account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -490,7 +496,8 @@ public Response getWithResponse( * @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 deployment. + * @return cognitive Services account deployment along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -551,7 +558,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 deployment. + * @return cognitive Services account deployment along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -612,7 +620,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 deployment. + * @return the {@link PollerFlux} for polling of cognitive Services account deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeploymentInner> beginCreateOrUpdateAsync( @@ -622,7 +630,11 @@ private PollerFlux, DeploymentInner> beginCreateOrUp return this .client .getLroResult( - mono, this.client.getHttpPipeline(), DeploymentInner.class, DeploymentInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + DeploymentInner.class, + DeploymentInner.class, + this.client.getContext()); } /** @@ -636,7 +648,7 @@ private PollerFlux, DeploymentInner> beginCreateOrUp * @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 deployment. + * @return the {@link PollerFlux} for polling of cognitive Services account deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DeploymentInner> beginCreateOrUpdateAsync( @@ -664,7 +676,7 @@ private PollerFlux, DeploymentInner> beginCreateOrUp * @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 deployment. + * @return the {@link SyncPoller} for polling of cognitive Services account deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DeploymentInner> beginCreateOrUpdate( @@ -683,7 +695,7 @@ public SyncPoller, DeploymentInner> beginCreateOrUpd * @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 deployment. + * @return the {@link SyncPoller} for polling of cognitive Services account deployment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DeploymentInner> beginCreateOrUpdate( @@ -706,7 +718,7 @@ public SyncPoller, DeploymentInner> beginCreateOrUpd * @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 deployment. + * @return cognitive Services account deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -727,7 +739,7 @@ private Mono createOrUpdateAsync( * @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 deployment. + * @return cognitive Services account deployment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -791,7 +803,7 @@ public DeploymentInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -845,7 +857,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -895,7 +907,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -903,7 +915,8 @@ private PollerFlux, Void> beginDeleteAsync( Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, deploymentName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -916,7 +929,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -938,7 +951,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -956,7 +969,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -973,7 +986,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String deploymentName) { @@ -992,7 +1005,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -1040,7 +1053,8 @@ public void delete(String resourceGroupName, String accountName, String deployme * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1076,7 +1090,8 @@ private Mono> listNextSinglePageAsync(String next * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsImpl.java index 0a2c54b56756..4897b2b7e0d7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/DeploymentsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.DeploymentInner; import com.azure.resourcemanager.cognitiveservices.models.Deployment; import com.azure.resourcemanager.cognitiveservices.models.Deployments; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DeploymentsImpl implements Deployments { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DeploymentsImpl.class); private final DeploymentsClient innerClient; @@ -74,7 +73,7 @@ public void delete(String resourceGroupName, String accountName, String deployme public Deployment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -82,14 +81,14 @@ public Deployment getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); @@ -100,7 +99,7 @@ public Deployment getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -108,14 +107,14 @@ public Response getByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); @@ -126,7 +125,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -134,14 +133,14 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); @@ -152,7 +151,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -160,14 +159,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String deploymentName = Utils.getValueFromIdByName(id, "deployments"); if (deploymentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsClientImpl.java index d89112926d7f..8c684ffe5c58 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.OperationsClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.OperationInner; import com.azure.resourcemanager.cognitiveservices.models.OperationListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -85,7 +82,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +116,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +147,8 @@ private Mono> listSinglePageAsync(Context context) * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +162,8 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +176,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +191,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +206,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +243,8 @@ private Mono> listNextSinglePageAsync(String nextL * @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 list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsImpl.java index 74aa90ffdba2..5c06e7ae7d67 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.OperationInner; import com.azure.resourcemanager.cognitiveservices.models.Operation; import com.azure.resourcemanager.cognitiveservices.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java index 20aacf0b0c77..db2282ab4754 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.PrivateEndpointConnectionsClient; @@ -37,8 +36,6 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateEndpointConnectionsService service; @@ -138,7 +135,8 @@ Mono>> delete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connections associated with the Cognitive Services account. + * @return the private endpoint connections associated with the Cognitive Services account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -187,7 +185,8 @@ private Mono> listWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connections associated with the Cognitive Services account. + * @return the private endpoint connections associated with the Cognitive Services account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -232,7 +231,8 @@ private Mono> listWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connections associated with the Cognitive Services account. + * @return the private endpoint connections associated with the Cognitive Services account on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String accountName) { @@ -271,7 +271,8 @@ public PrivateEndpointConnectionListResultInner list(String resourceGroupName, S * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connections associated with the Cognitive Services account. + * @return the private endpoint connections associated with the Cognitive Services account along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( @@ -289,7 +290,8 @@ public Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -347,7 +349,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -401,7 +404,8 @@ private Mono> getWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -446,7 +450,8 @@ public PrivateEndpointConnectionInner get( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -465,7 +470,8 @@ public Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -533,7 +539,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( @@ -598,7 +605,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the {@link PollerFlux} for polling of the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> @@ -616,7 +623,7 @@ private Mono>> createOrUpdateWithResponseAsync( this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -631,7 +638,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the {@link PollerFlux} for polling of the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> @@ -666,7 +673,7 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -690,7 +697,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( @@ -715,7 +722,7 @@ public SyncPoller, PrivateEndpointCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -740,7 +747,7 @@ private Mono createOrUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( @@ -812,7 +819,7 @@ public PrivateEndpointConnectionInner createOrUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -870,7 +877,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( @@ -924,7 +931,7 @@ private Mono>> deleteWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -933,7 +940,8 @@ private PollerFlux, Void> beginDeleteAsync( deleteWithResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } /** @@ -947,7 +955,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( @@ -970,7 +978,7 @@ private PollerFlux, Void> beginDeleteAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -989,7 +997,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( @@ -1007,7 +1015,7 @@ public SyncPoller, Void> beginDelete( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) { @@ -1027,7 +1035,7 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsImpl.java index dde642da0489..846ffa4daa90 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateEndpointConnectionsImpl.java @@ -14,10 +14,9 @@ import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnection; import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnectionListResult; import com.azure.resourcemanager.cognitiveservices.models.PrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); private final PrivateEndpointConnectionsClient innerClient; @@ -94,7 +93,7 @@ public void delete( public PrivateEndpointConnection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -102,14 +101,14 @@ public PrivateEndpointConnection getById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -125,7 +124,7 @@ public PrivateEndpointConnection getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -133,14 +132,14 @@ public Response getByIdWithResponse(String id, Contex } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -154,7 +153,7 @@ public Response getByIdWithResponse(String id, Contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -162,14 +161,14 @@ public void deleteById(String id) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -183,7 +182,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -191,14 +190,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String accountName = Utils.getValueFromIdByName(id, "accounts"); if (accountName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'accounts'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesClientImpl.java index c9e2f8f39674..3c0da7e8951c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesClientImpl.java @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateLinkResourceListResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateLinkResourcesService service; @@ -79,7 +76,8 @@ Mono> list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Cognitive Services account. + * @return the private link resources that need to be created for a Cognitive Services account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -128,7 +126,8 @@ private Mono> listWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Cognitive Services account. + * @return the private link resources that need to be created for a Cognitive Services account along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithResponseAsync( @@ -173,7 +172,8 @@ private Mono> listWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Cognitive Services account. + * @return the private link resources that need to be created for a Cognitive Services account on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listAsync(String resourceGroupName, String accountName) { @@ -212,7 +212,8 @@ public PrivateLinkResourceListResultInner list(String resourceGroupName, String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Cognitive Services account. + * @return the private link resources that need to be created for a Cognitive Services account along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithResponse( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesImpl.java index 8584bb9a4cf5..074164a2c6cd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/PrivateLinkResourcesImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateLinkResourceListResultInner; import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResourceListResult; import com.azure.resourcemanager.cognitiveservices.models.PrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); private final PrivateLinkResourcesClient innerClient; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersClientImpl.java index b10bb697fd0a..b1aae09f8f71 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersClientImpl.java @@ -22,7 +22,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.ResourceProvidersClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.DomainAvailabilityInner; import com.azure.resourcemanager.cognitiveservices.fluent.models.SkuAvailabilityListResultInner; @@ -32,8 +31,6 @@ /** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - private final ClientLogger logger = new ClientLogger(ResourceProvidersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ResourceProvidersService service; @@ -94,7 +91,7 @@ Mono> checkDomainAvailability( * @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 check SKU availability result list. + * @return check SKU availability result list along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkSkuAvailabilityWithResponseAsync( @@ -144,7 +141,7 @@ private Mono> checkSkuAvailabilityWithR * @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 check SKU availability result list. + * @return check SKU availability result list along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkSkuAvailabilityWithResponseAsync( @@ -190,7 +187,7 @@ private Mono> checkSkuAvailabilityWithR * @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 check SKU availability result list. + * @return check SKU availability result list on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkSkuAvailabilityAsync( @@ -231,7 +228,7 @@ public SkuAvailabilityListResultInner checkSkuAvailability( * @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 check SKU availability result list. + * @return check SKU availability result list along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkSkuAvailabilityWithResponse( @@ -246,7 +243,7 @@ public Response checkSkuAvailabilityWithResponse * @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 domain availability. + * @return domain availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkDomainAvailabilityWithResponseAsync( @@ -291,7 +288,7 @@ private Mono> checkDomainAvailabilityWithRespo * @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 domain availability. + * @return domain availability along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkDomainAvailabilityWithResponseAsync( @@ -332,7 +329,7 @@ private Mono> checkDomainAvailabilityWithRespo * @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 domain availability. + * @return domain availability on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkDomainAvailabilityAsync(CheckDomainAvailabilityParameter parameters) { @@ -369,7 +366,7 @@ public DomainAvailabilityInner checkDomainAvailability(CheckDomainAvailabilityPa * @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 domain availability. + * @return domain availability along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkDomainAvailabilityWithResponse( diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersImpl.java index d1aa90fe9918..33ab1c448fe7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceProvidersImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.cognitiveservices.models.DomainAvailability; import com.azure.resourcemanager.cognitiveservices.models.ResourceProviders; import com.azure.resourcemanager.cognitiveservices.models.SkuAvailabilityListResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ResourceProvidersImpl implements ResourceProviders { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); private final ResourceProvidersClient innerClient; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java index ad84a3e49c51..c8160e33d0d4 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.ResourceSkusClient; import com.azure.resourcemanager.cognitiveservices.fluent.models.ResourceSkuInner; import com.azure.resourcemanager.cognitiveservices.models.ResourceSkuListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in ResourceSkusClient. */ public final class ResourceSkusClientImpl implements ResourceSkusClient { - private final ClientLogger logger = new ClientLogger(ResourceSkusClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ResourceSkusService service; @@ -86,7 +83,8 @@ Mono> listNext( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -132,7 +130,8 @@ private Mono> listSinglePageAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -173,7 +172,8 @@ private Mono> listSinglePageAsync(Context contex * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -187,7 +187,8 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -200,7 +201,8 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -214,7 +216,8 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -228,7 +231,8 @@ public PagedIterable list(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Get Skus operation response. + * @return the Get Skus operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -264,7 +268,8 @@ private Mono> listNextSinglePageAsync(String nex * @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 Get Skus operation response. + * @return the Get Skus operation response along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusImpl.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusImpl.java index 88fdbc1b8b49..1dc20d48a92a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusImpl.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/ResourceSkusImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.cognitiveservices.fluent.models.ResourceSkuInner; import com.azure.resourcemanager.cognitiveservices.models.ResourceSku; import com.azure.resourcemanager.cognitiveservices.models.ResourceSkus; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ResourceSkusImpl implements ResourceSkus { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkusImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkusImpl.class); private final ResourceSkusClient innerClient; diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Account.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Account.java index ea928e0c4382..84b5d02acdc0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Account.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Account.java @@ -338,7 +338,7 @@ interface WithProperties { * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ Response listKeysWithResponse(Context context); @@ -361,7 +361,7 @@ interface WithProperties { * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ Response regenerateKeyWithResponse(RegenerateKeyParameters parameters, Context context); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountListResult.java index d9d0cd1e2e86..397f11a70b5e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountListResult.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of cognitive services accounts operation response. */ @Fluent public final class AccountListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountListResult.class); - /* * The link used to get the next page of accounts. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModel.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModel.java new file mode 100644 index 000000000000..590021e08f40 --- /dev/null +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModel.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cognitiveservices.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner; +import java.util.Map; + +/** An immutable client-side representation of AccountModel. */ +public interface AccountModel { + /** + * Gets the format property: Deployment model format. + * + * @return the format value. + */ + String format(); + + /** + * Gets the name property: Deployment model name. + * + * @return the name value. + */ + String name(); + + /** + * Gets the version property: Deployment model version. + * + * @return the version value. + */ + String version(); + + /** + * Gets the baseModel property: Base Model Identifier. + * + * @return the baseModel value. + */ + DeploymentModel baseModel(); + + /** + * Gets the maxCapacity property: The max capacity. + * + * @return the maxCapacity value. + */ + Integer maxCapacity(); + + /** + * Gets the capabilities property: The capabilities. + * + * @return the capabilities value. + */ + Map capabilities(); + + /** + * Gets the deprecation property: Cognitive Services account ModelDeprecationInfo. + * + * @return the deprecation value. + */ + ModelDeprecationInfo deprecation(); + + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner object. + * + * @return the inner object. + */ + AccountModelInner innerModel(); +} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModelListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModelListResult.java new file mode 100644 index 000000000000..02eae5531831 --- /dev/null +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountModelListResult.java @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cognitiveservices.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountModelInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The list of cognitive services accounts operation response. */ +@Fluent +public final class AccountModelListResult { + /* + * The link used to get the next page of Model. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * Gets the list of Cognitive Services accounts Model and their properties. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get the nextLink property: The link used to get the next page of Model. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link used to get the next page of Model. + * + * @param nextLink the nextLink value to set. + * @return the AccountModelListResult object itself. + */ + public AccountModelListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the value property: Gets the list of Cognitive Services accounts Model and their properties. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Gets the list of Cognitive Services accounts Model and their properties. + * + * @param value the value value to set. + * @return the AccountModelListResult object itself. + */ + public AccountModelListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java index 1ffbb3a3297e..03db1e8756e1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountProperties.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.models.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -16,8 +14,6 @@ /** Properties of Cognitive Services account. */ @Fluent public final class AccountProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountProperties.class); - /* * Gets the status of the cognitive services account at the time the * operation was called. @@ -96,8 +92,7 @@ public final class AccountProperties { private List privateEndpointConnections; /* - * Whether or not public endpoint access is allowed for this account. Value - * is optional but if passed in, must be 'Enabled' or 'Disabled' + * Whether or not public endpoint access is allowed for this account. */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; @@ -120,6 +115,12 @@ public final class AccountProperties { @JsonProperty(value = "callRateLimit", access = JsonProperty.Access.WRITE_ONLY) private CallRateLimit callRateLimit; + /* + * The flag to enable dynamic throttling. + */ + @JsonProperty(value = "dynamicThrottlingEnabled") + private Boolean dynamicThrottlingEnabled; + /* * The quotaLimit property. */ @@ -157,6 +158,18 @@ public final class AccountProperties { @JsonProperty(value = "restore") private Boolean restore; + /* + * The deletion date, only available for deleted account. + */ + @JsonProperty(value = "deletionDate", access = JsonProperty.Access.WRITE_ONLY) + private String deletionDate; + + /* + * The scheduled purge date, only available for deleted account. + */ + @JsonProperty(value = "scheduledPurgeDate", access = JsonProperty.Access.WRITE_ONLY) + private String scheduledPurgeDate; + /** * Get the provisioningState property: Gets the status of the cognitive services account at the time the operation * was called. @@ -324,8 +337,7 @@ public List privateEndpointConnections() { } /** - * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this account. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled'. + * Get the publicNetworkAccess property: Whether or not public endpoint access is allowed for this account. * * @return the publicNetworkAccess value. */ @@ -334,8 +346,7 @@ public PublicNetworkAccess publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this account. Value is - * optional but if passed in, must be 'Enabled' or 'Disabled'. + * Set the publicNetworkAccess property: Whether or not public endpoint access is allowed for this account. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the AccountProperties object itself. @@ -383,6 +394,26 @@ public CallRateLimit callRateLimit() { return this.callRateLimit; } + /** + * Get the dynamicThrottlingEnabled property: The flag to enable dynamic throttling. + * + * @return the dynamicThrottlingEnabled value. + */ + public Boolean dynamicThrottlingEnabled() { + return this.dynamicThrottlingEnabled; + } + + /** + * Set the dynamicThrottlingEnabled property: The flag to enable dynamic throttling. + * + * @param dynamicThrottlingEnabled the dynamicThrottlingEnabled value to set. + * @return the AccountProperties object itself. + */ + public AccountProperties withDynamicThrottlingEnabled(Boolean dynamicThrottlingEnabled) { + this.dynamicThrottlingEnabled = dynamicThrottlingEnabled; + return this; + } + /** * Get the quotaLimit property: The quotaLimit property. * @@ -481,6 +512,24 @@ public AccountProperties withRestore(Boolean restore) { return this; } + /** + * Get the deletionDate property: The deletion date, only available for deleted account. + * + * @return the deletionDate value. + */ + public String deletionDate() { + return this.deletionDate; + } + + /** + * Get the scheduledPurgeDate property: The scheduled purge date, only available for deleted account. + * + * @return the scheduledPurgeDate value. + */ + public String scheduledPurgeDate() { + return this.scheduledPurgeDate; + } + /** * Validates the instance. * diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSku.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSku.java index 768801a52ee3..5f995c9966a3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSku.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AccountSku.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cognitive Services resource type and SKU. */ @Fluent public final class AccountSku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AccountSku.class); - /* * Resource Namespace and Type */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Accounts.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Accounts.java index c1540f6665cc..394003d8d3b9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Accounts.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Accounts.java @@ -56,7 +56,7 @@ public interface Accounts { * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context); @@ -67,7 +67,8 @@ public interface Accounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -79,7 +80,8 @@ public interface Accounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -88,7 +90,8 @@ public interface Accounts { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -99,7 +102,8 @@ public interface Accounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); @@ -124,7 +128,7 @@ public interface Accounts { * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ Response listKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -151,7 +155,7 @@ public interface Accounts { * @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 access keys for the cognitive services account. + * @return the access keys for the cognitive services account along with {@link Response}. */ Response regenerateKeyWithResponse( String resourceGroupName, String accountName, RegenerateKeyParameters parameters, Context context); @@ -177,7 +181,7 @@ Response regenerateKeyWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response along with {@link Response}. */ Response listSkusWithResponse(String resourceGroupName, String accountName, Context context); @@ -204,11 +208,38 @@ Response regenerateKeyWithResponse( * @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 usages for the requested Cognitive Services account. + * @return usages for the requested Cognitive Services account along with {@link Response}. */ Response listUsagesWithResponse( String resourceGroupName, String accountName, String filter, Context context); + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listModels(String resourceGroupName, String accountName); + + /** + * List available Models for the requested 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 list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listModels(String resourceGroupName, String accountName, Context context); + /** * Returns a Cognitive Services account specified by the parameters. * @@ -217,7 +248,7 @@ Response listUsagesWithResponse( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ Account getById(String id); @@ -230,7 +261,7 @@ Response listUsagesWithResponse( * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiProperties.java index 9a372e75ea45..7def79e1f000 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ApiProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -16,8 +15,6 @@ /** The api properties for special APIs. */ @Fluent public final class ApiProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiProperties.class); - /* * (QnAMaker Only) The runtime endpoint of QnAMaker. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java index a38a92f69753..690e9e731dd2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/AzureEntityResource.java @@ -6,15 +6,11 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Entity Resource The resource model definition for an Azure Resource Manager resource with an etag. */ @Immutable public class AzureEntityResource extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureEntityResource.class); - /* * Resource Etag. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CallRateLimit.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CallRateLimit.java index 20692771e0f4..c0f1802a0293 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CallRateLimit.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CallRateLimit.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The call rate limit Cognitive Services account. */ @Fluent public final class CallRateLimit { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CallRateLimit.class); - /* * The count value of Call Rate Limit. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckDomainAvailabilityParameter.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckDomainAvailabilityParameter.java index cc5839ca1181..15befab4aea2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckDomainAvailabilityParameter.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckDomainAvailabilityParameter.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Check Domain availability parameter. */ @Fluent public final class CheckDomainAvailabilityParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckDomainAvailabilityParameter.class); - /* * The subdomain name to use. */ @@ -99,16 +96,18 @@ public CheckDomainAvailabilityParameter withKind(String kind) { */ public void validate() { if (subdomainName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property subdomainName in model CheckDomainAvailabilityParameter")); } if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property type in model CheckDomainAvailabilityParameter")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CheckDomainAvailabilityParameter.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckSkuAvailabilityParameter.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckSkuAvailabilityParameter.java index 34fab64e1c69..8bd27c2cf7c1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckSkuAvailabilityParameter.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CheckSkuAvailabilityParameter.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Check SKU availability parameter. */ @Fluent public final class CheckSkuAvailabilityParameter { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckSkuAvailabilityParameter.class); - /* * The SKU of the resource. */ @@ -100,22 +97,24 @@ public CheckSkuAvailabilityParameter withType(String type) { */ public void validate() { if (skus() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property skus in model CheckSkuAvailabilityParameter")); } if (kind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property kind in model CheckSkuAvailabilityParameter")); } if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property type in model CheckSkuAvailabilityParameter")); } } + + private static final ClientLogger LOGGER = new ClientLogger(CheckSkuAvailabilityParameter.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentCost.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentCost.java index 16952ec02e05..112d77cea559 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentCost.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentCost.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cognitive Services account commitment cost. */ @Fluent public final class CommitmentCost { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentCost.class); - /* * Commitment meter Id. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPeriod.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPeriod.java index 6a12d3e3a862..f55ae302c852 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPeriod.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPeriod.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cognitive Services account commitment period. */ @Fluent public final class CommitmentPeriod { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentPeriod.class); - /* * Commitment period commitment tier. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanListResult.java index ba35a52c23c2..e9c0601d127d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanListResult.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentPlanInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of cognitive services accounts operation response. */ @Fluent public final class CommitmentPlanListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentPlanListResult.class); - /* * The link used to get the next page of CommitmentPlan. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProperties.java index 0145a1ca7a66..599171de1f26 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlanProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of Cognitive Services account commitment plan. */ @Fluent public final class CommitmentPlanProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentPlanProperties.class); - /* * Account hosting model. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlans.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlans.java index 57fa3edc0e18..38879e173e3f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlans.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentPlans.java @@ -18,7 +18,8 @@ public interface CommitmentPlans { * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -31,7 +32,8 @@ public interface CommitmentPlans { * @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 commitmentPlans associated with the Cognitive Services account. + * @return the commitmentPlans associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -58,7 +60,7 @@ public interface CommitmentPlans { * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String commitmentPlanName, Context context); @@ -95,7 +97,7 @@ Response getWithResponse( * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account along with {@link Response}. */ CommitmentPlan getById(String id); @@ -107,7 +109,7 @@ Response getWithResponse( * @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 commitmentPlans associated with the Cognitive Services account. + * @return the specified commitmentPlans associated with the Cognitive Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentQuota.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentQuota.java index dd3400da509b..bcd8fa190c20 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentQuota.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentQuota.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Cognitive Services account commitment quota. */ @Fluent public final class CommitmentQuota { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentQuota.class); - /* * Commitment quota quantity. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTierListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTierListResult.java index 253d8ddfb236..7c3e6dcb6087 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTierListResult.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTierListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.models.CommitmentTierInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of cognitive services accounts operation response. */ @Fluent public final class CommitmentTierListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CommitmentTierListResult.class); - /* * The link used to get the next page of CommitmentTier. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTiers.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTiers.java index a1e7e7dae211..f847ade9a8af 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTiers.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/CommitmentTiers.java @@ -16,7 +16,8 @@ public interface CommitmentTiers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String location); @@ -28,7 +29,8 @@ public interface CommitmentTiers { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String location, Context context); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeletedAccounts.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeletedAccounts.java index 527d7389278d..1b7f028c817f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeletedAccounts.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeletedAccounts.java @@ -35,7 +35,7 @@ public interface DeletedAccounts { * @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 is an Azure resource representing the provisioned account, it's type, location - * and SKU. + * and SKU along with {@link Response}. */ Response getWithResponse(String location, String resourceGroupName, String accountName, Context context); @@ -69,7 +69,8 @@ public interface DeletedAccounts { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -80,7 +81,8 @@ public interface DeletedAccounts { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of cognitive services accounts operation response. + * @return the list of cognitive services accounts operation response as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentListResult.java index 47a226c2cfb4..38a8404adf77 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentListResult.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentListResult.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.models.DeploymentInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list of cognitive services accounts operation response. */ @Fluent public final class DeploymentListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentListResult.class); - /* * The link used to get the next page of Deployment. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModel.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModel.java index 991a78777f6f..e0b693178dc7 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModel.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentModel.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of Cognitive Services account deployment model. */ @Fluent -public final class DeploymentModel { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentModel.class); - +public class DeploymentModel { /* * Deployment model format. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java index 184f2c1c8188..e8af4edc74dc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of Cognitive Services account deployment. */ @Fluent public final class DeploymentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentProperties.class); - /* * Gets the status of the resource at the time the operation was called. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleSettings.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleSettings.java index 1ae403524f36..9fab4f596e3d 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleSettings.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/DeploymentScaleSettings.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of Cognitive Services account deployment model. */ @Fluent public final class DeploymentScaleSettings { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentScaleSettings.class); - /* * Deployment scale type. */ @@ -26,6 +22,13 @@ public final class DeploymentScaleSettings { @JsonProperty(value = "capacity") private Integer capacity; + /* + * Deployment active capacity. This value might be different from + * `capacity` if customer recently updated `capacity`. + */ + @JsonProperty(value = "activeCapacity", access = JsonProperty.Access.WRITE_ONLY) + private Integer activeCapacity; + /** * Get the scaleType property: Deployment scale type. * @@ -66,6 +69,16 @@ public DeploymentScaleSettings withCapacity(Integer capacity) { return this; } + /** + * Get the activeCapacity property: Deployment active capacity. This value might be different from `capacity` if + * customer recently updated `capacity`. + * + * @return the activeCapacity value. + */ + public Integer activeCapacity() { + return this.activeCapacity; + } + /** * Validates the instance. * diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployments.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployments.java index 153eaebe79e1..64d1b35b6751 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployments.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Deployments.java @@ -18,7 +18,8 @@ public interface Deployments { * @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 deployments associated with the Cognitive Services account. + * @return the deployments associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -31,7 +32,8 @@ public interface Deployments { * @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 deployments associated with the Cognitive Services account. + * @return the deployments associated with the Cognitive Services account as paginated response with {@link + * PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, Context context); @@ -58,7 +60,7 @@ public interface Deployments { * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments associated with the Cognitive Services account along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String deploymentName, Context context); @@ -95,7 +97,7 @@ Response getWithResponse( * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments associated with the Cognitive Services account along with {@link Response}. */ Deployment getById(String id); @@ -107,7 +109,7 @@ Response getWithResponse( * @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 deployments associated with the Cognitive Services account. + * @return the specified deployments associated with the Cognitive Services account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Encryption.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Encryption.java index b3bd8fa4a5b0..5a79d6df9fd6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Encryption.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Encryption.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties to configure Encryption. */ @Fluent public final class Encryption { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Encryption.class); - /* * Properties of KeyVault */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java index 26ac6b554075..75e47aeab574 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Identity.java @@ -5,8 +5,6 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; @@ -14,8 +12,6 @@ /** Identity for the resource. */ @Fluent public class Identity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Identity.class); - /* * The identity type. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/IpRule.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/IpRule.java index 77e5f2205088..0d42d7f54a29 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/IpRule.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/IpRule.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A rule governing the accessibility from a specific ip address or ip range. */ @Fluent public final class IpRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IpRule.class); - /* * An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple * IP address) or '124.56.78.0/24' (all addresses that start with @@ -51,8 +48,10 @@ public IpRule withValue(String value) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property value in model IpRule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IpRule.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyVaultProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyVaultProperties.java index 40547d0be2ee..aa636628632f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyVaultProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/KeyVaultProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties to configure keyVault Properties. */ @Fluent public final class KeyVaultProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyVaultProperties.class); - /* * Name of the Key from KeyVault */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/MetricName.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/MetricName.java index 44e8f1827ce2..18f844d4edb9 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/MetricName.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/MetricName.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A metric name. */ @Fluent public final class MetricName { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricName.class); - /* * The name of the metric. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelDeprecationInfo.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelDeprecationInfo.java new file mode 100644 index 000000000000..8f7c6cb719f9 --- /dev/null +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ModelDeprecationInfo.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cognitiveservices.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Cognitive Services account ModelDeprecationInfo. */ +@Fluent +public final class ModelDeprecationInfo { + /* + * The datetime of deprecation of the fineTune Model. + */ + @JsonProperty(value = "fineTune") + private String fineTune; + + /* + * The datetime of deprecation of the inference Model. + */ + @JsonProperty(value = "inference") + private String inference; + + /** + * Get the fineTune property: The datetime of deprecation of the fineTune Model. + * + * @return the fineTune value. + */ + public String fineTune() { + return this.fineTune; + } + + /** + * Set the fineTune property: The datetime of deprecation of the fineTune Model. + * + * @param fineTune the fineTune value to set. + * @return the ModelDeprecationInfo object itself. + */ + public ModelDeprecationInfo withFineTune(String fineTune) { + this.fineTune = fineTune; + return this; + } + + /** + * Get the inference property: The datetime of deprecation of the inference Model. + * + * @return the inference value. + */ + public String inference() { + return this.inference; + } + + /** + * Set the inference property: The datetime of deprecation of the inference Model. + * + * @param inference the inference value to set. + * @return the ModelDeprecationInfo object itself. + */ + public ModelDeprecationInfo withInference(String inference) { + this.inference = inference; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleSet.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleSet.java index 0ddd1fe01e97..32f7af02e380 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleSet.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/NetworkRuleSet.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A set of rules governing the network accessibility. */ @Fluent public final class NetworkRuleSet { - @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkRuleSet.class); - /* * The default action when no rule from ipRules and from * virtualNetworkRules match. This is only used after the bypass property diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationDisplay.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationDisplay.java index 61150dd07094..41e61b36cec0 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationDisplay.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationDisplay.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Localized display information for this particular operation. */ @Immutable public final class OperationDisplay { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationDisplay.class); - /* * The localized friendly form of the resource provider name, e.g. * "Microsoft Monitoring Insights" or "Microsoft Compute". diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationListResult.java index 889765886bc4..86563c1f6083 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationListResult.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/OperationListResult.java @@ -5,9 +5,7 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.models.OperationInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,8 +15,6 @@ */ @Immutable public final class OperationListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResult.class); - /* * List of operations supported by the resource provider */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operations.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operations.java index 8723d624e9df..57d91e3b7257 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operations.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Operations.java @@ -14,7 +14,8 @@ public interface Operations { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface Operations { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a list of REST API operations supported by an Azure Resource Provider. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpoint.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpoint.java index 697380716e25..132cd79d3302 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpoint.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpoint.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The Private Endpoint resource. */ @Immutable public final class PrivateEndpoint { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpoint.class); - /* * The ARM identifier for Private Endpoint */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProperties.java index f85e4ddd3552..2d3d2ff28892 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnectionProperties.java @@ -6,15 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of the PrivateEndpointConnectProperties. */ @Fluent public final class PrivateEndpointConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); - /* * The resource of private end point. */ @@ -122,7 +119,7 @@ public void validate() { privateEndpoint().validate(); } if (privateLinkServiceConnectionState() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property privateLinkServiceConnectionState in model" @@ -131,4 +128,6 @@ public void validate() { privateLinkServiceConnectionState().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnections.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnections.java index a1a75cc1db4b..b4d0a22cc4e3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnections.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateEndpointConnections.java @@ -30,7 +30,8 @@ public interface PrivateEndpointConnections { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private endpoint connections associated with the Cognitive Services account. + * @return the private endpoint connections associated with the Cognitive Services account along with {@link + * Response}. */ Response listWithResponse( String resourceGroupName, String accountName, Context context); @@ -60,7 +61,8 @@ Response listWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account along with + * {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context); @@ -99,7 +101,8 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account along with + * {@link Response}. */ PrivateEndpointConnection getById(String id); @@ -111,7 +114,8 @@ Response getWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the Cognitive Services account. + * @return the specified private endpoint connection associated with the Cognitive Services account along with + * {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResource.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResource.java index 0ed4ed88aa52..2a72ac744979 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResource.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResource.java @@ -6,15 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A private link resource. */ @Fluent public final class PrivateLinkResource extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResource.class); - /* * Resource properties. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceProperties.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceProperties.java index 16479f3b4f84..c21d27ebab89 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceProperties.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResourceProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a private link resource. */ @Fluent public final class PrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); - /* * The private link resource group id. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResources.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResources.java index 111aa1ba2cf1..7b5c538f63eb 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResources.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkResources.java @@ -30,7 +30,8 @@ public interface PrivateLinkResources { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a Cognitive Services account. + * @return the private link resources that need to be created for a Cognitive Services account along with {@link + * Response}. */ Response listWithResponse( String resourceGroupName, String accountName, Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkServiceConnectionState.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkServiceConnectionState.java index 05ecc4d6a304..2c75937fa2e2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkServiceConnectionState.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/PrivateLinkServiceConnectionState.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A collection of information about the state of the connection between service consumer and provider. */ @Fluent public final class PrivateLinkServiceConnectionState { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkServiceConnectionState.class); - /* * Indicates whether the connection has been Approved/Rejected/Removed by * the owner of the service. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaLimit.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaLimit.java index 651c8731e4f4..6e634a6cb004 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaLimit.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/QuotaLimit.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The QuotaLimit model. */ @Fluent public final class QuotaLimit { - @JsonIgnore private final ClientLogger logger = new ClientLogger(QuotaLimit.class); - /* * The count property. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegenerateKeyParameters.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegenerateKeyParameters.java index f3f6252413bb..9e96147eb365 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegenerateKeyParameters.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RegenerateKeyParameters.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Regenerate key parameters. */ @Fluent public final class RegenerateKeyParameters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RegenerateKeyParameters.class); - /* * key name to generate (Key1|Key2) */ @@ -47,9 +44,11 @@ public RegenerateKeyParameters withKeyName(KeyName keyName) { */ public void validate() { if (keyName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property keyName in model RegenerateKeyParameters")); } } + + private static final ClientLogger LOGGER = new ClientLogger(RegenerateKeyParameters.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RequestMatchPattern.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RequestMatchPattern.java index 3be6a5247118..a635690aa775 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RequestMatchPattern.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/RequestMatchPattern.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The RequestMatchPattern model. */ @Fluent public final class RequestMatchPattern { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RequestMatchPattern.class); - /* * The path property. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceProviders.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceProviders.java index aa3c04eb9820..22732fdab389 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceProviders.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceProviders.java @@ -30,7 +30,7 @@ public interface ResourceProviders { * @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 check SKU availability result list. + * @return check SKU availability result list along with {@link Response}. */ Response checkSkuAvailabilityWithResponse( String location, CheckSkuAvailabilityParameter parameters, Context context); @@ -54,7 +54,7 @@ Response checkSkuAvailabilityWithResponse( * @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 domain availability. + * @return domain availability along with {@link Response}. */ Response checkDomainAvailabilityWithResponse( CheckDomainAvailabilityParameter parameters, Context context); diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuListResult.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuListResult.java index fe876aed39c6..14480de10bfc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuListResult.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuListResult.java @@ -7,15 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.cognitiveservices.fluent.models.ResourceSkuInner; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The Get Skus operation response. */ @Fluent public final class ResourceSkuListResult { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuListResult.class); - /* * The list of skus available for the subscription. */ @@ -75,11 +72,13 @@ public ResourceSkuListResult withNextLink(String nextLink) { */ public void validate() { if (value() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property value in model ResourceSkuListResult")); } else { value().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ResourceSkuListResult.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionInfo.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionInfo.java index 9309b2ea012b..319003bca135 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionInfo.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictionInfo.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The ResourceSkuRestrictionInfo model. */ @Fluent public final class ResourceSkuRestrictionInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuRestrictionInfo.class); - /* * Locations where the SKU is restricted */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictions.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictions.java index a86533ea938e..3d6ed6cffecd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictions.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkuRestrictions.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Describes restrictions of a SKU. */ @Fluent public final class ResourceSkuRestrictions { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceSkuRestrictions.class); - /* * The type of restrictions. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java index 8c5446f09c43..ee97b3689efa 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ResourceSkus.java @@ -14,7 +14,8 @@ public interface ResourceSkus { * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +26,8 @@ public interface ResourceSkus { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription. + * @return the list of Microsoft.CognitiveServices SKUs available for your Subscription as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Sku.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Sku.java index d4b2a56b227a..69465eaece09 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Sku.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Sku.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The resource model definition representing SKU. */ @Fluent public final class Sku { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class); - /* * The name of the SKU. Ex - P3. It is typically a letter+number code */ @@ -164,8 +161,10 @@ public Sku withCapacity(Integer capacity) { */ public void validate() { if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); } } + + private static final ClientLogger LOGGER = new ClientLogger(Sku.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailability.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailability.java index c0f66541d708..1e41fab2f80c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailability.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuAvailability.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** SKU availability. */ @Fluent public final class SkuAvailability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuAvailability.class); - /* * The Kind of the resource. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuCapability.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuCapability.java index 0a438cff32ba..d76b98c1536a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuCapability.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuCapability.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** SkuCapability indicates the capability of a certain feature. */ @Fluent public final class SkuCapability { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCapability.class); - /* * The name of the SkuCapability. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuChangeInfo.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuChangeInfo.java index c2a636956cfe..dbf297660fa3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuChangeInfo.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/SkuChangeInfo.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Sku change info of account. */ @Fluent public final class SkuChangeInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuChangeInfo.class); - /* * Gets the count of downgrades. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ThrottlingRule.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ThrottlingRule.java index 707af4ed9dbb..667ff328addc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ThrottlingRule.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/ThrottlingRule.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The ThrottlingRule model. */ @Fluent public final class ThrottlingRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ThrottlingRule.class); - /* * The key property. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java index 7d2f46d23973..c9826e2bd73f 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/Usage.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The usage data for a usage request. */ @Fluent public final class Usage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(Usage.class); - /* * The unit of the metric. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserAssignedIdentity.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserAssignedIdentity.java index 7dddcfdf4f8b..61f1a0e19b7a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserAssignedIdentity.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserAssignedIdentity.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** User-assigned managed identity. */ @Immutable public class UserAssignedIdentity { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class); - /* * Azure Active Directory principal ID associated with this Identity. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedStorage.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedStorage.java index b31ab9bba961..b4a6dfa22fda 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedStorage.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/UserOwnedStorage.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.cognitiveservices.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The user owned storage for Cognitive Services account. */ @Fluent public final class UserOwnedStorage { - @JsonIgnore private final ClientLogger logger = new ClientLogger(UserOwnedStorage.class); - /* * Full resource id of a Microsoft.Storage resource. */ diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/VirtualNetworkRule.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/VirtualNetworkRule.java index 01f003c0a8b9..65ead3c9ed4e 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/VirtualNetworkRule.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/models/VirtualNetworkRule.java @@ -6,14 +6,11 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A rule governing the accessibility from a specific virtual network. */ @Fluent public final class VirtualNetworkRule { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkRule.class); - /* * Full resource id of a vnet subnet, such as * '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. @@ -102,9 +99,11 @@ public VirtualNetworkRule withIgnoreMissingVnetServiceEndpoint(Boolean ignoreMis */ public void validate() { if (id() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property id in model VirtualNetworkRule")); } } + + private static final ClientLogger LOGGER = new ClientLogger(VirtualNetworkRule.class); } diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java index 99dc49c909d3..64da30e67eb3 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsCreateSamples.java @@ -17,7 +17,7 @@ /** Samples for Accounts Create. */ public final class AccountsCreateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CreateAccountMin.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CreateAccountMin.json */ /** * Sample code: Create Account Min. @@ -38,7 +38,7 @@ public static void createAccountMin(com.azure.resourcemanager.cognitiveservices. } /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CreateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CreateAccount.json */ /** * Sample code: Create Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java index 5aeb7a293bda..5cdc7b1c12fc 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts Delete. */ public final class AccountsDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeleteAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeleteAccount.json */ /** * Sample code: Delete Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java index dc1c4f5e77a5..185986bf7ede 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts GetByResourceGroup. */ public final class AccountsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetAccount.json */ /** * Sample code: Get Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java index 1c91b956b1d9..e5a8e096f412 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts ListByResourceGroup. */ public final class AccountsListByResourceGroupSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListAccountsByResourceGroup.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountsByResourceGroup.json */ /** * Sample code: List Accounts by Resource Group. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java index 98bad0a453a0..1422727fe2aa 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListKeysSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts ListKeys. */ public final class AccountsListKeysSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListKeys.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListKeys.json */ /** * Sample code: List Keys. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java new file mode 100644 index 000000000000..8ada7b77a789 --- /dev/null +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListModelsSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.cognitiveservices.generated; + +import com.azure.core.util.Context; + +/** Samples for Accounts ListModels. */ +public final class AccountsListModelsSamples { + /* + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountModels.json + */ + /** + * Sample code: List AccountModels. + * + * @param manager Entry point to CognitiveServicesManager. + */ + public static void listAccountModels(com.azure.resourcemanager.cognitiveservices.CognitiveServicesManager manager) { + manager.accounts().listModels("resourceGroupName", "accountName", Context.NONE); + } +} diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java index 1b51738bbacb..021c74d29e96 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts List. */ public final class AccountsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountsBySubscription.json */ /** * Sample code: List Accounts by Subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java index 6bb1f236d672..0334efbc70b6 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListSkusSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts ListSkus. */ public final class AccountsListSkusSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListSkus.json */ /** * Sample code: List SKUs. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java index 46b6f6cee2f0..72bd3f6d5f4a 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsListUsagesSamples.java @@ -9,7 +9,7 @@ /** Samples for Accounts ListUsages. */ public final class AccountsListUsagesSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetUsages.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetUsages.json */ /** * Sample code: Get Usages. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java index 7b535e3006a4..eaac302ec534 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsRegenerateKeySamples.java @@ -11,7 +11,7 @@ /** Samples for Accounts RegenerateKey. */ public final class AccountsRegenerateKeySamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/RegenerateKey.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/RegenerateKey.json */ /** * Sample code: Regenerate Keys. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java index 505a68f99be1..2651079f888c 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/AccountsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Accounts Update. */ public final class AccountsUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/UpdateAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/UpdateAccount.json */ /** * Sample code: Update Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java index 7683a7d561d6..77165b74b310 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for CommitmentPlans CreateOrUpdate. */ public final class CommitmentPlansCreateOrUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PutCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PutCommitmentPlan.json */ /** * Sample code: PutCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java index 2ee1bde6589d..1419f13aa248 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for CommitmentPlans Delete. */ public final class CommitmentPlansDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeleteCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeleteCommitmentPlan.json */ /** * Sample code: DeleteCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java index 9c80a1e931a0..5e0cb3910339 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansGetSamples.java @@ -9,7 +9,7 @@ /** Samples for CommitmentPlans Get. */ public final class CommitmentPlansGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetCommitmentPlan.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetCommitmentPlan.json */ /** * Sample code: GetCommitmentPlan. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java index adc08940b409..6b20ecd2b951 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentPlansListSamples.java @@ -9,7 +9,7 @@ /** Samples for CommitmentPlans List. */ public final class CommitmentPlansListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListCommitmentPlans.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListCommitmentPlans.json */ /** * Sample code: ListCommitmentPlans. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java index c09ceed710ae..7ddfe3140bad 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/CommitmentTiersListSamples.java @@ -9,7 +9,7 @@ /** Samples for CommitmentTiers List. */ public final class CommitmentTiersListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListCommitmentTiers.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListCommitmentTiers.json */ /** * Sample code: ListCommitmentTiers. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java index 8088b47c8202..cffa06d43c53 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for DeletedAccounts Get. */ public final class DeletedAccountsGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetDeletedAccount.json */ /** * Sample code: Get Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java index f6738e7c359b..ccf453de05ee 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsListSamples.java @@ -9,7 +9,7 @@ /** Samples for DeletedAccounts List. */ public final class DeletedAccountsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListAccountsBySubscription.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListAccountsBySubscription.json */ /** * Sample code: List Deleted Accounts by Subscription. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java index 39b540556508..948c6ee99f03 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeletedAccountsPurgeSamples.java @@ -9,7 +9,7 @@ /** Samples for DeletedAccounts Purge. */ public final class DeletedAccountsPurgeSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PurgeDeletedAccount.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PurgeDeletedAccount.json */ /** * Sample code: Delete Account. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java index ea0135a19cbc..7010e9b0afcd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** Samples for Deployments CreateOrUpdate. */ public final class DeploymentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PutDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PutDeployment.json */ /** * Sample code: PutDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java index aa3f9f3addf1..8f926c9818cd 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Deployments Delete. */ public final class DeploymentsDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeleteDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeleteDeployment.json */ /** * Sample code: DeleteDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java index 9c789e0b72c9..3bd12e824266 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Deployments Get. */ public final class DeploymentsGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetDeployment.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetDeployment.json */ /** * Sample code: GetDeployment. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java index 5e2be087f753..7ca732fc5a23 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/DeploymentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Deployments List. */ public final class DeploymentsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListDeployments.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListDeployments.json */ /** * Sample code: ListDeployments. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java index 11843194582c..e51a6ebce2d1 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetOperations.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetOperations.json */ /** * Sample code: Get Operations. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java index f9c7f5f6604c..d57e73e52067 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/PutPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/PutPrivateEndpointConnection.json */ /** * Sample code: PutPrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java index 5151481da7c7..f6f42aa534e2 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/DeletePrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/DeletePrivateEndpointConnection.json */ /** * Sample code: DeletePrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java index a87ac09bd93f..98a9d8273265 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetPrivateEndpointConnection.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetPrivateEndpointConnection.json */ /** * Sample code: GetPrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java index 255cea40d224..2f69aa69e473 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateEndpointConnectionsListSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListPrivateEndpointConnections.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListPrivateEndpointConnections.json */ /** * Sample code: GetPrivateEndpointConnection. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java index 72a0d3c38135..e6ab747b7188 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/PrivateLinkResourcesListSamples.java @@ -9,7 +9,7 @@ /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/ListPrivateLinkResources.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/ListPrivateLinkResources.json */ /** * Sample code: ListPrivateLinkResources. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java index 84f2fd95e53c..a2c5d38a7399 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckDomainAvailabilitySamples.java @@ -10,7 +10,7 @@ /** Samples for ResourceProvider CheckDomainAvailability. */ public final class ResourceProviderCheckDomainAvailabilitySamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CheckDomainAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CheckDomainAvailability.json */ /** * Sample code: Check SKU Availability. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java index dd8cf73d30a0..3e5456a251ca 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceProviderCheckSkuAvailabilitySamples.java @@ -11,7 +11,7 @@ /** Samples for ResourceProvider CheckSkuAvailability. */ public final class ResourceProviderCheckSkuAvailabilitySamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/CheckSkuAvailability.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/CheckSkuAvailability.json */ /** * Sample code: Check SKU Availability. diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java index 26c794fd85b3..cc2f0c4d2a56 100644 --- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java +++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/samples/java/com/azure/resourcemanager/cognitiveservices/generated/ResourceSkusListSamples.java @@ -9,7 +9,7 @@ /** Samples for ResourceSkus List. */ public final class ResourceSkusListSamples { /* - * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2021-10-01/examples/GetSkus.json + * x-ms-original-file: specification/cognitiveservices/resource-manager/Microsoft.CognitiveServices/stable/2022-03-01/examples/GetSkus.json */ /** * Sample code: Regenerate Keys.