diff --git a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md index 56e9b80d95a4..5a21fd681227 100644 --- a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md +++ b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2022-02-23) +- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.2 (2021-07-29) diff --git a/sdk/batch/azure-resourcemanager-batch/README.md b/sdk/batch/azure-resourcemanager-batch/README.md index 24bdd72cc5d2..36cf520abd99 100644 --- a/sdk/batch/azure-resourcemanager-batch/README.md +++ b/sdk/batch/azure-resourcemanager-batch/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Batch client library for Java. -This package contains Microsoft Azure SDK for Batch Management SDK. Package tag package-2021-06. 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 Batch Management SDK. Batch Client. Package tag package-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-batch - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md index a014dad2fb0c..6f4b3dc2ba0d 100644 --- a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md +++ b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md @@ -1,68 +1,2012 @@ # Code snippets and samples -### Application - -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationListSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationUpdateSamples.java) - -### ApplicationPackage - -- [Activate](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageActivateSamples.java) -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageGetSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageListSamples.java) - -### BatchAccount - -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountDeleteSamples.java) -- [GetByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetByResourceGroupSamples.java) -- [GetKeys](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetKeysSamples.java) -- [List](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListSamples.java) -- [ListByResourceGroup](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListByResourceGroupSamples.java) -- [ListOutboundNetworkDependenciesEndpoints](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java) -- [RegenerateKey](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountRegenerateKeySamples.java) -- [SynchronizeAutoStorageKeys](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountSynchronizeAutoStorageKeysSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountUpdateSamples.java) - -### Certificate - -- [CancelDeletion](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCancelDeletionSamples.java) -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateDeleteSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateGetSamples.java) -- [ListByBatchAccount](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateListByBatchAccountSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateUpdateSamples.java) - -### Location - -- [CheckNameAvailability](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationCheckNameAvailabilitySamples.java) -- [GetQuotas](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationGetQuotasSamples.java) -- [ListSupportedCloudServiceSkus](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedCloudServiceSkusSamples.java) -- [ListSupportedVirtualMachineSkus](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedVirtualMachineSkusSamples.java) - -### Pool - -- [Create](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolCreateSamples.java) -- [Delete](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDeleteSamples.java) -- [DisableAutoScale](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDisableAutoScaleSamples.java) -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolGetSamples.java) -- [ListByBatchAccount](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolListByBatchAccountSamples.java) -- [StopResize](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolStopResizeSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolUpdateSamples.java) - -### PrivateEndpointConnection - -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionGetSamples.java) -- [ListByBatchAccount](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionListByBatchAccountSamples.java) -- [Update](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionUpdateSamples.java) - -### PrivateLinkResource - -- [Get](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceGetSamples.java) -- [ListByBatchAccount](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceListByBatchAccountSamples.java) +## Application + +- [Create](#application_create) +- [Delete](#application_delete) +- [Get](#application_get) +- [List](#application_list) +- [Update](#application_update) + +## ApplicationPackage + +- [Activate](#applicationpackage_activate) +- [Create](#applicationpackage_create) +- [Delete](#applicationpackage_delete) +- [Get](#applicationpackage_get) +- [List](#applicationpackage_list) + +## BatchAccount + +- [Create](#batchaccount_create) +- [Delete](#batchaccount_delete) +- [GetByResourceGroup](#batchaccount_getbyresourcegroup) +- [GetDetector](#batchaccount_getdetector) +- [GetKeys](#batchaccount_getkeys) +- [List](#batchaccount_list) +- [ListByResourceGroup](#batchaccount_listbyresourcegroup) +- [ListDetectors](#batchaccount_listdetectors) +- [ListOutboundNetworkDependenciesEndpoints](#batchaccount_listoutboundnetworkdependenciesendpoints) +- [RegenerateKey](#batchaccount_regeneratekey) +- [SynchronizeAutoStorageKeys](#batchaccount_synchronizeautostoragekeys) +- [Update](#batchaccount_update) + +## Certificate + +- [CancelDeletion](#certificate_canceldeletion) +- [Create](#certificate_create) +- [Delete](#certificate_delete) +- [Get](#certificate_get) +- [ListByBatchAccount](#certificate_listbybatchaccount) +- [Update](#certificate_update) + +## Location + +- [CheckNameAvailability](#location_checknameavailability) +- [GetQuotas](#location_getquotas) +- [ListSupportedCloudServiceSkus](#location_listsupportedcloudserviceskus) +- [ListSupportedVirtualMachineSkus](#location_listsupportedvirtualmachineskus) + +## Operations + +- [List](#operations_list) + +## Pool + +- [Create](#pool_create) +- [Delete](#pool_delete) +- [DisableAutoScale](#pool_disableautoscale) +- [Get](#pool_get) +- [ListByBatchAccount](#pool_listbybatchaccount) +- [StopResize](#pool_stopresize) +- [Update](#pool_update) + +## PrivateEndpointConnection + +- [Get](#privateendpointconnection_get) +- [ListByBatchAccount](#privateendpointconnection_listbybatchaccount) +- [Update](#privateendpointconnection_update) + +## PrivateLinkResource + +- [Get](#privatelinkresource_get) +- [ListByBatchAccount](#privatelinkresource_listbybatchaccount) +### Application_Create + +```java +/** Samples for Application Create. */ +public final class ApplicationCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationCreate.json + */ + /** + * Sample code: ApplicationCreate. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationCreate(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .applications() + .define("app1") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withDisplayName("myAppName") + .withAllowUpdates(false) + .create(); + } +} +``` + +### Application_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Application Delete. */ +public final class ApplicationDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationDelete.json + */ + /** + * Sample code: ApplicationDelete. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applications().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + } +} +``` + +### Application_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Application Get. */ +public final class ApplicationGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationGet.json + */ + /** + * Sample code: ApplicationGet. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + } +} +``` + +### Application_List + +```java +import com.azure.core.util.Context; + +/** Samples for Application List. */ +public final class ApplicationListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationList.json + */ + /** + * Sample code: ApplicationList. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applications().list("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + } +} +``` + +### Application_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.models.Application; + +/** Samples for Application Update. */ +public final class ApplicationUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationUpdate.json + */ + /** + * Sample code: ApplicationUpdate. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationUpdate(com.azure.resourcemanager.batch.BatchManager manager) { + Application resource = + manager + .applications() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE) + .getValue(); + resource.update().withDisplayName("myAppName").withAllowUpdates(true).withDefaultVersion("2").apply(); + } +} +``` + +### ApplicationPackage_Activate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; + +/** Samples for ApplicationPackage Activate. */ +public final class ApplicationPackageActivateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageActivate.json + */ + /** + * Sample code: ApplicationPackageActivate. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationPackageActivate(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .applicationPackages() + .activateWithResponse( + "default-azurebatch-japaneast", + "sampleacct", + "app1", + "1", + new ActivateApplicationPackageParameters().withFormat("zip"), + Context.NONE); + } +} +``` + +### ApplicationPackage_Create + +```java +/** Samples for ApplicationPackage Create. */ +public final class ApplicationPackageCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageCreate.json + */ + /** + * Sample code: ApplicationPackageCreate. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationPackageCreate(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .applicationPackages() + .define("1") + .withExistingApplication("default-azurebatch-japaneast", "sampleacct", "app1") + .create(); + } +} +``` + +### ApplicationPackage_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ApplicationPackage Delete. */ +public final class ApplicationPackageDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageDelete.json + */ + /** + * Sample code: ApplicationPackageDelete. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationPackageDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .applicationPackages() + .deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); + } +} +``` + +### ApplicationPackage_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ApplicationPackage Get. */ +public final class ApplicationPackageGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageGet.json + */ + /** + * Sample code: ApplicationPackageGet. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationPackageGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .applicationPackages() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); + } +} +``` + +### ApplicationPackage_List + +```java +import com.azure.core.util.Context; + +/** Samples for ApplicationPackage List. */ +public final class ApplicationPackageListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageList.json + */ + /** + * Sample code: ApplicationPackageList. + * + * @param manager Entry point to BatchManager. + */ + public static void applicationPackageList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applicationPackages().list("default-azurebatch-japaneast", "sampleacct", "app1", null, Context.NONE); + } +} +``` + +### BatchAccount_Create + +```java +import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; +import com.azure.resourcemanager.batch.models.BatchAccountIdentity; +import com.azure.resourcemanager.batch.models.KeyVaultReference; +import com.azure.resourcemanager.batch.models.PoolAllocationMode; +import com.azure.resourcemanager.batch.models.PublicNetworkAccessType; +import com.azure.resourcemanager.batch.models.ResourceIdentityType; +import com.azure.resourcemanager.batch.models.UserAssignedIdentities; +import java.util.HashMap; +import java.util.Map; + +/** Samples for BatchAccount Create. */ +public final class BatchAccountCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_BYOS.json + */ + /** + * Sample code: BatchAccountCreate_BYOS. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .define("sampleacct") + .withRegion("japaneast") + .withExistingResourceGroup("default-azurebatch-japaneast") + .withAutoStorage( + new AutoStorageBaseProperties() + .withStorageAccountId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + .withPoolAllocationMode(PoolAllocationMode.USER_SUBSCRIPTION) + .withKeyVaultReference( + new KeyVaultReference() + .withId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample") + .withUrl("http://sample.vault.azure.net/")) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_UserAssignedIdentity.json + */ + /** + * Sample code: BatchAccountCreate_UserAssignedIdentity. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountCreateUserAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .define("sampleacct") + .withRegion("japaneast") + .withExistingResourceGroup("default-azurebatch-japaneast") + .withIdentity( + new BatchAccountIdentity() + .withType(ResourceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedIdentities()))) + .withAutoStorage( + new AutoStorageBaseProperties() + .withStorageAccountId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateBatchAccountCreate.json + */ + /** + * Sample code: PrivateBatchAccountCreate. + * + * @param manager Entry point to BatchManager. + */ + public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .define("sampleacct") + .withRegion("japaneast") + .withExistingResourceGroup("default-azurebatch-japaneast") + .withAutoStorage( + new AutoStorageBaseProperties() + .withStorageAccountId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + .withKeyVaultReference( + new KeyVaultReference() + .withId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample") + .withUrl("http://sample.vault.azure.net/")) + .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_SystemAssignedIdentity.json + */ + /** + * Sample code: BatchAccountCreate_SystemAssignedIdentity. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountCreateSystemAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .define("sampleacct") + .withRegion("japaneast") + .withExistingResourceGroup("default-azurebatch-japaneast") + .withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) + .withAutoStorage( + new AutoStorageBaseProperties() + .withStorageAccountId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_Default.json + */ + /** + * Sample code: BatchAccountCreate_Default. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountCreateDefault(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .define("sampleacct") + .withRegion("japaneast") + .withExistingResourceGroup("default-azurebatch-japaneast") + .withAutoStorage( + new AutoStorageBaseProperties() + .withStorageAccountId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### BatchAccount_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount Delete. */ +public final class BatchAccountDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountDelete.json + */ + /** + * Sample code: BatchAccountDelete. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().delete("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } +} +``` + +### BatchAccount_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount GetByResourceGroup. */ +public final class BatchAccountGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateBatchAccountGet.json + */ + /** + * Sample code: PrivateBatchAccountGet. + * + * @param manager Entry point to BatchManager. + */ + public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountGet.json + */ + /** + * Sample code: BatchAccountGet. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } +} +``` + +### BatchAccount_GetDetector + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount GetDetector. */ +public final class BatchAccountGetDetectorSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/DetectorGet.json + */ + /** + * Sample code: GetDetector. + * + * @param manager Entry point to BatchManager. + */ + public static void getDetector(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .getDetectorWithResponse("default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", Context.NONE); + } +} +``` + +### BatchAccount_GetKeys + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount GetKeys. */ +public final class BatchAccountGetKeysSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountGetKeys.json + */ + /** + * Sample code: BatchAccountGetKeys. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountGetKeys(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } +} +``` + +### BatchAccount_List + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount List. */ +public final class BatchAccountListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountList.json + */ + /** + * Sample code: BatchAccountList. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().list(Context.NONE); + } +} +``` + +### BatchAccount_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount ListByResourceGroup. */ +public final class BatchAccountListByResourceGroupSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountListByResourceGroup.json + */ + /** + * Sample code: BatchAccountListByResourceGroup. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountListByResourceGroup(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().listByResourceGroup("default-azurebatch-japaneast", Context.NONE); + } +} +``` + +### BatchAccount_ListDetectors + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount ListDetectors. */ +public final class BatchAccountListDetectorsSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/DetectorList.json + */ + /** + * Sample code: ListDetectors. + * + * @param manager Entry point to BatchManager. + */ + public static void listDetectors(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().listDetectors("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } +} +``` + +### BatchAccount_ListOutboundNetworkDependenciesEndpoints + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount ListOutboundNetworkDependenciesEndpoints. */ +public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json + */ + /** + * Sample code: ListOutboundNetworkDependencies. + * + * @param manager Entry point to BatchManager. + */ + public static void listOutboundNetworkDependencies(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .listOutboundNetworkDependenciesEndpoints("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } +} +``` + +### BatchAccount_RegenerateKey + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.models.AccountKeyType; +import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters; + +/** Samples for BatchAccount RegenerateKey. */ +public final class BatchAccountRegenerateKeySamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountRegenerateKey.json + */ + /** + * Sample code: BatchAccountRegenerateKey. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountRegenerateKey(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .regenerateKeyWithResponse( + "default-azurebatch-japaneast", + "sampleacct", + new BatchAccountRegenerateKeyParameters().withKeyName(AccountKeyType.PRIMARY), + Context.NONE); + } +} +``` + +### BatchAccount_SynchronizeAutoStorageKeys + +```java +import com.azure.core.util.Context; + +/** Samples for BatchAccount SynchronizeAutoStorageKeys. */ +public final class BatchAccountSynchronizeAutoStorageKeysSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountSynchronizeAutoStorageKeys.json + */ + /** + * Sample code: BatchAccountSynchronizeAutoStorageKeys. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountSynchronizeAutoStorageKeys(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .synchronizeAutoStorageKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } +} +``` + +### BatchAccount_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; +import com.azure.resourcemanager.batch.models.BatchAccount; + +/** Samples for BatchAccount Update. */ +public final class BatchAccountUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountUpdate.json + */ + /** + * Sample code: BatchAccountUpdate. + * + * @param manager Entry point to BatchManager. + */ + public static void batchAccountUpdate(com.azure.resourcemanager.batch.BatchManager manager) { + BatchAccount resource = + manager + .batchAccounts() + .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE) + .getValue(); + resource + .update() + .withAutoStorage( + new AutoStorageBaseProperties() + .withStorageAccountId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + .apply(); + } +} +``` + +### Certificate_CancelDeletion + +```java +import com.azure.core.util.Context; + +/** Samples for Certificate CancelDeletion. */ +public final class CertificateCancelDeletionSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCancelDeletion.json + */ + /** + * Sample code: CertificateCancelDeletion. + * + * @param manager Entry point to BatchManager. + */ + public static void certificateCancelDeletion(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .cancelDeletionWithResponse( + "default-azurebatch-japaneast", + "sampleacct", + "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", + Context.NONE); + } +} +``` + +### Certificate_Create + +```java +import com.azure.resourcemanager.batch.models.CertificateFormat; + +/** Samples for Certificate Create. */ +public final class CertificateCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCreate_Full.json + */ + /** + * Sample code: CreateCertificate - Full. + * + * @param manager Entry point to BatchManager. + */ + public static void createCertificateFull(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withData("MIIJsgIBAzCCCW4GCSqGSIb3DQE...") + .withPassword("") + .withThumbprintAlgorithm("sha1") + .withThumbprint("0a0e4f50d51beadeac1d35afc5116098e7902e6e") + .withFormat(CertificateFormat.PFX) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCreate_Minimal.json + */ + /** + * Sample code: CreateCertificate - Minimal Pfx. + * + * @param manager Entry point to BatchManager. + */ + public static void createCertificateMinimalPfx(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withData("MIIJsgIBAzCCCW4GCSqGSIb3DQE...") + .withPassword("") + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCreate_MinimalCer.json + */ + /** + * Sample code: CreateCertificate - Minimal Cer. + * + * @param manager Entry point to BatchManager. + */ + public static void createCertificateMinimalCer(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withData("MIICrjCCAZagAwI...") + .withFormat(CertificateFormat.CER) + .create(); + } +} +``` + +### Certificate_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Certificate Delete. */ +public final class CertificateDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateDelete.json + */ + /** + * Sample code: CertificateDelete. + * + * @param manager Entry point to BatchManager. + */ + public static void certificateDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .delete( + "default-azurebatch-japaneast", + "sampleacct", + "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", + Context.NONE); + } +} +``` + +### Certificate_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Certificate Get. */ +public final class CertificateGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateGetWithDeletionError.json + */ + /** + * Sample code: Get Certificate with Deletion Error. + * + * @param manager Entry point to BatchManager. + */ + public static void getCertificateWithDeletionError(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .getWithResponse( + "default-azurebatch-japaneast", + "sampleacct", + "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", + Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateGet.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to BatchManager. + */ + public static void getCertificate(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .getWithResponse( + "default-azurebatch-japaneast", + "sampleacct", + "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", + Context.NONE); + } +} +``` + +### Certificate_ListByBatchAccount + +```java +import com.azure.core.util.Context; + +/** Samples for Certificate ListByBatchAccount. */ +public final class CertificateListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateListWithFilter.json + */ + /** + * Sample code: ListCertificates - Filter and Select. + * + * @param manager Entry point to BatchManager. + */ + public static void listCertificatesFilterAndSelect(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .listByBatchAccount( + "default-azurebatch-japaneast", + "sampleacct", + null, + "properties/format,properties/provisioningState", + "properties/provisioningStateTransitionTime gt '2017-05-01' or properties/provisioningState eq" + + " 'Failed'", + Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateList.json + */ + /** + * Sample code: ListCertificates. + * + * @param manager Entry point to BatchManager. + */ + public static void listCertificates(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .certificates() + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 1, null, null, Context.NONE); + } +} +``` + +### Certificate_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.models.Certificate; + +/** Samples for Certificate Update. */ +public final class CertificateUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateUpdate.json + */ + /** + * Sample code: UpdateCertificate. + * + * @param manager Entry point to BatchManager. + */ + public static void updateCertificate(com.azure.resourcemanager.batch.BatchManager manager) { + Certificate resource = + manager + .certificates() + .getWithResponse( + "default-azurebatch-japaneast", + "sampleacct", + "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", + Context.NONE) + .getValue(); + resource.update().withData("MIIJsgIBAzCCCW4GCSqGSIb3DQE...").withPassword("").apply(); + } +} +``` + +### Location_CheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; + +/** Samples for Location CheckNameAvailability. */ +public final class LocationCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationCheckNameAvailability_AlreadyExists.json + */ + /** + * Sample code: LocationCheckNameAvailability_AlreadyExists. + * + * @param manager Entry point to BatchManager. + */ + public static void locationCheckNameAvailabilityAlreadyExists( + com.azure.resourcemanager.batch.BatchManager manager) { + manager + .locations() + .checkNameAvailabilityWithResponse( + "japaneast", new CheckNameAvailabilityParameters().withName("existingaccountname"), Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationCheckNameAvailability_Available.json + */ + /** + * Sample code: LocationCheckNameAvailability_Available. + * + * @param manager Entry point to BatchManager. + */ + public static void locationCheckNameAvailabilityAvailable(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .locations() + .checkNameAvailabilityWithResponse( + "japaneast", new CheckNameAvailabilityParameters().withName("newaccountname"), Context.NONE); + } +} +``` + +### Location_GetQuotas + +```java +import com.azure.core.util.Context; + +/** Samples for Location GetQuotas. */ +public final class LocationGetQuotasSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationGetQuotas.json + */ + /** + * Sample code: LocationGetQuotas. + * + * @param manager Entry point to BatchManager. + */ + public static void locationGetQuotas(com.azure.resourcemanager.batch.BatchManager manager) { + manager.locations().getQuotasWithResponse("japaneast", Context.NONE); + } +} +``` + +### Location_ListSupportedCloudServiceSkus + +```java +import com.azure.core.util.Context; + +/** Samples for Location ListSupportedCloudServiceSkus. */ +public final class LocationListSupportedCloudServiceSkusSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationListCloudServiceSkus.json + */ + /** + * Sample code: LocationListCloudServiceSkus. + * + * @param manager Entry point to BatchManager. + */ + public static void locationListCloudServiceSkus(com.azure.resourcemanager.batch.BatchManager manager) { + manager.locations().listSupportedCloudServiceSkus("japaneast", null, null, Context.NONE); + } +} +``` + +### Location_ListSupportedVirtualMachineSkus + +```java +import com.azure.core.util.Context; + +/** Samples for Location ListSupportedVirtualMachineSkus. */ +public final class LocationListSupportedVirtualMachineSkusSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationListVirtualMachineSkus.json + */ + /** + * Sample code: LocationListVirtualMachineSkus. + * + * @param manager Entry point to BatchManager. + */ + public static void locationListVirtualMachineSkus(com.azure.resourcemanager.batch.BatchManager manager) { + manager.locations().listSupportedVirtualMachineSkus("japaneast", null, null, Context.NONE); + } +} +``` + +### Operations_List + +```java +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/OperationsList.json + */ + /** + * Sample code: OperationsList. + * + * @param manager Entry point to BatchManager. + */ + public static void operationsList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.operations().list(Context.NONE); + } +} +``` + +### Pool_Create + +```java +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.batch.models.ApplicationPackageReference; +import com.azure.resourcemanager.batch.models.AutoScaleSettings; +import com.azure.resourcemanager.batch.models.AutoUserScope; +import com.azure.resourcemanager.batch.models.AutoUserSpecification; +import com.azure.resourcemanager.batch.models.BatchPoolIdentity; +import com.azure.resourcemanager.batch.models.CachingType; +import com.azure.resourcemanager.batch.models.CertificateReference; +import com.azure.resourcemanager.batch.models.CertificateStoreLocation; +import com.azure.resourcemanager.batch.models.CertificateVisibility; +import com.azure.resourcemanager.batch.models.CloudServiceConfiguration; +import com.azure.resourcemanager.batch.models.ComputeNodeDeallocationOption; +import com.azure.resourcemanager.batch.models.ComputeNodeFillType; +import com.azure.resourcemanager.batch.models.DataDisk; +import com.azure.resourcemanager.batch.models.DeploymentConfiguration; +import com.azure.resourcemanager.batch.models.DiffDiskPlacement; +import com.azure.resourcemanager.batch.models.DiffDiskSettings; +import com.azure.resourcemanager.batch.models.DiskEncryptionConfiguration; +import com.azure.resourcemanager.batch.models.DiskEncryptionTarget; +import com.azure.resourcemanager.batch.models.ElevationLevel; +import com.azure.resourcemanager.batch.models.EnvironmentSetting; +import com.azure.resourcemanager.batch.models.FixedScaleSettings; +import com.azure.resourcemanager.batch.models.ImageReference; +import com.azure.resourcemanager.batch.models.InboundEndpointProtocol; +import com.azure.resourcemanager.batch.models.InboundNatPool; +import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; +import com.azure.resourcemanager.batch.models.IpAddressProvisioningType; +import com.azure.resourcemanager.batch.models.LinuxUserConfiguration; +import com.azure.resourcemanager.batch.models.MetadataItem; +import com.azure.resourcemanager.batch.models.NetworkConfiguration; +import com.azure.resourcemanager.batch.models.NetworkSecurityGroupRule; +import com.azure.resourcemanager.batch.models.NetworkSecurityGroupRuleAccess; +import com.azure.resourcemanager.batch.models.NodePlacementConfiguration; +import com.azure.resourcemanager.batch.models.NodePlacementPolicyType; +import com.azure.resourcemanager.batch.models.OSDisk; +import com.azure.resourcemanager.batch.models.PoolEndpointConfiguration; +import com.azure.resourcemanager.batch.models.PoolIdentityType; +import com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration; +import com.azure.resourcemanager.batch.models.ResourceFile; +import com.azure.resourcemanager.batch.models.ScaleSettings; +import com.azure.resourcemanager.batch.models.StartTask; +import com.azure.resourcemanager.batch.models.StorageAccountType; +import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy; +import com.azure.resourcemanager.batch.models.UserAccount; +import com.azure.resourcemanager.batch.models.UserAssignedIdentities; +import com.azure.resourcemanager.batch.models.UserIdentity; +import com.azure.resourcemanager.batch.models.VMExtension; +import com.azure.resourcemanager.batch.models.VirtualMachineConfiguration; +import com.azure.resourcemanager.batch.models.WindowsConfiguration; +import java.io.IOException; +import java.time.Duration; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Pool Create. */ +public final class PoolCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_SharedImageGallery.json + */ + /** + * Sample code: CreatePool - Custom Image. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withImageReference( + new ImageReference() + .withId( + "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")) + .withNodeAgentSkuId("batch.node.ubuntu 18.04"))) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_CloudServiceConfiguration.json + */ + /** + * Sample code: CreatePool - Full CloudServiceConfiguration. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolFullCloudServiceConfiguration(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withDisplayName("my-pool-name") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withCloudServiceConfiguration( + new CloudServiceConfiguration().withOsFamily("4").withOsVersion("WA-GUEST-OS-4.45_201708-01"))) + .withScaleSettings( + new ScaleSettings() + .withFixedScale( + new FixedScaleSettings() + .withResizeTimeout(Duration.parse("PT8M")) + .withTargetDedicatedNodes(6) + .withTargetLowPriorityNodes(28) + .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION))) + .withInterNodeCommunication(InterNodeCommunicationState.ENABLED) + .withNetworkConfiguration( + new NetworkConfiguration() + .withSubnetId( + "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123") + .withPublicIpAddressConfiguration( + new PublicIpAddressConfiguration() + .withProvision(IpAddressProvisioningType.USER_MANAGED) + .withIpAddressIds( + Arrays + .asList( + "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135", + "/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268")))) + .withTaskSlotsPerNode(13) + .withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK)) + .withUserAccounts( + Arrays + .asList( + new UserAccount() + .withName("username1") + .withPassword("") + .withElevationLevel(ElevationLevel.ADMIN) + .withLinuxUserConfiguration( + new LinuxUserConfiguration() + .withUid(1234) + .withGid(4567) + .withSshPrivateKey("sshprivatekeyvalue")))) + .withMetadata( + Arrays + .asList( + new MetadataItem().withName("metadata-1").withValue("value-1"), + new MetadataItem().withName("metadata-2").withValue("value-2"))) + .withStartTask( + new StartTask() + .withCommandLine("cmd /c SET") + .withResourceFiles( + Arrays + .asList( + new ResourceFile() + .withHttpUrl("https://testaccount.blob.core.windows.net/example-blob-file") + .withFilePath("c:\\temp\\gohere") + .withFileMode("777"))) + .withEnvironmentSettings( + Arrays.asList(new EnvironmentSetting().withName("MYSET").withValue("1234"))) + .withUserIdentity( + new UserIdentity() + .withAutoUser( + new AutoUserSpecification() + .withScope(AutoUserScope.POOL) + .withElevationLevel(ElevationLevel.ADMIN))) + .withMaxTaskRetryCount(6) + .withWaitForSuccess(true)) + .withCertificates( + Arrays + .asList( + new CertificateReference() + .withId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567") + .withStoreLocation(CertificateStoreLocation.LOCAL_MACHINE) + .withStoreName("MY") + .withVisibility(Arrays.asList(CertificateVisibility.REMOTE_USER)))) + .withApplicationPackages( + Arrays + .asList( + new ApplicationPackageReference() + .withId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234") + .withVersion("asdf"))) + .withApplicationLicenses(Arrays.asList("app-license0", "app-license1")) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json + */ + /** + * Sample code: CreatePool - Minimal CloudServiceConfiguration. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolMinimalCloudServiceConfiguration( + com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withCloudServiceConfiguration(new CloudServiceConfiguration().withOsFamily("5"))) + .withScaleSettings(new ScaleSettings().withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(3))) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json + */ + /** + * Sample code: CreatePool - Minimal VirtualMachineConfiguration. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolMinimalVirtualMachineConfiguration( + com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withImageReference( + new ImageReference() + .withPublisher("Canonical") + .withOffer("UbuntuServer") + .withSku("18.04-LTS") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.ubuntu 18.04"))) + .withScaleSettings( + new ScaleSettings() + .withAutoScale( + new AutoScaleSettings() + .withFormula("$TargetDedicatedNodes=1") + .withEvaluationInterval(Duration.parse("PT5M")))) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_NoPublicIPAddresses.json + */ + /** + * Sample code: CreatePool - No public IP. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withImageReference( + new ImageReference() + .withId( + "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")) + .withNodeAgentSkuId("batch.node.ubuntu 18.04"))) + .withNetworkConfiguration( + new NetworkConfiguration() + .withSubnetId( + "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123") + .withPublicIpAddressConfiguration( + new PublicIpAddressConfiguration() + .withProvision(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES))) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json + */ + /** + * Sample code: CreatePool - VirtualMachineConfiguration Extensions. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolVirtualMachineConfigurationExtensions( + com.azure.resourcemanager.batch.BatchManager manager) throws IOException { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withImageReference( + new ImageReference() + .withPublisher("Canonical") + .withOffer("0001-com-ubuntu-server-focal") + .withSku("20_04-lts")) + .withNodeAgentSkuId("batch.node.ubuntu 20.04") + .withExtensions( + Arrays + .asList( + new VMExtension() + .withName("batchextension1") + .withPublisher("Microsoft.Azure.Security.Monitoring") + .withType("SecurityMonitoringForLinux") + .withTypeHandlerVersion("1.0") + .withAutoUpgradeMinorVersion(true) + .withSettings( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"settingsKey\":\"settingsValue\"}", + Object.class, + SerializerEncoding.JSON)) + .withProtectedSettings( + SerializerFactory + .createDefaultManagementSerializerAdapter() + .deserialize( + "{\"protectedSettingsKey\":\"protectedSettingsValue\"}", + Object.class, + SerializerEncoding.JSON)))))) + .withScaleSettings( + new ScaleSettings() + .withAutoScale( + new AutoScaleSettings() + .withFormula("$TargetDedicatedNodes=1") + .withEvaluationInterval(Duration.parse("PT5M")))) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_UserAssignedIdentities.json + */ + /** + * Sample code: CreatePool - UserAssignedIdentities. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withIdentity( + new BatchPoolIdentity() + .withType(PoolIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedIdentities(), + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", + new UserAssignedIdentities()))) + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withImageReference( + new ImageReference() + .withPublisher("Canonical") + .withOffer("UbuntuServer") + .withSku("18.04-LTS") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.ubuntu 18.04"))) + .withScaleSettings( + new ScaleSettings() + .withAutoScale( + new AutoScaleSettings() + .withFormula("$TargetDedicatedNodes=1") + .withEvaluationInterval(Duration.parse("PT5M")))) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_PublicIPs.json + */ + /** + * Sample code: CreatePool - Public IPs. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolPublicIPs(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withImageReference( + new ImageReference() + .withId( + "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1")) + .withNodeAgentSkuId("batch.node.ubuntu 18.04"))) + .withNetworkConfiguration( + new NetworkConfiguration() + .withSubnetId( + "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123") + .withPublicIpAddressConfiguration( + new PublicIpAddressConfiguration() + .withProvision(IpAddressProvisioningType.USER_MANAGED) + .withIpAddressIds( + Arrays + .asList( + "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135")))) + .create(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_VirtualMachineConfiguration.json + */ + /** + * Sample code: CreatePool - Full VirtualMachineConfiguration. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolFullVirtualMachineConfiguration(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D4") + .withDeploymentConfiguration( + new DeploymentConfiguration() + .withVirtualMachineConfiguration( + new VirtualMachineConfiguration() + .withImageReference( + new ImageReference() + .withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2016-Datacenter-SmallDisk") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64") + .withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false)) + .withDataDisks( + Arrays + .asList( + new DataDisk() + .withLun(0) + .withCaching(CachingType.READ_WRITE) + .withDiskSizeGB(30) + .withStorageAccountType(StorageAccountType.PREMIUM_LRS), + new DataDisk() + .withLun(1) + .withCaching(CachingType.NONE) + .withDiskSizeGB(200) + .withStorageAccountType(StorageAccountType.STANDARD_LRS))) + .withLicenseType("Windows_Server") + .withDiskEncryptionConfiguration( + new DiskEncryptionConfiguration() + .withTargets( + Arrays + .asList(DiskEncryptionTarget.OS_DISK, DiskEncryptionTarget.TEMPORARY_DISK))) + .withNodePlacementConfiguration( + new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.ZONAL)) + .withOsDisk( + new OSDisk() + .withEphemeralOSDiskSettings( + new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK))))) + .withScaleSettings( + new ScaleSettings() + .withAutoScale( + new AutoScaleSettings() + .withFormula("$TargetDedicatedNodes=1") + .withEvaluationInterval(Duration.parse("PT5M")))) + .withNetworkConfiguration( + new NetworkConfiguration() + .withEndpointConfiguration( + new PoolEndpointConfiguration() + .withInboundNatPools( + Arrays + .asList( + new InboundNatPool() + .withName("testnat") + .withProtocol(InboundEndpointProtocol.TCP) + .withBackendPort(12001) + .withFrontendPortRangeStart(15000) + .withFrontendPortRangeEnd(15100) + .withNetworkSecurityGroupRules( + Arrays + .asList( + new NetworkSecurityGroupRule() + .withPriority(150) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("192.100.12.45") + .withSourcePortRanges(Arrays.asList("1", "2")), + new NetworkSecurityGroupRule() + .withPriority(3500) + .withAccess(NetworkSecurityGroupRuleAccess.DENY) + .withSourceAddressPrefix("*") + .withSourcePortRanges(Arrays.asList("*")))))))) + .create(); + } + + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Pool_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Pool Delete. */ +public final class PoolDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolDelete.json + */ + /** + * Sample code: DeletePool. + * + * @param manager Entry point to BatchManager. + */ + public static void deletePool(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().delete("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + } +} +``` + +### Pool_DisableAutoScale + +```java +import com.azure.core.util.Context; + +/** Samples for Pool DisableAutoScale. */ +public final class PoolDisableAutoScaleSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolDisableAutoScale.json + */ + /** + * Sample code: Disable AutoScale. + * + * @param manager Entry point to BatchManager. + */ + public static void disableAutoScale(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .disableAutoScaleWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + } +} +``` + +### Pool_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Pool Get. */ +public final class PoolGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json + */ + /** + * Sample code: GetPool - VirtualMachineConfiguration Extensions. + * + * @param manager Entry point to BatchManager. + */ + public static void getPoolVirtualMachineConfigurationExtensions( + com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolGet.json + */ + /** + * Sample code: GetPool. + * + * @param manager Entry point to BatchManager. + */ + public static void getPool(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + } +} +``` + +### Pool_ListByBatchAccount + +```java +import com.azure.core.util.Context; + +/** Samples for Pool ListByBatchAccount. */ +public final class PoolListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolList.json + */ + /** + * Sample code: ListPool. + * + * @param manager Entry point to BatchManager. + */ + public static void listPool(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, null, null, Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolListWithFilter.json + */ + /** + * Sample code: ListPoolWithFilter. + * + * @param manager Entry point to BatchManager. + */ + public static void listPoolWithFilter(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .listByBatchAccount( + "default-azurebatch-japaneast", + "sampleacct", + 50, + "properties/allocationState,properties/provisioningStateTransitionTime,properties/currentDedicatedNodes,properties/currentLowPriorityNodes", + "startswith(name, 'po') or (properties/allocationState eq 'Steady' and" + + " properties/provisioningStateTransitionTime lt datetime'2017-02-02')", + Context.NONE); + } +} +``` + +### Pool_StopResize + +```java +import com.azure.core.util.Context; + +/** Samples for Pool StopResize. */ +public final class PoolStopResizeSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolStopResize.json + */ + /** + * Sample code: StopPoolResize. + * + * @param manager Entry point to BatchManager. + */ + public static void stopPoolResize(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().stopResizeWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + } +} +``` + +### Pool_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.models.ApplicationPackageReference; +import com.azure.resourcemanager.batch.models.AutoScaleSettings; +import com.azure.resourcemanager.batch.models.CertificateReference; +import com.azure.resourcemanager.batch.models.CertificateStoreLocation; +import com.azure.resourcemanager.batch.models.ComputeNodeDeallocationOption; +import com.azure.resourcemanager.batch.models.FixedScaleSettings; +import com.azure.resourcemanager.batch.models.MetadataItem; +import com.azure.resourcemanager.batch.models.Pool; +import com.azure.resourcemanager.batch.models.ScaleSettings; +import com.azure.resourcemanager.batch.models.StartTask; +import java.time.Duration; +import java.util.Arrays; + +/** Samples for Pool Update. */ +public final class PoolUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_EnableAutoScale.json + */ + /** + * Sample code: UpdatePool - Enable Autoscale. + * + * @param manager Entry point to BatchManager. + */ + public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.BatchManager manager) { + Pool resource = + manager + .pools() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getValue(); + resource + .update() + .withScaleSettings( + new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=34"))) + .apply(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_RemoveStartTask.json + */ + /** + * Sample code: UpdatePool - Remove Start Task. + * + * @param manager Entry point to BatchManager. + */ + public static void updatePoolRemoveStartTask(com.azure.resourcemanager.batch.BatchManager manager) { + Pool resource = + manager + .pools() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getValue(); + resource.update().withStartTask(new StartTask()).apply(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_ResizePool.json + */ + /** + * Sample code: UpdatePool - Resize Pool. + * + * @param manager Entry point to BatchManager. + */ + public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchManager manager) { + Pool resource = + manager + .pools() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getValue(); + resource + .update() + .withScaleSettings( + new ScaleSettings() + .withFixedScale( + new FixedScaleSettings() + .withResizeTimeout(Duration.parse("PT8M")) + .withTargetDedicatedNodes(5) + .withTargetLowPriorityNodes(0) + .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION))) + .apply(); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_OtherProperties.json + */ + /** + * Sample code: UpdatePool - Other Properties. + * + * @param manager Entry point to BatchManager. + */ + public static void updatePoolOtherProperties(com.azure.resourcemanager.batch.BatchManager manager) { + Pool resource = + manager + .pools() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getValue(); + resource + .update() + .withMetadata(Arrays.asList(new MetadataItem().withName("key1").withValue("value1"))) + .withCertificates( + Arrays + .asList( + new CertificateReference() + .withId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567") + .withStoreLocation(CertificateStoreLocation.LOCAL_MACHINE) + .withStoreName("MY"))) + .withApplicationPackages( + Arrays + .asList( + new ApplicationPackageReference() + .withId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234"), + new ApplicationPackageReference() + .withId( + "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_5678") + .withVersion("1.0"))) + .apply(); + } +} +``` + +### PrivateEndpointConnection_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnection Get. */ +public final class PrivateEndpointConnectionGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionGet.json + */ + /** + * Sample code: GetPrivateEndpointConnection. + * + * @param manager Entry point to BatchManager. + */ + public static void getPrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .privateEndpointConnections() + .getWithResponse( + "default-azurebatch-japaneast", + "sampleacct", + "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", + Context.NONE); + } +} +``` + +### PrivateEndpointConnection_ListByBatchAccount + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateEndpointConnection ListByBatchAccount. */ +public final class PrivateEndpointConnectionListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionsList.json + */ + /** + * Sample code: ListPrivateEndpointConnections. + * + * @param manager Entry point to BatchManager. + */ + public static void listPrivateEndpointConnections(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .privateEndpointConnections() + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + } +} +``` + +### PrivateEndpointConnection_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; + +/** Samples for PrivateEndpointConnection Update. */ +public final class PrivateEndpointConnectionUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionUpdate.json + */ + /** + * Sample code: UpdatePrivateEndpointConnection. + * + * @param manager Entry point to BatchManager. + */ + public static void updatePrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .privateEndpointConnections() + .update( + "default-azurebatch-japaneast", + "sampleacct", + "testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", + new PrivateEndpointConnectionInner() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState() + .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) + .withDescription("Approved by xyz.abc@company.com")), + null, + Context.NONE); + } +} +``` + +### PrivateLinkResource_Get + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResource Get. */ +public final class PrivateLinkResourceGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateLinkResourceGet.json + */ + /** + * Sample code: GetPrivateLinkResource. + * + * @param manager Entry point to BatchManager. + */ + public static void getPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .privateLinkResources() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "sampleacct", Context.NONE); + } +} +``` + +### PrivateLinkResource_ListByBatchAccount + +```java +import com.azure.core.util.Context; + +/** Samples for PrivateLinkResource ListByBatchAccount. */ +public final class PrivateLinkResourceListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateLinkResourcesList.json + */ + /** + * Sample code: ListPrivateLinkResource. + * + * @param manager Entry point to BatchManager. + */ + public static void listPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .privateLinkResources() + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + } +} +``` + diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index 800c8bb190b5..1e651f9b0ec1 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Batch Management - This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2021-06. + This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2022-01. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java index c84c8c5cfa63..6fd254abdce3 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java @@ -8,6 +8,7 @@ import com.azure.core.http.HttpClient; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; @@ -20,11 +21,11 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.fluent.BatchManagement; +import com.azure.resourcemanager.batch.fluent.BatchManagementClient; import com.azure.resourcemanager.batch.implementation.ApplicationPackagesImpl; import com.azure.resourcemanager.batch.implementation.ApplicationsImpl; import com.azure.resourcemanager.batch.implementation.BatchAccountsImpl; -import com.azure.resourcemanager.batch.implementation.BatchManagementBuilder; +import com.azure.resourcemanager.batch.implementation.BatchManagementClientBuilder; import com.azure.resourcemanager.batch.implementation.CertificatesImpl; import com.azure.resourcemanager.batch.implementation.LocationsImpl; import com.azure.resourcemanager.batch.implementation.OperationsImpl; @@ -45,8 +46,9 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.stream.Collectors; -/** Entry point to BatchManager. */ +/** Entry point to BatchManager. Batch Client. */ public final class BatchManager { private BatchAccounts batchAccounts; @@ -66,13 +68,13 @@ public final class BatchManager { private Pools pools; - private final BatchManagement clientObject; + private final BatchManagementClient clientObject; private BatchManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); this.clientObject = - new BatchManagementBuilder() + new BatchManagementClientBuilder() .pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) @@ -202,7 +204,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil .append("-") .append("com.azure.resourcemanager.batch") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -225,11 +227,24 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = @@ -315,10 +330,10 @@ public Pools pools() { } /** - * @return Wrapped service client BatchManagement providing direct access to the underlying auto-generated API + * @return Wrapped service client BatchManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. */ - public BatchManagement serviceClient() { + public BatchManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationPackagesClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationPackagesClient.java index 6dad4951d492..e84150a8e15a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationPackagesClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationPackagesClient.java @@ -49,7 +49,8 @@ ApplicationPackageInner activate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response activateWithResponse( @@ -92,7 +93,8 @@ ApplicationPackageInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -128,7 +130,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -161,7 +163,7 @@ ApplicationPackageInner 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 information about the specified application package. + * @return information about the specified application package along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -176,7 +178,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 result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName, String applicationName); @@ -192,7 +194,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 result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationsClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationsClient.java index f4d2c5358f2a..3c46b10f2caf 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationsClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationsClient.java @@ -38,7 +38,7 @@ public interface ApplicationsClient { * @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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response createWithResponse( @@ -71,7 +71,7 @@ Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( @@ -101,7 +101,7 @@ Response deleteWithResponse( * @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 information about the specified application. + * @return information about the specified application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -134,7 +134,7 @@ ApplicationInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -152,7 +152,7 @@ Response updateWithResponse( * @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 result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String accountName); @@ -167,7 +167,7 @@ Response updateWithResponse( * @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 result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchAccountsClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchAccountsClient.java index d0530a007036..1b93fc0fbd75 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchAccountsClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchAccountsClient.java @@ -13,6 +13,7 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.batch.fluent.models.BatchAccountInner; import com.azure.resourcemanager.batch.fluent.models.BatchAccountKeysInner; +import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; import com.azure.resourcemanager.batch.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.batch.models.BatchAccountCreateParameters; import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters; @@ -33,9 +34,9 @@ public interface BatchAccountsClient { * @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 contains information about an Azure Batch account. + * @return the {@link SyncPoller} for polling of contains information about an Azure Batch account. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BatchAccountInner> beginCreate( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters); @@ -53,9 +54,9 @@ SyncPoller, BatchAccountInner> 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 contains information about an Azure Batch account. + * @return the {@link SyncPoller} for polling of contains information about an Azure Batch account. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, BatchAccountInner> beginCreate( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, Context context); @@ -121,7 +122,7 @@ BatchAccountInner create( * @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 contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response updateWithResponse( @@ -135,9 +136,9 @@ Response updateWithResponse( * @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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName); /** @@ -149,9 +150,9 @@ Response updateWithResponse( * @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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context); /** @@ -201,7 +202,7 @@ Response updateWithResponse( * @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 information about the specified Batch account. + * @return information about the specified Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getByResourceGroupWithResponse( @@ -212,7 +213,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -224,7 +226,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); @@ -236,7 +239,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 information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName); @@ -249,7 +253,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 information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -277,7 +282,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 response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response synchronizeAutoStorageKeysWithResponse( @@ -314,7 +319,7 @@ BatchAccountKeysInner regenerateKey( * @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 set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response regenerateKeyWithResponse( @@ -346,11 +351,70 @@ 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 a set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getKeysWithResponse(String resourceGroupName, String accountName, Context context); + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDetectors(String resourceGroupName, String accountName); + + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDetectors(String resourceGroupName, String accountName, Context context); + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @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 information about the given detector for a given Batch account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DetectorResponseInner getDetector(String resourceGroupName, String accountName, String detectorId); + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @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 information about the given detector for a given Batch account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDetectorWithResponse( + String resourceGroupName, String accountName, String detectorId, Context context); + /** * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service * administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your @@ -363,7 +427,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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listOutboundNetworkDependenciesEndpoints( @@ -382,7 +446,7 @@ PagedIterable listOutboundNetworkDependenciesE * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listOutboundNetworkDependenciesEndpoints( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagement.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java similarity index 96% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagement.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java index dd2c8e05e25f..29df78dc2098 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagement.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java @@ -7,8 +7,8 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for BatchManagement class. */ -public interface BatchManagement { +/** The interface for BatchManagementClient class. */ +public interface BatchManagementClient { /** * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/CertificatesClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/CertificatesClient.java index c2a055cae8cf..744baa622a1f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/CertificatesClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/CertificatesClient.java @@ -27,7 +27,7 @@ public interface CertificatesClient { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -46,7 +46,7 @@ public interface CertificatesClient { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount( @@ -160,9 +160,9 @@ CertificatesUpdateResponse updateWithResponse( * @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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String certificateName); @@ -177,9 +177,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String certificateName, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/LocationsClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/LocationsClient.java index 557c8d6eb3bb..763ccd23e0a1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/LocationsClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/LocationsClient.java @@ -36,7 +36,8 @@ public interface LocationsClient { * @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 Batch service quotas for the specified subscription at the given location. + * @return the Batch service quotas for the specified subscription at the given location along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getQuotasWithResponse(String locationName, Context context); @@ -48,7 +49,8 @@ public interface LocationsClient { * @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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSupportedVirtualMachineSkus(String locationName); @@ -63,7 +65,8 @@ public interface LocationsClient { * @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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSupportedVirtualMachineSkus( @@ -76,7 +79,8 @@ PagedIterable listSupportedVirtualMachineSkus( * @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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSupportedCloudServiceSkus(String locationName); @@ -91,7 +95,8 @@ PagedIterable listSupportedVirtualMachineSkus( * @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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listSupportedCloudServiceSkus( @@ -120,7 +125,7 @@ CheckNameAvailabilityResultInner checkNameAvailability( * @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 CheckNameAvailability operation response. + * @return the CheckNameAvailability operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response checkNameAvailabilityWithResponse( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/OperationsClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/OperationsClient.java index 102a74354c69..d390b758f0e0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/OperationsClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/OperationsClient.java @@ -17,7 +17,7 @@ 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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); @@ -29,7 +29,7 @@ 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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PoolsClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PoolsClient.java index 2e42e0e0d21d..6f6d9774380b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PoolsClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PoolsClient.java @@ -27,7 +27,7 @@ public interface PoolsClient { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -49,7 +49,7 @@ public interface PoolsClient { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount( @@ -152,9 +152,9 @@ PoolsUpdateResponse updateWithResponse( * @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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName); /** @@ -167,9 +167,9 @@ PoolsUpdateResponse updateWithResponse( * @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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String poolName, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java index e38582df1f23..b8c8ab1302e8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java @@ -23,7 +23,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -38,7 +38,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount( @@ -71,7 +71,7 @@ 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 information about the specified private endpoint connection. + * @return information about the specified private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( @@ -91,9 +91,9 @@ 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 contains information about a private link resource. + * @return the {@link SyncPoller} for polling of contains information about a private link resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String accountName, @@ -116,9 +116,9 @@ 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 contains information about a private link resource. + * @return the {@link SyncPoller} for polling of contains information about a private link resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String accountName, diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateLinkResourcesClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateLinkResourcesClient.java index 72ce20f09f61..0098137a7005 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateLinkResourcesClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/PrivateLinkResourcesClient.java @@ -21,7 +21,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -36,7 +36,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByBatchAccount( @@ -66,7 +66,7 @@ PagedIterable listByBatchAccount( * @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 information about the specified private link resource. + * @return information about the specified private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java index 00221efeca71..3040fcad73ad 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java @@ -168,7 +168,7 @@ public Integer dedicatedCoreQuota() { } /** - * Get the lowPriorityCoreQuota property: The low-priority core quota for the Batch account. For accounts with + * Get the lowPriorityCoreQuota property: The Spot/low-priority core quota for the Batch account. For accounts with * PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. * * @return the lowPriorityCoreQuota value. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java index cdc6e055a500..49f3084cc2fc 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java @@ -83,8 +83,8 @@ public final class BatchAccountProperties { private Integer dedicatedCoreQuota; /* - * The low-priority core quota for the Batch account. For accounts with - * PoolAllocationMode set to UserSubscription, quota is managed on the + * The Spot/low-priority core quota for the Batch account. For accounts + * with PoolAllocationMode set to UserSubscription, quota is managed on the * subscription so this value is not returned. */ @JsonProperty(value = "lowPriorityCoreQuota", access = JsonProperty.Access.WRITE_ONLY) @@ -220,7 +220,7 @@ public Integer dedicatedCoreQuota() { } /** - * Get the lowPriorityCoreQuota property: The low-priority core quota for the Batch account. For accounts with + * Get the lowPriorityCoreQuota property: The Spot/low-priority core quota for the Batch account. For accounts with * PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. * * @return the lowPriorityCoreQuota value. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseInner.java new file mode 100644 index 000000000000..9513e01d0853 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseInner.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.fluent.models; + +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; + +/** Contains the information for a detector. */ +@Fluent +public final class DetectorResponseInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorResponseInner.class); + + /* + * The properties associated with the detector. + */ + @JsonProperty(value = "properties") + private DetectorResponseProperties innerProperties; + + /* + * The ETag of the resource, used for concurrency statements. + */ + @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) + private String etag; + + /** + * Get the innerProperties property: The properties associated with the detector. + * + * @return the innerProperties value. + */ + private DetectorResponseProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + public String etag() { + return this.etag; + } + + /** + * Get the value property: A base64 encoded string that represents the content of a detector. + * + * @return the value value. + */ + public String value() { + return this.innerProperties() == null ? null : this.innerProperties().value(); + } + + /** + * Set the value property: A base64 encoded string that represents the content of a detector. + * + * @param value the value value to set. + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withValue(String value) { + if (this.innerProperties() == null) { + this.innerProperties = new DetectorResponseProperties(); + } + this.innerProperties().withValue(value); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseProperties.java new file mode 100644 index 000000000000..ac9f2f0ef6fb --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseProperties.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.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; + +/** Detector response properties. */ +@Fluent +public final class DetectorResponseProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorResponseProperties.class); + + /* + * A base64 encoded string that represents the content of a detector. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the value property: A base64 encoded string that represents the content of a detector. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: A base64 encoded string that represents the content of a detector. + * + * @param value the value value to set. + * @return the DetectorResponseProperties object itself. + */ + public DetectorResponseProperties withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java index 6967a25236e4..b99975bad1f0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java @@ -248,7 +248,7 @@ public Integer currentDedicatedNodes() { } /** - * Get the currentLowPriorityNodes property: The number of low-priority compute nodes currently in the pool. + * Get the currentLowPriorityNodes property: The number of Spot/low-priority compute nodes currently in the pool. * * @return the currentLowPriorityNodes value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java index aa6b0c8addde..b3202b3ad0b5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java @@ -112,7 +112,7 @@ public final class PoolProperties { private Integer currentDedicatedNodes; /* - * The number of low-priority compute nodes currently in the pool. + * The number of Spot/low-priority compute nodes currently in the pool. */ @JsonProperty(value = "currentLowPriorityNodes", access = JsonProperty.Access.WRITE_ONLY) private Integer currentLowPriorityNodes; @@ -389,7 +389,7 @@ public Integer currentDedicatedNodes() { } /** - * Get the currentLowPriorityNodes property: The number of low-priority compute nodes currently in the pool. + * Get the currentLowPriorityNodes property: The number of Spot/low-priority compute nodes currently in the pool. * * @return the currentLowPriorityNodes value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java index 84e1c03ace96..3349317527bf 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for BatchManagement. null. */ +/** Package containing the inner data models for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.fluent.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java index 9dd56b992022..a4747ad952c9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for BatchManagement. null. */ +/** Package containing the service clients for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.fluent; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java index c734776fe44f..4a36c1049c97 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java @@ -44,25 +44,25 @@ public final class ApplicationPackagesClientImpl implements ApplicationPackagesC private final ApplicationPackagesService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of ApplicationPackagesClientImpl. * * @param client the instance of the service client containing this operation class. */ - ApplicationPackagesClientImpl(BatchManagementImpl client) { + ApplicationPackagesClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(ApplicationPackagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementApplicationPackages to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for BatchManagementClientApplicationPackages to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementAppli") + @ServiceInterface(name = "BatchManagementClien") private interface ApplicationPackagesService { @Headers({"Content-Type: application/json"}) @Post( @@ -174,7 +174,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 an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> activateWithResponseAsync( @@ -246,7 +247,8 @@ private Mono> activateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> activateWithResponseAsync( @@ -315,7 +317,8 @@ private Mono> activateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono activateAsync( @@ -372,7 +375,8 @@ public ApplicationPackageInner activate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response activateWithResponse( @@ -400,7 +404,8 @@ public Response activateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -471,7 +476,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 an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -539,7 +545,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 an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -571,7 +578,8 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -623,7 +631,8 @@ public ApplicationPackageInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -648,7 +657,7 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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( @@ -708,7 +717,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( @@ -764,7 +773,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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( @@ -800,7 +809,7 @@ public void delete(String resourceGroupName, String accountName, String applicat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -818,7 +827,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified application package. + * @return information about the specified application package along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -878,7 +888,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 information about the specified application package. + * @return information about the specified application package along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -934,7 +945,7 @@ 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 information about the specified application package. + * @return information about the specified application package on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -979,7 +990,7 @@ public ApplicationPackageInner 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 information about the specified application package. + * @return information about the specified application package along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -997,7 +1008,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 result of performing list application packages. + * @return the result of performing list application packages along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1063,7 +1075,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 result of performing list application packages. + * @return the result of performing list application packages along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1125,7 +1138,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1144,7 +1157,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 result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1166,7 +1179,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 result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1185,7 +1198,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 result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -1205,7 +1218,7 @@ public PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -1220,7 +1233,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 result of performing list application packages. + * @return the result of performing list application packages along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1256,7 +1270,8 @@ private Mono> listNextSinglePageAsync(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 result of performing list application packages. + * @return the result of performing list application packages 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/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java index f69dad67fe8a..4b1efb0ed325 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java @@ -216,7 +216,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, applicationName, versionName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, applicationName, versionName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java index e956e2b0f53a..77887db6e2d8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java @@ -43,25 +43,25 @@ public final class ApplicationsClientImpl implements ApplicationsClient { private final ApplicationsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of ApplicationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ApplicationsClientImpl(BatchManagementImpl client) { + ApplicationsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(ApplicationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementApplications to be used by the proxy service to + * The interface defining all the services for BatchManagementClientApplications to be used by the proxy service to * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementAppli") + @ServiceInterface(name = "BatchManagementClien") private interface ApplicationsService { @Headers({"Content-Type: application/json"}) @Put( @@ -166,7 +166,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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -226,7 +227,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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync( @@ -286,7 +288,7 @@ 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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -311,7 +313,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account. + * @return contains information about an application in a Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String accountName, String applicationName) { @@ -355,7 +357,7 @@ public ApplicationInner create(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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse( @@ -376,7 +378,7 @@ public Response createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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( @@ -431,7 +433,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( @@ -482,7 +484,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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String accountName, String applicationName) { @@ -515,7 +517,7 @@ public void delete(String resourceGroupName, String accountName, String applicat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse( @@ -532,7 +534,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified application. + * @return information about the specified application along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -587,7 +590,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 information about the specified application. + * @return information about the specified application along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -638,7 +642,7 @@ 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 information about the specified application. + * @return information about the specified application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String applicationName) { @@ -679,7 +683,7 @@ public ApplicationInner 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 information about the specified application. + * @return information about the specified application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -697,7 +701,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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -759,7 +764,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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -821,7 +827,7 @@ 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 contains information about an application in a Batch account. + * @return contains information about an application in a Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -866,7 +872,7 @@ public ApplicationInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -887,7 +893,8 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list applications. + * @return the result of performing list applications along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -947,7 +954,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 result of performing list applications. + * @return the result of performing list applications along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( @@ -1003,7 +1011,7 @@ private Mono> listSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName, Integer maxresults) { @@ -1020,7 +1028,7 @@ private PagedFlux listAsync(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String accountName) { @@ -1040,7 +1048,7 @@ private PagedFlux listAsync(String resourceGroupName, String a * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( @@ -1058,7 +1066,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 result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { @@ -1076,7 +1084,7 @@ public PagedIterable list(String resourceGroupName, String acc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( @@ -1091,7 +1099,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 result of performing list applications. + * @return the result of performing list applications along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1127,7 +1136,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 result of performing list applications. + * @return the result of performing list applications 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/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java index 4f8bf8c893b9..6381852ed969 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java @@ -148,7 +148,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id))); } - this.deleteWithResponse(resourceGroupName, accountName, applicationName, Context.NONE).getValue(); + this.deleteWithResponse(resourceGroupName, accountName, applicationName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java index e5fd98147bb6..79498283436e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java @@ -37,11 +37,13 @@ import com.azure.resourcemanager.batch.fluent.BatchAccountsClient; import com.azure.resourcemanager.batch.fluent.models.BatchAccountInner; import com.azure.resourcemanager.batch.fluent.models.BatchAccountKeysInner; +import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; import com.azure.resourcemanager.batch.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.batch.models.BatchAccountCreateParameters; import com.azure.resourcemanager.batch.models.BatchAccountListResult; import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters; import com.azure.resourcemanager.batch.models.BatchAccountUpdateParameters; +import com.azure.resourcemanager.batch.models.DetectorListResult; import com.azure.resourcemanager.batch.models.OutboundEnvironmentEndpointCollection; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; @@ -55,25 +57,25 @@ public final class BatchAccountsClientImpl implements BatchAccountsClient { private final BatchAccountsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of BatchAccountsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BatchAccountsClientImpl(BatchManagementImpl client) { + BatchAccountsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(BatchAccountsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementBatchAccounts to be used by the proxy service to + * The interface defining all the services for BatchManagementClientBatchAccounts to be used by the proxy service to * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementBatch") + @ServiceInterface(name = "BatchManagementClien") private interface BatchAccountsService { @Headers({"Content-Type: application/json"}) @Put( @@ -208,6 +210,37 @@ Mono> getKeys( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" + + "/{accountName}/detectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDetectors( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" + + "/{accountName}/detectors/{detectorId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getDetector( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("accountName") String accountName, + @PathParam("detectorId") String detectorId, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" @@ -243,6 +276,16 @@ Mono> listByResourceGroupNext( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDetectorsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -267,7 +310,8 @@ Mono> listOutboundNetworkDepende * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -327,7 +371,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 contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync( @@ -383,16 +428,20 @@ 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 contains information about an Azure Batch account. + * @return the {@link PollerFlux} for polling of contains information about an Azure Batch account. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchAccountInner> beginCreateAsync( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { Mono>> mono = createWithResponseAsync(resourceGroupName, accountName, parameters); return this .client .getLroResult( - mono, this.client.getHttpPipeline(), BatchAccountInner.class, BatchAccountInner.class, Context.NONE); + mono, + this.client.getHttpPipeline(), + BatchAccountInner.class, + BatchAccountInner.class, + this.client.getContext()); } /** @@ -409,9 +458,9 @@ private PollerFlux, BatchAccountInner> 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 contains information about an Azure Batch account. + * @return the {@link PollerFlux} for polling of contains information about an Azure Batch account. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, BatchAccountInner> beginCreateAsync( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, Context context) { context = this.client.mergeContext(context); @@ -436,9 +485,9 @@ private PollerFlux, BatchAccountInner> 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 contains information about an Azure Batch account. + * @return the {@link SyncPoller} for polling of contains information about an Azure Batch account. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchAccountInner> beginCreate( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { return beginCreateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); @@ -458,9 +507,9 @@ public SyncPoller, BatchAccountInner> 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 contains information about an Azure Batch account. + * @return the {@link SyncPoller} for polling of contains information about an Azure Batch account. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchAccountInner> beginCreate( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, Context context) { return beginCreateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); @@ -479,7 +528,7 @@ public SyncPoller, BatchAccountInner> 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 contains information about an Azure Batch account. + * @return contains information about an Azure Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -503,7 +552,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an Azure Batch account. + * @return contains information about an Azure Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -565,7 +614,8 @@ public BatchAccountInner create( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -621,7 +671,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 contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync( @@ -673,7 +724,7 @@ 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 contains information about an Azure Batch account. + * @return contains information about an Azure Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -716,7 +767,7 @@ public BatchAccountInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse( @@ -732,7 +783,7 @@ public Response updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) { @@ -780,7 +831,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( @@ -825,14 +876,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.SINGLE) + @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()); } /** @@ -844,9 +896,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, Context context) { context = this.client.mergeContext(context); @@ -864,9 +916,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { return beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); } @@ -880,9 +932,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); @@ -896,7 +948,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) { @@ -912,7 +964,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) { @@ -958,7 +1010,8 @@ public void delete(String resourceGroupName, String accountName, 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 information about the specified Batch account. + * @return information about the specified Batch account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1007,7 +1060,8 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified Batch account. + * @return information about the specified Batch account along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync( @@ -1052,7 +1106,7 @@ private Mono> getByResourceGroupWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified Batch account. + * @return information about the specified Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { @@ -1091,7 +1145,7 @@ public BatchAccountInner getByResourceGroup(String resourceGroupName, String acc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified Batch account. + * @return information about the specified Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getByResourceGroupWithResponse( @@ -1104,7 +1158,8 @@ public Response getByResourceGroupWithResponse( * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -1150,7 +1205,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription along with {@link PagedResponse} on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -1191,7 +1247,8 @@ private Mono> listSinglePageAsync(Context conte * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -1205,7 +1262,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -1218,7 +1276,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -1232,7 +1291,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -1246,7 +1306,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 information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { @@ -1298,7 +1359,8 @@ private Mono> listByResourceGroupSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync( @@ -1347,7 +1409,8 @@ private Mono> listByResourceGroupSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { @@ -1364,7 +1427,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { @@ -1380,7 +1444,8 @@ private PagedFlux listByResourceGroupAsync(String resourceGro * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -1395,7 +1460,8 @@ public PagedIterable listByResourceGroup(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 information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { @@ -1411,7 +1477,7 @@ public PagedIterable listByResourceGroup(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 Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> synchronizeAutoStorageKeysWithResponseAsync( @@ -1461,7 +1527,7 @@ private Mono> synchronizeAutoStorageKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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> synchronizeAutoStorageKeysWithResponseAsync( @@ -1507,7 +1573,7 @@ private Mono> synchronizeAutoStorageKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 synchronizeAutoStorageKeysAsync(String resourceGroupName, String accountName) { @@ -1540,7 +1606,7 @@ public void synchronizeAutoStorageKeys(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 the response. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response synchronizeAutoStorageKeysWithResponse( @@ -1560,7 +1626,7 @@ public Response synchronizeAutoStorageKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeyWithResponseAsync( @@ -1619,7 +1685,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 a set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeyWithResponseAsync( @@ -1674,7 +1740,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 a set of Azure Batch account keys. + * @return a set of Azure Batch account keys on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono regenerateKeyAsync( @@ -1723,7 +1789,7 @@ public BatchAccountKeysInner 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 a set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse( @@ -1741,7 +1807,7 @@ 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 a set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getKeysWithResponseAsync( @@ -1792,7 +1858,7 @@ private Mono> getKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getKeysWithResponseAsync( @@ -1839,7 +1905,7 @@ private Mono> getKeysWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 set of Azure Batch account keys. + * @return a set of Azure Batch account keys on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getKeysAsync(String resourceGroupName, String accountName) { @@ -1882,7 +1948,7 @@ public BatchAccountKeysInner getKeys(String resourceGroupName, String accountNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getKeysWithResponse( @@ -1890,6 +1956,357 @@ public Response getKeysWithResponse( return getKeysWithResponseAsync(resourceGroupName, accountName, context).block(); } + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsSinglePageAsync( + 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listDetectors( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accountName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsSinglePageAsync( + 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listDetectors( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accountName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDetectorsAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>( + () -> listDetectorsSinglePageAsync(resourceGroupName, accountName), + nextLink -> listDetectorsNextSinglePageAsync(nextLink)); + } + + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDetectorsAsync( + String resourceGroupName, String accountName, Context context) { + return new PagedFlux<>( + () -> listDetectorsSinglePageAsync(resourceGroupName, accountName, context), + nextLink -> listDetectorsNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDetectors(String resourceGroupName, String accountName) { + return new PagedIterable<>(listDetectorsAsync(resourceGroupName, accountName)); + } + + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDetectors( + String resourceGroupName, String accountName, Context context) { + return new PagedIterable<>(listDetectorsAsync(resourceGroupName, accountName, context)); + } + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the given detector for a given Batch account along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDetectorWithResponseAsync( + String resourceGroupName, String accountName, String detectorId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (detectorId == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getDetector( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accountName, + detectorId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @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 information about the given detector for a given Batch account along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDetectorWithResponseAsync( + String resourceGroupName, String accountName, String detectorId, 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 (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (detectorId == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getDetector( + this.client.getEndpoint(), + resourceGroupName, + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accountName, + detectorId, + accept, + context); + } + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the given detector for a given Batch account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDetectorAsync( + String resourceGroupName, String accountName, String detectorId) { + return getDetectorWithResponseAsync(resourceGroupName, accountName, detectorId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the given detector for a given Batch account. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DetectorResponseInner getDetector(String resourceGroupName, String accountName, String detectorId) { + return getDetectorAsync(resourceGroupName, accountName, detectorId).block(); + } + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @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 information about the given detector for a given Batch account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDetectorWithResponse( + String resourceGroupName, String accountName, String detectorId, Context context) { + return getDetectorWithResponseAsync(resourceGroupName, accountName, detectorId, context).block(); + } + /** * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service * administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your @@ -1902,7 +2319,8 @@ public Response getKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -1964,7 +2382,8 @@ public Response getKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2023,7 +2442,7 @@ public Response getKeysWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( @@ -2046,7 +2465,7 @@ private PagedFlux listOutboundNetworkDependenc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listOutboundNetworkDependenciesEndpointsAsync( @@ -2068,7 +2487,7 @@ private PagedFlux listOutboundNetworkDependenc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listOutboundNetworkDependenciesEndpoints( @@ -2089,7 +2508,7 @@ public PagedIterable listOutboundNetworkDepend * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listOutboundNetworkDependenciesEndpoints( @@ -2105,7 +2524,8 @@ public PagedIterable listOutboundNetworkDepend * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -2141,7 +2561,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -2176,7 +2597,8 @@ private Mono> listNextSinglePageAsync(String ne * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2213,7 +2635,8 @@ private Mono> listByResourceGroupNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync( @@ -2249,7 +2672,82 @@ private Mono> listByResourceGroupNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsNextSinglePageAsync(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.listDetectorsNext(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 values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsNextSinglePageAsync( + 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 + .listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + 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 values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> @@ -2290,7 +2788,8 @@ private Mono> listByResourceGroupNextSinglePage * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java index 7728b1875750..43d2f53f5170 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java @@ -12,11 +12,13 @@ import com.azure.resourcemanager.batch.fluent.BatchAccountsClient; import com.azure.resourcemanager.batch.fluent.models.BatchAccountInner; import com.azure.resourcemanager.batch.fluent.models.BatchAccountKeysInner; +import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; import com.azure.resourcemanager.batch.fluent.models.OutboundEnvironmentEndpointInner; import com.azure.resourcemanager.batch.models.BatchAccount; import com.azure.resourcemanager.batch.models.BatchAccountKeys; import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters; import com.azure.resourcemanager.batch.models.BatchAccounts; +import com.azure.resourcemanager.batch.models.DetectorResponse; import com.azure.resourcemanager.batch.models.OutboundEnvironmentEndpoint; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -143,6 +145,42 @@ public Response getKeysWithResponse( } } + public PagedIterable listDetectors(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, accountName); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public PagedIterable listDetectors( + String resourceGroupName, String accountName, Context context) { + PagedIterable inner = + this.serviceClient().listDetectors(resourceGroupName, accountName, context); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public DetectorResponse getDetector(String resourceGroupName, String accountName, String detectorId) { + DetectorResponseInner inner = this.serviceClient().getDetector(resourceGroupName, accountName, detectorId); + if (inner != null) { + return new DetectorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDetectorWithResponse( + String resourceGroupName, String accountName, String detectorId, Context context) { + Response inner = + this.serviceClient().getDetectorWithResponse(resourceGroupName, accountName, detectorId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DetectorResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public PagedIterable listOutboundNetworkDependenciesEndpoints( String resourceGroupName, String accountName) { PagedIterable inner = diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementBuilder.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java similarity index 74% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementBuilder.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java index 4330caf2ccbc..b8c93ae89743 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementBuilder.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java @@ -15,9 +15,9 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the BatchManagementImpl type. */ -@ServiceClientBuilder(serviceClients = {BatchManagementImpl.class}) -public final class BatchManagementBuilder { +/** A builder for creating a new instance of the BatchManagementClientImpl type. */ +@ServiceClientBuilder(serviceClients = {BatchManagementClientImpl.class}) +public final class BatchManagementClientBuilder { /* * The Azure subscription ID. This is a GUID-formatted string (e.g. * 00000000-0000-0000-0000-000000000000) @@ -28,9 +28,9 @@ public final class BatchManagementBuilder { * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). * * @param subscriptionId the subscriptionId value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder subscriptionId(String subscriptionId) { + public BatchManagementClientBuilder subscriptionId(String subscriptionId) { this.subscriptionId = subscriptionId; return this; } @@ -44,9 +44,9 @@ public BatchManagementBuilder subscriptionId(String subscriptionId) { * Sets server parameter. * * @param endpoint the endpoint value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder endpoint(String endpoint) { + public BatchManagementClientBuilder endpoint(String endpoint) { this.endpoint = endpoint; return this; } @@ -60,9 +60,9 @@ public BatchManagementBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder environment(AzureEnvironment environment) { + public BatchManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public BatchManagementBuilder environment(AzureEnvironment environment) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder defaultPollInterval(Duration defaultPollInterval) { + public BatchManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -92,9 +92,9 @@ public BatchManagementBuilder defaultPollInterval(Duration defaultPollInterval) * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder pipeline(HttpPipeline pipeline) { + public BatchManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -108,19 +108,19 @@ public BatchManagementBuilder pipeline(HttpPipeline pipeline) { * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the BatchManagementBuilder. + * @return the BatchManagementClientBuilder. */ - public BatchManagementBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public BatchManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of BatchManagementImpl with the provided parameters. + * Builds an instance of BatchManagementClientImpl with the provided parameters. * - * @return an instance of BatchManagementImpl. + * @return an instance of BatchManagementClientImpl. */ - public BatchManagementImpl buildClient() { + public BatchManagementClientImpl buildClient() { if (endpoint == null) { this.endpoint = "https://management.azure.com"; } @@ -139,8 +139,8 @@ public BatchManagementImpl buildClient() { if (serializerAdapter == null) { this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); } - BatchManagementImpl client = - new BatchManagementImpl( + BatchManagementClientImpl client = + new BatchManagementClientImpl( pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); return client; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java similarity index 96% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementImpl.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java index d393afe132cc..6f96f50925a9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java @@ -24,7 +24,7 @@ import com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient; import com.azure.resourcemanager.batch.fluent.ApplicationsClient; import com.azure.resourcemanager.batch.fluent.BatchAccountsClient; -import com.azure.resourcemanager.batch.fluent.BatchManagement; +import com.azure.resourcemanager.batch.fluent.BatchManagementClient; import com.azure.resourcemanager.batch.fluent.CertificatesClient; import com.azure.resourcemanager.batch.fluent.LocationsClient; import com.azure.resourcemanager.batch.fluent.OperationsClient; @@ -41,10 +41,10 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the BatchManagementImpl type. */ -@ServiceClient(builder = BatchManagementBuilder.class) -public final class BatchManagementImpl implements BatchManagement { - private final ClientLogger logger = new ClientLogger(BatchManagementImpl.class); +/** Initializes a new instance of the BatchManagementClientImpl type. */ +@ServiceClient(builder = BatchManagementClientBuilder.class) +public final class BatchManagementClientImpl implements BatchManagementClient { + private final ClientLogger logger = new ClientLogger(BatchManagementClientImpl.class); /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ private final String subscriptionId; @@ -227,7 +227,7 @@ public PoolsClient getPools() { } /** - * Initializes an instance of BatchManagement client. + * Initializes an instance of BatchManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. @@ -237,7 +237,7 @@ public PoolsClient getPools() { * 00000000-0000-0000-0000-000000000000). * @param endpoint server parameter. */ - BatchManagementImpl( + BatchManagementClientImpl( HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, @@ -249,7 +249,7 @@ public PoolsClient getPools() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-06-01"; + this.apiVersion = "2022-01-01"; this.batchAccounts = new BatchAccountsClientImpl(this); this.applicationPackages = new ApplicationPackagesClientImpl(this); this.applications = new ApplicationsClientImpl(this); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java index d45f0cfd7c4c..5141c269d0a2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java @@ -54,25 +54,25 @@ public final class CertificatesClientImpl implements CertificatesClient { private final CertificatesService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of CertificatesClientImpl. * * @param client the instance of the service client containing this operation class. */ - CertificatesClientImpl(BatchManagementImpl client) { + CertificatesClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementCertificates to be used by the proxy service to + * The interface defining all the services for BatchManagementClientCertificates to be used by the proxy service to * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementCerti") + @ServiceInterface(name = "BatchManagementClien") private interface CertificatesService { @Headers({"Content-Type: application/json"}) @Get( @@ -201,7 +201,8 @@ Mono> listByBatchAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -267,7 +268,8 @@ private Mono> listByBatchAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -334,7 +336,7 @@ private Mono> listByBatchAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -352,7 +354,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName) { @@ -378,7 +380,7 @@ private PagedFlux listByBatchAccountAsync(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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -402,7 +404,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { @@ -426,7 +428,7 @@ public PagedIterable listByBatchAccount(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount( @@ -455,7 +457,7 @@ public PagedIterable listByBatchAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createWithResponseAsync( @@ -529,7 +531,7 @@ 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 contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createWithResponseAsync( @@ -600,7 +602,7 @@ 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 contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -633,7 +635,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -724,7 +726,7 @@ public CertificatesCreateResponse createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateWithResponseAsync( @@ -794,7 +796,7 @@ 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 contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateWithResponseAsync( @@ -861,7 +863,7 @@ 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 contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -892,7 +894,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -973,7 +975,7 @@ public CertificatesUpdateResponse updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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( @@ -1029,7 +1031,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( @@ -1081,16 +1083,17 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String certificateName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, certificateName); 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()); } /** @@ -1104,9 +1107,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String certificateName, Context context) { context = this.client.mergeContext(context); @@ -1127,9 +1130,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String certificateName) { return beginDeleteAsync(resourceGroupName, accountName, certificateName).getSyncPoller(); @@ -1146,9 +1149,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String certificateName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, certificateName, context).getSyncPoller(); @@ -1164,7 +1167,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 certificateName) { @@ -1184,7 +1187,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( @@ -1237,7 +1240,7 @@ public void delete(String resourceGroupName, String accountName, String certific * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified certificate. + * @return information about the specified certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync( @@ -1293,7 +1296,7 @@ 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 information about the specified certificate. + * @return information about the specified certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync( @@ -1345,7 +1348,7 @@ 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 information about the specified certificate. + * @return information about the specified certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String certificateName) { @@ -1410,7 +1413,7 @@ public CertificatesGetResponse 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 contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelDeletionWithResponseAsync( @@ -1470,7 +1473,7 @@ private Mono cancelDeletionWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelDeletionWithResponseAsync( @@ -1526,7 +1529,7 @@ private Mono cancelDeletionWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. + * @return contains information about a certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono cancelDeletionAsync( @@ -1593,7 +1596,8 @@ public CertificatesCancelDeletionResponse cancelDeletionWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync(String nextLink) { @@ -1630,7 +1634,8 @@ private Mono> listByBatchAccountNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/DetectorResponseImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/DetectorResponseImpl.java new file mode 100644 index 000000000000..d99be60c47ab --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/DetectorResponseImpl.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.implementation; + +import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; +import com.azure.resourcemanager.batch.models.DetectorResponse; + +public final class DetectorResponseImpl implements DetectorResponse { + private DetectorResponseInner innerObject; + + private final com.azure.resourcemanager.batch.BatchManager serviceManager; + + DetectorResponseImpl( + DetectorResponseInner innerObject, com.azure.resourcemanager.batch.BatchManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String etag() { + return this.innerModel().etag(); + } + + public String value() { + return this.innerModel().value(); + } + + public DetectorResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.batch.BatchManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java index f9e768ebd91e..9236f290bdcb 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java @@ -44,25 +44,25 @@ public final class LocationsClientImpl implements LocationsClient { private final LocationsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of LocationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - LocationsClientImpl(BatchManagementImpl client) { + LocationsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementLocations to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for BatchManagementClientLocations to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementLocat") + @ServiceInterface(name = "BatchManagementClien") private interface LocationsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas") @@ -146,7 +146,8 @@ Mono> listSupportedCloudServiceSkusNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Batch service quotas for the specified subscription at the given location. + * @return the Batch service quotas for the specified subscription at the given location along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getQuotasWithResponseAsync(String locationName) { @@ -188,7 +189,8 @@ private Mono> getQuotasWithResponseAsync(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 Batch service quotas for the specified subscription at the given location. + * @return the Batch service quotas for the specified subscription at the given location along with {@link Response} + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getQuotasWithResponseAsync(String locationName, Context context) { @@ -226,7 +228,8 @@ private Mono> getQuotasWithResponseAsync(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 Batch service quotas for the specified subscription at the given location. + * @return the Batch service quotas for the specified subscription at the given location on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getQuotasAsync(String locationName) { @@ -263,7 +266,8 @@ public BatchLocationQuotaInner getQuotas(String locationName) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Batch service quotas for the specified subscription at the given location. + * @return the Batch service quotas for the specified subscription at the given location along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getQuotasWithResponse(String locationName, Context context) { @@ -279,7 +283,8 @@ public Response getQuotasWithResponse(String locationNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedVirtualMachineSkusSinglePageAsync( @@ -335,7 +340,8 @@ private Mono> listSupportedVirtualMachineSkusSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedVirtualMachineSkusSinglePageAsync( @@ -387,7 +393,8 @@ private Mono> listSupportedVirtualMachineSkusSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSupportedVirtualMachineSkusAsync( @@ -404,7 +411,8 @@ private PagedFlux listSupportedVirtualMachineSkusAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSupportedVirtualMachineSkusAsync(String locationName) { @@ -425,7 +433,8 @@ private PagedFlux listSupportedVirtualMachineSkusAsync(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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSupportedVirtualMachineSkusAsync( @@ -442,7 +451,8 @@ private PagedFlux listSupportedVirtualMachineSkusAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSupportedVirtualMachineSkus(String locationName) { @@ -461,7 +471,8 @@ public PagedIterable listSupportedVirtualMachineSkus(String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSupportedVirtualMachineSkus( @@ -478,7 +489,8 @@ public PagedIterable listSupportedVirtualMachineSkus( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedCloudServiceSkusSinglePageAsync( @@ -534,7 +546,8 @@ private Mono> listSupportedCloudServiceSkusSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location along with {@link + * PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedCloudServiceSkusSinglePageAsync( @@ -586,7 +599,8 @@ private Mono> listSupportedCloudServiceSkusSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSupportedCloudServiceSkusAsync( @@ -603,7 +617,8 @@ private PagedFlux listSupportedCloudServiceSkusAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSupportedCloudServiceSkusAsync(String locationName) { @@ -624,7 +639,8 @@ private PagedFlux listSupportedCloudServiceSkusAsync(String l * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listSupportedCloudServiceSkusAsync( @@ -641,7 +657,8 @@ private PagedFlux listSupportedCloudServiceSkusAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSupportedCloudServiceSkus(String locationName) { @@ -660,7 +677,8 @@ public PagedIterable listSupportedCloudServiceSkus(String loc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSupportedCloudServiceSkus( @@ -676,7 +694,8 @@ public PagedIterable listSupportedCloudServiceSkus( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the CheckNameAvailability operation response. + * @return the CheckNameAvailability operation response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -726,7 +745,8 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the CheckNameAvailability operation response. + * @return the CheckNameAvailability operation response along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( @@ -772,7 +792,7 @@ private Mono> checkNameAvailabilityWi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the CheckNameAvailability operation response. + * @return the CheckNameAvailability operation response on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono checkNameAvailabilityAsync( @@ -813,7 +833,7 @@ public CheckNameAvailabilityResultInner checkNameAvailability( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the CheckNameAvailability operation response. + * @return the CheckNameAvailability operation response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse( @@ -828,7 +848,8 @@ public Response checkNameAvailabilityWithRespo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Batch List supported SKUs operation response. + * @return the Batch List supported SKUs operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedVirtualMachineSkusNextSinglePageAsync(String nextLink) { @@ -866,7 +887,8 @@ private Mono> listSupportedVirtualMachineSkusNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Batch List supported SKUs operation response. + * @return the Batch List supported SKUs operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedVirtualMachineSkusNextSinglePageAsync( @@ -902,7 +924,8 @@ private Mono> listSupportedVirtualMachineSkusNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Batch List supported SKUs operation response. + * @return the Batch List supported SKUs operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedCloudServiceSkusNextSinglePageAsync(String nextLink) { @@ -940,7 +963,8 @@ private Mono> listSupportedCloudServiceSkusNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Batch List supported SKUs operation response. + * @return the Batch List supported SKUs operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSupportedCloudServiceSkusNextSinglePageAsync( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java index c415fb2aeaa2..086442825ce2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java @@ -39,25 +39,25 @@ public final class OperationsClientImpl implements OperationsClient { private final OperationsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(BatchManagementImpl client) { + OperationsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementOperations to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for BatchManagementClientOperations to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementOpera") + @ServiceInterface(name = "BatchManagementClien") private interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.Batch/operations") @@ -85,7 +85,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 result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { @@ -118,7 +119,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 result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { @@ -148,7 +150,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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -162,7 +164,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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { @@ -175,7 +177,7 @@ private PagedFlux listAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -189,7 +191,7 @@ public PagedIterable list() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -203,7 +205,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 result of the request to list REST API operations. + * @return result of the request to list REST API operations along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -239,7 +242,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 result of the request to list REST API operations. + * @return result of the request to list REST API operations 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/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java index a9e753cd3e17..1f744c0193e5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java @@ -54,24 +54,24 @@ public final class PoolsClientImpl implements PoolsClient { private final PoolsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of PoolsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PoolsClientImpl(BatchManagementImpl client) { + PoolsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy.create(PoolsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for BatchManagementPools to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for BatchManagementClientPools to be used by the proxy service to perform + * REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementPools") + @ServiceInterface(name = "BatchManagementClien") private interface PoolsService { @Headers({"Content-Type: application/json"}) @Get( @@ -219,7 +219,8 @@ Mono> listByBatchAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -288,7 +289,8 @@ private Mono> listByBatchAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -358,7 +360,7 @@ private Mono> listByBatchAccountSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -376,7 +378,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName) { @@ -405,7 +407,7 @@ private PagedFlux listByBatchAccountAsync(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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -429,7 +431,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { @@ -456,7 +458,7 @@ public PagedIterable listByBatchAccount(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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount( @@ -484,7 +486,7 @@ public PagedIterable listByBatchAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createWithResponseAsync( @@ -556,7 +558,7 @@ 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 contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createWithResponseAsync( @@ -625,7 +627,7 @@ 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 contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -656,7 +658,7 @@ private Mono createAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync( @@ -737,7 +739,7 @@ public PoolsCreateResponse createWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateWithResponseAsync( @@ -802,7 +804,7 @@ 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 contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateWithResponseAsync( @@ -868,7 +870,7 @@ 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 contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -895,7 +897,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -967,7 +969,7 @@ public PoolsUpdateResponse updateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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( @@ -1021,7 +1023,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( @@ -1071,15 +1073,16 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String poolName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, poolName); 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()); } /** @@ -1092,9 +1095,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, String accountName, String poolName, Context context) { context = this.client.mergeContext(context); @@ -1114,9 +1117,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String poolName) { return beginDeleteAsync(resourceGroupName, accountName, poolName).getSyncPoller(); @@ -1132,9 +1135,9 @@ 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.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String poolName, Context context) { return beginDeleteAsync(resourceGroupName, accountName, poolName, context).getSyncPoller(); @@ -1149,7 +1152,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 poolName) { @@ -1168,7 +1171,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(String resourceGroupName, String accountName, String poolName, Context context) { @@ -1217,7 +1220,7 @@ public void delete(String resourceGroupName, String accountName, String poolName * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified pool. + * @return information about the specified pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync(String resourceGroupName, String accountName, String poolName) { @@ -1270,7 +1273,7 @@ private Mono getWithResponseAsync(String resourceGroupName, St * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified pool. + * @return information about the specified pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getWithResponseAsync( @@ -1320,7 +1323,7 @@ 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 information about the specified pool. + * @return information about the specified pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String accountName, String poolName) { @@ -1378,7 +1381,7 @@ public PoolsGetResponse 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 contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono disableAutoScaleWithResponseAsync( @@ -1432,7 +1435,7 @@ private Mono disableAutoScaleWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono disableAutoScaleWithResponseAsync( @@ -1482,7 +1485,7 @@ private Mono disableAutoScaleWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono disableAutoScaleAsync(String resourceGroupName, String accountName, String poolName) { @@ -1544,7 +1547,7 @@ public PoolsDisableAutoScaleResponse disableAutoScaleWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopResizeWithResponseAsync( @@ -1602,7 +1605,7 @@ private Mono stopResizeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopResizeWithResponseAsync( @@ -1656,7 +1659,7 @@ private Mono stopResizeWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a pool. + * @return contains information about a pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopResizeAsync(String resourceGroupName, String accountName, String poolName) { @@ -1720,7 +1723,8 @@ public PoolsStopResizeResponse stopResizeWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync(String nextLink) { @@ -1757,7 +1761,8 @@ private Mono> listByBatchAccountNextSinglePageAsync(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 values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync(String nextLink, Context context) { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java index cb017f5c6753..8e219d1f7dc5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java @@ -46,14 +46,14 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi private final PrivateEndpointConnectionsService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of PrivateEndpointConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateEndpointConnectionsClientImpl(BatchManagementImpl client) { + PrivateEndpointConnectionsClientImpl(BatchManagementClientImpl client) { this.service = RestProxy .create( @@ -62,11 +62,11 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi } /** - * The interface defining all the services for BatchManagementPrivateEndpointConnections to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for BatchManagementClientPrivateEndpointConnections to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementPriva") + @ServiceInterface(name = "BatchManagementClien") private interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( @@ -138,7 +138,8 @@ Mono> listByBatchAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -198,7 +199,8 @@ private Mono> listByBatchAccountSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -254,7 +256,7 @@ private Mono> listByBatchAccountSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -272,7 +274,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -293,7 +295,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -311,7 +313,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount( @@ -330,7 +332,7 @@ public PagedIterable listByBatchAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount( @@ -348,7 +350,8 @@ public PagedIterable listByBatchAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified private endpoint connection. + * @return information about the specified private endpoint connection along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -406,7 +409,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 information about the specified private endpoint connection. + * @return information about the specified private endpoint connection along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -460,7 +464,7 @@ 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 information about the specified private endpoint connection. + * @return information about the specified private endpoint connection on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -505,7 +509,7 @@ 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 information about the specified private endpoint connection. + * @return information about the specified private endpoint connection along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -527,7 +531,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 contains information about a private link resource. + * @return contains information about a private link resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -600,7 +605,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 contains information about a private link resource. + * @return contains information about a private link resource along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -670,9 +676,9 @@ 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 contains information about a private link resource. + * @return the {@link PollerFlux} for polling of contains information about a private link resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( String resourceGroupName, String accountName, @@ -688,7 +694,7 @@ private PollerFlux, PrivateEndpointCo this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - Context.NONE); + this.client.getContext()); } /** @@ -706,9 +712,9 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a private link resource. + * @return the {@link PollerFlux} for polling of contains information about a private link resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( String resourceGroupName, String accountName, @@ -744,9 +750,9 @@ private PollerFlux, PrivateEndpointCo * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a private link resource. + * @return the {@link SyncPoller} for polling of contains information about a private link resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String accountName, @@ -772,9 +778,9 @@ 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 contains information about a private link resource. + * @return the {@link SyncPoller} for polling of contains information about a private link resource. */ - @ServiceMethod(returns = ReturnType.SINGLE) + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String accountName, @@ -801,7 +807,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 contains information about a private link resource. + * @return contains information about a private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -827,7 +833,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a private link resource. + * @return contains information about a private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -856,7 +862,7 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a private link resource. + * @return contains information about a private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( @@ -958,7 +964,8 @@ public PrivateEndpointConnectionInner update( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync(String nextLink) { @@ -995,7 +1002,8 @@ private Mono> listByBatchAccountNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java index b0ef5dde4877..925c1c3bbc9e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java @@ -39,14 +39,14 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource private final PrivateLinkResourcesService service; /** The service client containing this operation class. */ - private final BatchManagementImpl client; + private final BatchManagementClientImpl client; /** * Initializes an instance of PrivateLinkResourcesClientImpl. * * @param client the instance of the service client containing this operation class. */ - PrivateLinkResourcesClientImpl(BatchManagementImpl client) { + PrivateLinkResourcesClientImpl(BatchManagementClientImpl client) { this.service = RestProxy .create(PrivateLinkResourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); @@ -54,11 +54,11 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource } /** - * The interface defining all the services for BatchManagementPrivateLinkResources to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for BatchManagementClientPrivateLinkResources to be used by the proxy + * service to perform REST calls. */ @Host("{$host}") - @ServiceInterface(name = "BatchManagementPriva") + @ServiceInterface(name = "BatchManagementClien") private interface PrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( @@ -112,7 +112,8 @@ Mono> listByBatchAccountNext( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -172,7 +173,8 @@ private Mono> listByBatchAccountSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync( @@ -228,7 +230,7 @@ private Mono> listByBatchAccountSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -246,7 +248,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName) { @@ -266,7 +268,7 @@ private PagedFlux listByBatchAccountAsync(String resou * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByBatchAccountAsync( @@ -284,7 +286,7 @@ private PagedFlux listByBatchAccountAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { @@ -302,7 +304,7 @@ public PagedIterable listByBatchAccount(String resourc * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByBatchAccount( @@ -319,7 +321,8 @@ public PagedIterable listByBatchAccount( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified private link resource. + * @return information about the specified private link resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -375,7 +378,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 information about the specified private link resource. + * @return information about the specified private link resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( @@ -427,7 +431,7 @@ 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 information about the specified private link resource. + * @return information about the specified private link resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( @@ -469,7 +473,7 @@ public PrivateLinkResourceInner get(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 information about the specified private link resource. + * @return information about the specified private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( @@ -484,7 +488,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 values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync(String nextLink) { @@ -521,7 +526,8 @@ private Mono> listByBatchAccountNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountNextSinglePageAsync( diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java index 744890726c4d..4aff45e58c3b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for BatchManagement. null. */ +/** Package containing the implementations for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java index cc0c6de3def0..3d19fe0b9306 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java @@ -159,7 +159,8 @@ interface WithCreate { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response}. */ Response activateWithResponse(ActivateApplicationPackageParameters parameters, Context context); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackages.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackages.java index 2513c5eb225b..10fafd57afb5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackages.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackages.java @@ -44,7 +44,8 @@ ApplicationPackage activate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return an application package which represents a particular version of an application along with {@link + * Response}. */ Response activateWithResponse( String resourceGroupName, @@ -78,7 +79,7 @@ Response activateWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String applicationName, String versionName, Context context); @@ -108,7 +109,7 @@ Response deleteWithResponse( * @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 information about the specified application package. + * @return information about the specified application package along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String applicationName, String versionName, Context context); @@ -122,7 +123,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 result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, String applicationName); @@ -137,7 +138,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 result of performing list application packages. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ PagedIterable list( String resourceGroupName, String accountName, String applicationName, Integer maxresults, Context context); @@ -149,7 +150,7 @@ PagedIterable list( * @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 information about the specified application package. + * @return information about the specified application package along with {@link Response}. */ ApplicationPackage getById(String id); @@ -161,7 +162,7 @@ PagedIterable list( * @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 information about the specified application package. + * @return information about the specified application package along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -183,7 +184,7 @@ PagedIterable list( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Applications.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Applications.java index 4a499425a83c..b019a9d86679 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Applications.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Applications.java @@ -32,7 +32,7 @@ public interface Applications { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response deleteWithResponse( String resourceGroupName, String accountName, String applicationName, Context context); @@ -60,7 +60,7 @@ Response deleteWithResponse( * @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 information about the specified application. + * @return information about the specified application along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String applicationName, Context context); @@ -73,7 +73,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 result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName); @@ -87,7 +87,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 result of performing list applications. + * @return the result of performing list applications as paginated response with {@link PagedIterable}. */ PagedIterable list(String resourceGroupName, String accountName, Integer maxresults, Context context); @@ -98,7 +98,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 information about the specified application. + * @return information about the specified application along with {@link Response}. */ Application getById(String id); @@ -110,7 +110,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 information about the specified application. + * @return information about the specified application along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); @@ -132,7 +132,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 response. + * @return the {@link Response}. */ Response deleteByIdWithResponse(String id, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccount.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccount.java index 2b8268b86ea5..3ca6e99452dd 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccount.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccount.java @@ -124,7 +124,7 @@ public interface BatchAccount { Integer dedicatedCoreQuota(); /** - * Gets the lowPriorityCoreQuota property: The low-priority core quota for the Batch account. For accounts with + * Gets the lowPriorityCoreQuota property: The Spot/low-priority core quota for the Batch account. For accounts with * PoolAllocationMode set to UserSubscription, quota is managed on the subscription so this value is not returned. * * @return the lowPriorityCoreQuota value. @@ -480,7 +480,7 @@ interface WithAllowedAuthenticationModes { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the {@link Response}. */ Response synchronizeAutoStorageKeysWithResponse(Context context); @@ -509,7 +509,7 @@ interface WithAllowedAuthenticationModes { * @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 set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ Response regenerateKeyWithResponse( BatchAccountRegenerateKeyParameters parameters, Context context); @@ -534,7 +534,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 a set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ Response getKeysWithResponse(Context context); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccounts.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccounts.java index 81e22ae35802..b74eecbaac3b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccounts.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccounts.java @@ -54,7 +54,7 @@ public interface BatchAccounts { * @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 information about the specified Batch account. + * @return information about the specified Batch account along with {@link Response}. */ Response getByResourceGroupWithResponse( String resourceGroupName, String accountName, Context context); @@ -64,7 +64,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(); @@ -75,7 +76,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 information about the Batch accounts associated with the subscription. + * @return information about the Batch accounts associated with the subscription as paginated response with {@link + * PagedIterable}. */ PagedIterable list(Context context); @@ -86,7 +88,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 information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName); @@ -98,7 +101,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 information about the Batch accounts associated with the specified resource group. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); @@ -124,7 +128,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 response. + * @return the {@link Response}. */ Response synchronizeAutoStorageKeysWithResponse( String resourceGroupName, String accountName, Context context); @@ -159,7 +163,7 @@ BatchAccountKeys regenerateKey( * @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 set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ Response regenerateKeyWithResponse( String resourceGroupName, String accountName, BatchAccountRegenerateKeyParameters parameters, Context context); @@ -189,10 +193,65 @@ 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 a set of Azure Batch account keys. + * @return a set of Azure Batch account keys along with {@link Response}. */ Response getKeysWithResponse(String resourceGroupName, String accountName, Context context); + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listDetectors(String resourceGroupName, String accountName); + + /** + * Gets information about the detectors available for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch 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 information about the detectors available for a given Batch account as paginated response with {@link + * PagedIterable}. + */ + PagedIterable listDetectors(String resourceGroupName, String accountName, Context context); + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @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 information about the given detector for a given Batch account. + */ + DetectorResponse getDetector(String resourceGroupName, String accountName, String detectorId); + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param accountName The name of the Batch account. + * @param detectorId The name of the detector. + * @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 information about the given detector for a given Batch account along with {@link Response}. + */ + Response getDetectorWithResponse( + String resourceGroupName, String accountName, String detectorId, Context context); + /** * Lists the endpoints that a Batch Compute Node under this Batch Account may call as part of Batch service * administration. If you are deploying a Pool inside of a virtual network that you specify, you must make sure your @@ -205,7 +264,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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listOutboundNetworkDependenciesEndpoints( String resourceGroupName, String accountName); @@ -223,7 +282,7 @@ PagedIterable listOutboundNetworkDependenciesEndpoi * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listOutboundNetworkDependenciesEndpoints( String resourceGroupName, String accountName, Context context); @@ -235,7 +294,7 @@ PagedIterable listOutboundNetworkDependenciesEndpoi * @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 information about the specified Batch account. + * @return information about the specified Batch account along with {@link Response}. */ BatchAccount getById(String id); @@ -247,7 +306,7 @@ PagedIterable listOutboundNetworkDependenciesEndpoi * @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 information about the specified Batch account. + * @return information about the specified Batch account along with {@link Response}. */ Response getByIdWithResponse(String id, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificates.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificates.java index c8452e3cc71e..a262f305e838 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificates.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificates.java @@ -18,7 +18,7 @@ public interface Certificates { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -36,7 +36,7 @@ public interface Certificates { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount( String resourceGroupName, diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CheckNameAvailabilityParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CheckNameAvailabilityParameters.java index acb696eb191b..4c40c67f12e4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CheckNameAvailabilityParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CheckNameAvailabilityParameters.java @@ -24,7 +24,7 @@ public final class CheckNameAvailabilityParameters { * The resource type. */ @JsonProperty(value = "type", required = true) - private String type; + private String type = "Microsoft.Batch/batchAccounts"; /** Creates an instance of CheckNameAvailabilityParameters class. */ public CheckNameAvailabilityParameters() { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java index ee95a8f3bcce..2bfc1f52a7c9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java @@ -19,7 +19,7 @@ public final class ContainerConfiguration { * The container technology to be used. */ @JsonProperty(value = "type", required = true) - private String type; + private String type = "DockerCompatible"; /* * The collection of container image names. This is the full image diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DetectorListResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DetectorListResult.java new file mode 100644 index 000000000000..b003bbce45f8 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DetectorListResult.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Values returned by the List operation. */ +@Fluent +public final class DetectorListResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorListResult.class); + + /* + * The collection of Batch account detectors returned by the listing + * operation. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URL to get the next set of results. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: The collection of Batch account detectors returned by the listing operation. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The collection of Batch account detectors returned by the listing operation. + * + * @param value the value value to set. + * @return the DetectorListResult object itself. + */ + public DetectorListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URL to get the next set of results. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URL to get the next set of results. + * + * @param nextLink the nextLink value to set. + * @return the DetectorListResult object itself. + */ + public DetectorListResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DetectorResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DetectorResponse.java new file mode 100644 index 000000000000..d844650e67df --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DetectorResponse.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; + +/** An immutable client-side representation of DetectorResponse. */ +public interface DetectorResponse { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the etag property: The ETag of the resource, used for concurrency statements. + * + * @return the etag value. + */ + String etag(); + + /** + * Gets the value property: A base64 encoded string that represents the content of a detector. + * + * @return the value value. + */ + String value(); + + /** + * Gets the inner com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner object. + * + * @return the inner object. + */ + DetectorResponseInner innerModel(); +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DynamicVNetAssignmentScope.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DynamicVNetAssignmentScope.java new file mode 100644 index 000000000000..54195fbc5718 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DynamicVNetAssignmentScope.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for DynamicVNetAssignmentScope. */ +public enum DynamicVNetAssignmentScope { + /** Enum value none. */ + NONE("none"), + + /** Enum value job. */ + JOB("job"); + + /** The actual serialized value for a DynamicVNetAssignmentScope instance. */ + private final String value; + + DynamicVNetAssignmentScope(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DynamicVNetAssignmentScope instance. + * + * @param value the serialized value to parse. + * @return the parsed DynamicVNetAssignmentScope object, or null if unable to parse. + */ + @JsonCreator + public static DynamicVNetAssignmentScope fromString(String value) { + DynamicVNetAssignmentScope[] items = DynamicVNetAssignmentScope.values(); + for (DynamicVNetAssignmentScope item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/FixedScaleSettings.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/FixedScaleSettings.java index a961b7a072ed..e6d3cf4f45cc 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/FixedScaleSettings.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/FixedScaleSettings.java @@ -34,8 +34,8 @@ public final class FixedScaleSettings { private Integer targetDedicatedNodes; /* - * The desired number of low-priority compute nodes in the pool. At least - * one of targetDedicatedNodes, targetLowPriorityNodes must be set. + * The desired number of Spot/low-priority compute nodes in the pool. At + * least one of targetDedicatedNodes, targetLowPriorityNodes must be set. */ @JsonProperty(value = "targetLowPriorityNodes") private Integer targetLowPriorityNodes; @@ -97,8 +97,8 @@ public FixedScaleSettings withTargetDedicatedNodes(Integer targetDedicatedNodes) } /** - * Get the targetLowPriorityNodes property: The desired number of low-priority compute nodes in the pool. At least - * one of targetDedicatedNodes, targetLowPriorityNodes must be set. + * Get the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool. At + * least one of targetDedicatedNodes, targetLowPriorityNodes must be set. * * @return the targetLowPriorityNodes value. */ @@ -107,8 +107,8 @@ public Integer targetLowPriorityNodes() { } /** - * Set the targetLowPriorityNodes property: The desired number of low-priority compute nodes in the pool. At least - * one of targetDedicatedNodes, targetLowPriorityNodes must be set. + * Set the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool. At + * least one of targetDedicatedNodes, targetLowPriorityNodes must be set. * * @param targetLowPriorityNodes the targetLowPriorityNodes value to set. * @return the FixedScaleSettings object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ImageReference.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ImageReference.java index b9a937864c48..ac07b85c02d5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ImageReference.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ImageReference.java @@ -33,7 +33,7 @@ public final class ImageReference { /* * The SKU of the Azure Virtual Machines Marketplace image. For example, - * 18.04-LTS or 2019-Datacenter. + * 18.04-LTS or 2022-datacenter. */ @JsonProperty(value = "sku") private String sku; @@ -106,7 +106,7 @@ public ImageReference withOffer(String offer) { /** * Get the sku property: The SKU of the Azure Virtual Machines Marketplace image. For example, 18.04-LTS or - * 2019-Datacenter. + * 2022-datacenter. * * @return the sku value. */ @@ -116,7 +116,7 @@ public String sku() { /** * Set the sku property: The SKU of the Azure Virtual Machines Marketplace image. For example, 18.04-LTS or - * 2019-Datacenter. + * 2022-datacenter. * * @param sku the sku value to set. * @return the ImageReference object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Locations.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Locations.java index 9b701d4e3cb5..c15f6bf2a563 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Locations.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Locations.java @@ -29,7 +29,8 @@ public interface Locations { * @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 Batch service quotas for the specified subscription at the given location. + * @return the Batch service quotas for the specified subscription at the given location along with {@link + * Response}. */ Response getQuotasWithResponse(String locationName, Context context); @@ -40,7 +41,8 @@ public interface Locations { * @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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedIterable}. */ PagedIterable listSupportedVirtualMachineSkus(String locationName); @@ -54,7 +56,8 @@ public interface Locations { * @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 Batch supported Virtual Machine VM sizes available at the given location. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location as paginated + * response with {@link PagedIterable}. */ PagedIterable listSupportedVirtualMachineSkus( String locationName, Integer maxresults, String filter, Context context); @@ -66,7 +69,8 @@ PagedIterable listSupportedVirtualMachineSkus( * @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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedIterable}. */ PagedIterable listSupportedCloudServiceSkus(String locationName); @@ -80,7 +84,8 @@ PagedIterable listSupportedVirtualMachineSkus( * @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 Batch supported Cloud Service VM sizes available at the given location. + * @return the list of Batch supported Cloud Service VM sizes available at the given location as paginated response + * with {@link PagedIterable}. */ PagedIterable listSupportedCloudServiceSkus( String locationName, Integer maxresults, String filter, Context context); @@ -106,7 +111,7 @@ PagedIterable listSupportedCloudServiceSkus( * @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 CheckNameAvailability operation response. + * @return the CheckNameAvailability operation response along with {@link Response}. */ Response checkNameAvailabilityWithResponse( String locationName, CheckNameAvailabilityParameters parameters, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MetadataItem.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MetadataItem.java index 46ad6ad2c298..9fa1f05658f1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MetadataItem.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MetadataItem.java @@ -9,7 +9,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** The Batch service does not assign any meaning to this metadata; it is solely for the use of user code. */ +/** + * A name-value pair associated with a Batch service resource. The Batch service does not assign any meaning to this + * metadata; it is solely for the use of user code. + */ @Fluent public final class MetadataItem { @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataItem.class); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkConfiguration.java index 5497c538df8f..7407c6bc1236 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkConfiguration.java @@ -44,6 +44,12 @@ public final class NetworkConfiguration { @JsonProperty(value = "subnetId") private String subnetId; + /* + * The scope of dynamic vnet assignment. + */ + @JsonProperty(value = "dynamicVNetAssignmentScope") + private DynamicVNetAssignmentScope dynamicVNetAssignmentScope; + /* * The endpoint configuration for a pool. Pool endpoint configuration is * only supported on pools with the virtualMachineConfiguration property. @@ -110,6 +116,26 @@ public NetworkConfiguration withSubnetId(String subnetId) { return this; } + /** + * Get the dynamicVNetAssignmentScope property: The scope of dynamic vnet assignment. + * + * @return the dynamicVNetAssignmentScope value. + */ + public DynamicVNetAssignmentScope dynamicVNetAssignmentScope() { + return this.dynamicVNetAssignmentScope; + } + + /** + * Set the dynamicVNetAssignmentScope property: The scope of dynamic vnet assignment. + * + * @param dynamicVNetAssignmentScope the dynamicVNetAssignmentScope value to set. + * @return the NetworkConfiguration object itself. + */ + public NetworkConfiguration withDynamicVNetAssignmentScope(DynamicVNetAssignmentScope dynamicVNetAssignmentScope) { + this.dynamicVNetAssignmentScope = dynamicVNetAssignmentScope; + return this; + } + /** * Get the endpointConfiguration property: The endpoint configuration for a pool. Pool endpoint configuration is * only supported on pools with the virtualMachineConfiguration property. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementConfiguration.java index b3566b5f3a9e..bc00169968ba 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementConfiguration.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** Allocation configuration used by Batch Service to provision the nodes. */ +/** + * Node placement configuration for batch pools. Allocation configuration used by Batch Service to provision the nodes. + */ @Fluent public final class NodePlacementConfiguration { @JsonIgnore private final ClientLogger logger = new ClientLogger(NodePlacementConfiguration.class); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operations.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operations.java index 9c7aa57b38b4..86f8fa20080c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operations.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operations.java @@ -14,7 +14,7 @@ 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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ PagedIterable list(); @@ -25,7 +25,7 @@ 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 result of the request to list REST API operations. + * @return result of the request to list REST API operations as paginated response with {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java index 00aff84ea86b..9f615e97f2a0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pool.java @@ -132,7 +132,7 @@ public interface Pool { Integer currentDedicatedNodes(); /** - * Gets the currentLowPriorityNodes property: The number of low-priority compute nodes currently in the pool. + * Gets the currentLowPriorityNodes property: The number of Spot/low-priority compute nodes currently in the pool. * * @return the currentLowPriorityNodes value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pools.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pools.java index 5ea274237bdf..7e3bf90471ad 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pools.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Pools.java @@ -18,7 +18,7 @@ public interface Pools { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -39,7 +39,7 @@ public interface Pools { * @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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount( String resourceGroupName, diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnections.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnections.java index 8ad7d9ca21ea..9f0270e4dea5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnections.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnections.java @@ -19,7 +19,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -33,7 +33,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount( String resourceGroupName, String accountName, Integer maxresults, Context context); @@ -63,7 +63,7 @@ PagedIterable listByBatchAccount( * @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 information about the specified private endpoint connection. + * @return information about the specified private endpoint connection along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResources.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResources.java index 6da094b3780a..f79ecad51e71 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResources.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResources.java @@ -18,7 +18,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount(String resourceGroupName, String accountName); @@ -32,7 +32,7 @@ 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 values returned by the List operation. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ PagedIterable listByBatchAccount( String resourceGroupName, String accountName, Integer maxresults, Context context); @@ -60,7 +60,7 @@ PagedIterable listByBatchAccount( * @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 information about the specified private link resource. + * @return information about the specified private link resource along with {@link Response}. */ Response getWithResponse( String resourceGroupName, String accountName, String privateLinkResourceName, Context context); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicIpAddressConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicIpAddressConfiguration.java index dbfae8b18e86..c46df5774fc7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicIpAddressConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicIpAddressConfiguration.java @@ -25,10 +25,10 @@ public final class PublicIpAddressConfiguration { /* * The list of public IPs which the Batch service will use when * provisioning Compute Nodes. The number of IPs specified here limits the - * maximum size of the Pool - 100 dedicated nodes or 100 low-priority nodes - * can be allocated for each public IP. For example, a pool needing 250 - * dedicated VMs would need at least 3 public IPs specified. Each element - * of this collection is of the form: + * maximum size of the Pool - 100 dedicated nodes or 100 Spot/low-priority + * nodes can be allocated for each public IP. For example, a pool needing + * 250 dedicated VMs would need at least 3 public IPs specified. Each + * element of this collection is of the form: * /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. */ @JsonProperty(value = "ipAddressIds") @@ -59,8 +59,8 @@ public PublicIpAddressConfiguration withProvision(IpAddressProvisioningType prov /** * Get the ipAddressIds property: The list of public IPs which the Batch service will use when provisioning Compute * Nodes. The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 - * low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need - * at least 3 public IPs specified. Each element of this collection is of the form: + * Spot/low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would + * need at least 3 public IPs specified. Each element of this collection is of the form: * /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. * * @return the ipAddressIds value. @@ -72,8 +72,8 @@ public List ipAddressIds() { /** * Set the ipAddressIds property: The list of public IPs which the Batch service will use when provisioning Compute * Nodes. The number of IPs specified here limits the maximum size of the Pool - 100 dedicated nodes or 100 - * low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would need - * at least 3 public IPs specified. Each element of this collection is of the form: + * Spot/low-priority nodes can be allocated for each public IP. For example, a pool needing 250 dedicated VMs would + * need at least 3 public IPs specified. Each element of this collection is of the form: * /subscriptions/{subscription}/resourceGroups/{group}/providers/Microsoft.Network/publicIPAddresses/{ip}. * * @param ipAddressIds the ipAddressIds value to set. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeOperationStatus.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeOperationStatus.java index 1fe4b8aaa70a..a9a4deee58df 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeOperationStatus.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeOperationStatus.java @@ -13,8 +13,8 @@ import java.util.List; /** - * Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed - * operation (if the AllocationState is Steady). + * Details about the current or last completed resize operation. Describes either the current operation (if the pool + * AllocationState is Resizing) or the previously completed operation (if the AllocationState is Steady). */ @Fluent public final class ResizeOperationStatus { @@ -27,7 +27,7 @@ public final class ResizeOperationStatus { private Integer targetDedicatedNodes; /* - * The desired number of low-priority compute nodes in the pool. + * The desired number of Spot/low-priority compute nodes in the pool. */ @JsonProperty(value = "targetLowPriorityNodes") private Integer targetLowPriorityNodes; @@ -84,7 +84,7 @@ public ResizeOperationStatus withTargetDedicatedNodes(Integer targetDedicatedNod } /** - * Get the targetLowPriorityNodes property: The desired number of low-priority compute nodes in the pool. + * Get the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool. * * @return the targetLowPriorityNodes value. */ @@ -93,7 +93,7 @@ public Integer targetLowPriorityNodes() { } /** - * Set the targetLowPriorityNodes property: The desired number of low-priority compute nodes in the pool. + * Set the targetLowPriorityNodes property: The desired number of Spot/low-priority compute nodes in the pool. * * @param targetLowPriorityNodes the targetLowPriorityNodes value to set. * @return the ResizeOperationStatus object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ScaleSettings.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ScaleSettings.java index a3a9c68520f6..db8b55ace552 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ScaleSettings.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ScaleSettings.java @@ -10,9 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Defines the desired size of the pool. This can either be 'fixedScale' where the requested targetDedicatedNodes is - * specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this property is not - * specified, the pool will have a fixed scale with 0 targetDedicatedNodes. + * Scale settings for the pool Defines the desired size of the pool. This can either be 'fixedScale' where the requested + * targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If this + * property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes. */ @Fluent public final class ScaleSettings { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StartTask.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StartTask.java index e950286c7865..2e1ce8589094 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StartTask.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StartTask.java @@ -11,10 +11,11 @@ import java.util.List; /** - * In some cases the start task may be re-run even though the node was not rebooted. Due to this, start tasks should be - * idempotent and exit gracefully if the setup they're performing has already been done. Special care should be taken to - * avoid start tasks which create breakaway process or install/launch services from the start task working directory, as - * this will block Batch from being able to re-run the start task. + * A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted + * or reimaged. In some cases the start task may be re-run even though the node was not rebooted. Due to this, start + * tasks should be idempotent and exit gracefully if the setup they're performing has already been done. Special care + * should be taken to avoid start tasks which create breakaway process or install/launch services from the start task + * working directory, as this will block Batch from being able to re-run the start task. */ @Fluent public final class StartTask { @@ -59,7 +60,9 @@ public final class StartTask { * maximum retry count is 3, Batch tries the task up to 4 times (one * initial try and 3 retries). If the maximum retry count is 0, the Batch * service does not retry the task. If the maximum retry count is -1, the - * Batch service retries the task without limit. + * Batch service retries the task without limit, however this is not + * recommended for a start task or any task. The default value is 0 (no + * retries). */ @JsonProperty(value = "maxTaskRetryCount") private Integer maxTaskRetryCount; @@ -187,7 +190,7 @@ public StartTask withUserIdentity(UserIdentity userIdentity) { * Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, * the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task - * without limit. + * without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). * * @return the maxTaskRetryCount value. */ @@ -201,7 +204,7 @@ public Integer maxTaskRetryCount() { * Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry * count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, * the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task - * without limit. + * without limit, however this is not recommended for a start task or any task. The default value is 0 (no retries). * * @param maxTaskRetryCount the maxTaskRetryCount value to set. * @return the StartTask object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserIdentity.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserIdentity.java index 98eca5d5b326..eb5b4172a9fe 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserIdentity.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserIdentity.java @@ -9,7 +9,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; -/** Specify either the userName or autoUser property, but not both. */ +/** + * The definition of the user identity under which the task is run. Specify either the userName or autoUser property, + * but not both. + */ @Fluent public class UserIdentity { @JsonIgnore private final ClientLogger logger = new ClientLogger(UserIdentity.class); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java index 2a7f85de666d..f7a8bcc2550e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for BatchManagement. null. */ +/** Package containing the data models for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java index f927ece06812..8284b4fa83e5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/package-info.java @@ -2,5 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for BatchManagement. null. */ +/** Package containing the classes for BatchManagementClient. Batch Client. */ package com.azure.resourcemanager.batch; diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolGetSamples.java deleted file mode 100644 index eeee18c2e7ec..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolGetSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.batch; - -import com.azure.core.util.Context; - -/** Samples for Pool Get. */ -public final class PoolGetSamples { - /** - * Sample code: GetPool - VirtualMachineConfiguration Extensions. - * - * @param batchManager Entry point to BatchManager. - */ - public static void getPoolVirtualMachineConfigurationExtensions( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); - } - - /** - * Sample code: GetPool. - * - * @param batchManager Entry point to BatchManager. - */ - public static void getPool(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationCreateSamples.java similarity index 67% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationCreateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationCreateSamples.java index 39e802537162..eefae5e29fd9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationCreateSamples.java @@ -2,17 +2,20 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; /** Samples for Application Create. */ public final class ApplicationCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationCreate.json + */ /** * Sample code: ApplicationCreate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationCreate(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void applicationCreate(com.azure.resourcemanager.batch.BatchManager manager) { + manager .applications() .define("app1") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationDeleteSamples.java similarity index 50% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationDeleteSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationDeleteSamples.java index ca9a8ee6b759..805411b86541 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationDeleteSamples.java @@ -2,20 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Application Delete. */ public final class ApplicationDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationDelete.json + */ /** * Sample code: ApplicationDelete. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationDelete(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager - .applications() - .deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + public static void applicationDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applications().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationGetSamples.java similarity index 50% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationGetSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationGetSamples.java index 271863d1652e..ad17f802ec8c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationGetSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Application Get. */ public final class ApplicationGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationGet.json + */ /** * Sample code: ApplicationGet. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationGet(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + public static void applicationGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationListSamples.java similarity index 51% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationListSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationListSamples.java index d2872fff6c18..e0c7bcb26603 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationListSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationListSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Application List. */ public final class ApplicationListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationList.json + */ /** * Sample code: ApplicationList. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationList(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.applications().list("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + public static void applicationList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applications().list("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageActivateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageActivateSamples.java similarity index 72% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageActivateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageActivateSamples.java index 3728d8c08c49..e3620e4554c4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageActivateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageActivateSamples.java @@ -2,20 +2,23 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; /** Samples for ApplicationPackage Activate. */ public final class ApplicationPackageActivateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageActivate.json + */ /** * Sample code: ApplicationPackageActivate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationPackageActivate(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void applicationPackageActivate(com.azure.resourcemanager.batch.BatchManager manager) { + manager .applicationPackages() .activateWithResponse( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageCreateSamples.java similarity index 64% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageCreateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageCreateSamples.java index a62dfc3031f0..0d0733c20ddd 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageCreateSamples.java @@ -2,17 +2,20 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; /** Samples for ApplicationPackage Create. */ public final class ApplicationPackageCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageCreate.json + */ /** * Sample code: ApplicationPackageCreate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationPackageCreate(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void applicationPackageCreate(com.azure.resourcemanager.batch.BatchManager manager) { + manager .applicationPackages() .define("1") .withExistingApplication("default-azurebatch-japaneast", "sampleacct", "app1") diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageDeleteSamples.java similarity index 65% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageDeleteSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageDeleteSamples.java index 88afb0671b35..7622c5bb1322 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageDeleteSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for ApplicationPackage Delete. */ public final class ApplicationPackageDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageDelete.json + */ /** * Sample code: ApplicationPackageDelete. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationPackageDelete(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void applicationPackageDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager .applicationPackages() .deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageGetSamples.java similarity index 64% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageGetSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageGetSamples.java index e4f7f901a17b..51841383ea74 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageGetSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for ApplicationPackage Get. */ public final class ApplicationPackageGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageGet.json + */ /** * Sample code: ApplicationPackageGet. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationPackageGet(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void applicationPackageGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager .applicationPackages() .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageListSamples.java similarity index 51% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageListSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageListSamples.java index 619060f6ffd9..e2aa1fccb8b1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationPackageListSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageListSamples.java @@ -2,20 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for ApplicationPackage List. */ public final class ApplicationPackageListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationPackageList.json + */ /** * Sample code: ApplicationPackageList. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationPackageList(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager - .applicationPackages() - .list("default-azurebatch-japaneast", "sampleacct", "app1", null, Context.NONE); + public static void applicationPackageList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.applicationPackages().list("default-azurebatch-japaneast", "sampleacct", "app1", null, Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationUpdateSamples.java similarity index 72% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationUpdateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationUpdateSamples.java index 8566c3fe7cc6..f93068322322 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/ApplicationUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationUpdateSamples.java @@ -2,21 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.Application; /** Samples for Application Update. */ public final class ApplicationUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/ApplicationUpdate.json + */ /** * Sample code: ApplicationUpdate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void applicationUpdate(com.azure.resourcemanager.batch.BatchManager batchManager) { + public static void applicationUpdate(com.azure.resourcemanager.batch.BatchManager manager) { Application resource = - batchManager + manager .applications() .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE) .getValue(); diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountCreateSamples.java similarity index 78% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountCreateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountCreateSamples.java index af42d5f5168d..64944f99f8c4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountCreateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; import com.azure.resourcemanager.batch.models.BatchAccountIdentity; @@ -16,13 +16,16 @@ /** Samples for BatchAccount Create. */ public final class BatchAccountCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_BYOS.json + */ /** * Sample code: BatchAccountCreate_BYOS. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .define("sampleacct") .withRegion("japaneast") @@ -40,14 +43,16 @@ public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchM .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_UserAssignedIdentity.json + */ /** * Sample code: BatchAccountCreate_UserAssignedIdentity. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountCreateUserAssignedIdentity( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void batchAccountCreateUserAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .define("sampleacct") .withRegion("japaneast") @@ -66,13 +71,16 @@ public static void batchAccountCreateUserAssignedIdentity( .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateBatchAccountCreate.json + */ /** * Sample code: PrivateBatchAccountCreate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .define("sampleacct") .withRegion("japaneast") @@ -90,14 +98,16 @@ public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.Bat .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_SystemAssignedIdentity.json + */ /** * Sample code: BatchAccountCreate_SystemAssignedIdentity. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountCreateSystemAssignedIdentity( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void batchAccountCreateSystemAssignedIdentity(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .define("sampleacct") .withRegion("japaneast") @@ -110,13 +120,16 @@ public static void batchAccountCreateSystemAssignedIdentity( .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountCreate_Default.json + */ /** * Sample code: BatchAccountCreate_Default. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountCreateDefault(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void batchAccountCreateDefault(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .define("sampleacct") .withRegion("japaneast") diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountDeleteSamples.java similarity index 52% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountDeleteSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountDeleteSamples.java index aac1391190c9..d9964c33077e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountDeleteSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for BatchAccount Delete. */ public final class BatchAccountDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountDelete.json + */ /** * Sample code: BatchAccountDelete. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountDelete(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.batchAccounts().delete("default-azurebatch-japaneast", "sampleacct", Context.NONE); + public static void batchAccountDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().delete("default-azurebatch-japaneast", "sampleacct", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetByResourceGroupSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetByResourceGroupSamples.java similarity index 60% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetByResourceGroupSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetByResourceGroupSamples.java index b7367a3f91b1..304e186fccca 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetByResourceGroupSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetByResourceGroupSamples.java @@ -2,30 +2,36 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for BatchAccount GetByResourceGroup. */ public final class BatchAccountGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateBatchAccountGet.json + */ /** * Sample code: PrivateBatchAccountGet. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountGet.json + */ /** * Sample code: BatchAccountGet. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountGet(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void batchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetDetectorSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetDetectorSamples.java new file mode 100644 index 000000000000..41546ccd4ee0 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetDetectorSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.Context; + +/** Samples for BatchAccount GetDetector. */ +public final class BatchAccountGetDetectorSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/DetectorGet.json + */ + /** + * Sample code: GetDetector. + * + * @param manager Entry point to BatchManager. + */ + public static void getDetector(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .batchAccounts() + .getDetectorWithResponse("default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", Context.NONE); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetKeysSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetKeysSamples.java similarity index 51% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetKeysSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetKeysSamples.java index 7d7a566117df..06bcd6b3f206 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountGetKeysSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetKeysSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for BatchAccount GetKeys. */ public final class BatchAccountGetKeysSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountGetKeys.json + */ /** * Sample code: BatchAccountGetKeys. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountGetKeys(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.batchAccounts().getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + public static void batchAccountGetKeys(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListByResourceGroupSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListByResourceGroupSamples.java similarity index 52% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListByResourceGroupSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListByResourceGroupSamples.java index 014ada9821dd..ba6093afd84d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListByResourceGroupSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListByResourceGroupSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for BatchAccount ListByResourceGroup. */ public final class BatchAccountListByResourceGroupSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountListByResourceGroup.json + */ /** * Sample code: BatchAccountListByResourceGroup. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountListByResourceGroup(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.batchAccounts().listByResourceGroup("default-azurebatch-japaneast", Context.NONE); + public static void batchAccountListByResourceGroup(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().listByResourceGroup("default-azurebatch-japaneast", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListDetectorsSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListDetectorsSamples.java new file mode 100644 index 000000000000..1ec565749a49 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListDetectorsSamples.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.batch.generated; + +import com.azure.core.util.Context; + +/** Samples for BatchAccount ListDetectors. */ +public final class BatchAccountListDetectorsSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/DetectorList.json + */ + /** + * Sample code: ListDetectors. + * + * @param manager Entry point to BatchManager. + */ + public static void listDetectors(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().listDetectors("default-azurebatch-japaneast", "sampleacct", Context.NONE); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java similarity index 65% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java index 58b683e2f452..5cef25f74769 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for BatchAccount ListOutboundNetworkDependenciesEndpoints. */ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json + */ /** * Sample code: ListOutboundNetworkDependencies. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void listOutboundNetworkDependencies(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void listOutboundNetworkDependencies(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .listOutboundNetworkDependenciesEndpoints("default-azurebatch-japaneast", "sampleacct", Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListSamples.java similarity index 55% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListSamples.java index 6652bcf39280..8c291663cbe5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountListSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for BatchAccount List. */ public final class BatchAccountListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountList.json + */ /** * Sample code: BatchAccountList. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountList(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.batchAccounts().list(Context.NONE); + public static void batchAccountList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.batchAccounts().list(Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountRegenerateKeySamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountRegenerateKeySamples.java similarity index 73% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountRegenerateKeySamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountRegenerateKeySamples.java index 40414b04d3a7..0cb90d2161e9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountRegenerateKeySamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountRegenerateKeySamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.AccountKeyType; @@ -10,13 +10,16 @@ /** Samples for BatchAccount RegenerateKey. */ public final class BatchAccountRegenerateKeySamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountRegenerateKey.json + */ /** * Sample code: BatchAccountRegenerateKey. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountRegenerateKey(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void batchAccountRegenerateKey(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .regenerateKeyWithResponse( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountSynchronizeAutoStorageKeysSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountSynchronizeAutoStorageKeysSamples.java similarity index 57% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountSynchronizeAutoStorageKeysSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountSynchronizeAutoStorageKeysSamples.java index 37420a6e2f21..3933272d2e8f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountSynchronizeAutoStorageKeysSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountSynchronizeAutoStorageKeysSamples.java @@ -2,20 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for BatchAccount SynchronizeAutoStorageKeys. */ public final class BatchAccountSynchronizeAutoStorageKeysSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountSynchronizeAutoStorageKeys.json + */ /** * Sample code: BatchAccountSynchronizeAutoStorageKeys. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountSynchronizeAutoStorageKeys( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void batchAccountSynchronizeAutoStorageKeys(com.azure.resourcemanager.batch.BatchManager manager) { + manager .batchAccounts() .synchronizeAutoStorageKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountUpdateSamples.java similarity index 78% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountUpdateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountUpdateSamples.java index 6ae8c3820799..147f68531bce 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/BatchAccountUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; @@ -10,14 +10,17 @@ /** Samples for BatchAccount Update. */ public final class BatchAccountUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/BatchAccountUpdate.json + */ /** * Sample code: BatchAccountUpdate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void batchAccountUpdate(com.azure.resourcemanager.batch.BatchManager batchManager) { + public static void batchAccountUpdate(com.azure.resourcemanager.batch.BatchManager manager) { BatchAccount resource = - batchManager + manager .batchAccounts() .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE) .getValue(); diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCancelDeletionSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCancelDeletionSamples.java similarity index 68% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCancelDeletionSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCancelDeletionSamples.java index 5e72e14af4ab..9950ac513e8f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCancelDeletionSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCancelDeletionSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Certificate CancelDeletion. */ public final class CertificateCancelDeletionSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCancelDeletion.json + */ /** * Sample code: CertificateCancelDeletion. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void certificateCancelDeletion(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void certificateCancelDeletion(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .cancelDeletionWithResponse( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCreateSamples.java similarity index 68% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCreateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCreateSamples.java index 4583cc8eb26a..0df6cba5a75f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCreateSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.resourcemanager.batch.models.CertificateFormat; /** Samples for Certificate Create. */ public final class CertificateCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCreate_Full.json + */ /** * Sample code: CreateCertificate - Full. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createCertificateFull(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createCertificateFull(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -26,13 +29,16 @@ public static void createCertificateFull(com.azure.resourcemanager.batch.BatchMa .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCreate_Minimal.json + */ /** * Sample code: CreateCertificate - Minimal Pfx. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createCertificateMinimalPfx(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createCertificateMinimalPfx(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -41,13 +47,16 @@ public static void createCertificateMinimalPfx(com.azure.resourcemanager.batch.B .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateCreate_MinimalCer.json + */ /** * Sample code: CreateCertificate - Minimal Cer. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createCertificateMinimalCer(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createCertificateMinimalCer(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .define("sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateDeleteSamples.java similarity index 68% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateDeleteSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateDeleteSamples.java index 87b956e114df..c72dd18be7fe 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateDeleteSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Certificate Delete. */ public final class CertificateDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateDelete.json + */ /** * Sample code: CertificateDelete. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void certificateDelete(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void certificateDelete(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .delete( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateGetSamples.java similarity index 64% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateGetSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateGetSamples.java index 92424c61502c..5086cb4ddb04 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateGetSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Certificate Get. */ public final class CertificateGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateGetWithDeletionError.json + */ /** * Sample code: Get Certificate with Deletion Error. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void getCertificateWithDeletionError(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void getCertificateWithDeletionError(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .getWithResponse( "default-azurebatch-japaneast", @@ -23,13 +26,16 @@ public static void getCertificateWithDeletionError(com.azure.resourcemanager.bat Context.NONE); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateGet.json + */ /** * Sample code: Get Certificate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void getCertificate(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void getCertificate(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .getWithResponse( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateListByBatchAccountSamples.java similarity index 66% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateListByBatchAccountSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateListByBatchAccountSamples.java index 970948571b6b..221c63d70aa9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateListByBatchAccountSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateListByBatchAccountSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Certificate ListByBatchAccount. */ public final class CertificateListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateListWithFilter.json + */ /** * Sample code: ListCertificates - Filter and Select. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void listCertificatesFilterAndSelect(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void listCertificatesFilterAndSelect(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .listByBatchAccount( "default-azurebatch-japaneast", @@ -26,13 +29,16 @@ public static void listCertificatesFilterAndSelect(com.azure.resourcemanager.bat Context.NONE); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateList.json + */ /** * Sample code: ListCertificates. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void listCertificates(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void listCertificates(com.azure.resourcemanager.batch.BatchManager manager) { + manager .certificates() .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 1, null, null, Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateUpdateSamples.java similarity index 75% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateUpdateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateUpdateSamples.java index c9a7258a14f2..ac24588c0e6d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/CertificateUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateUpdateSamples.java @@ -2,21 +2,24 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.Certificate; /** Samples for Certificate Update. */ public final class CertificateUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/CertificateUpdate.json + */ /** * Sample code: UpdateCertificate. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void updateCertificate(com.azure.resourcemanager.batch.BatchManager batchManager) { + public static void updateCertificate(com.azure.resourcemanager.batch.BatchManager manager) { Certificate resource = - batchManager + manager .certificates() .getWithResponse( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationCheckNameAvailabilitySamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationCheckNameAvailabilitySamples.java similarity index 58% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationCheckNameAvailabilitySamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationCheckNameAvailabilitySamples.java index a07455210ff2..e704cd655bcb 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationCheckNameAvailabilitySamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationCheckNameAvailabilitySamples.java @@ -2,34 +2,39 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; /** Samples for Location CheckNameAvailability. */ public final class LocationCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationCheckNameAvailability_AlreadyExists.json + */ /** * Sample code: LocationCheckNameAvailability_AlreadyExists. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ public static void locationCheckNameAvailabilityAlreadyExists( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + com.azure.resourcemanager.batch.BatchManager manager) { + manager .locations() .checkNameAvailabilityWithResponse( "japaneast", new CheckNameAvailabilityParameters().withName("existingaccountname"), Context.NONE); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationCheckNameAvailability_Available.json + */ /** * Sample code: LocationCheckNameAvailability_Available. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void locationCheckNameAvailabilityAvailable( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void locationCheckNameAvailabilityAvailable(com.azure.resourcemanager.batch.BatchManager manager) { + manager .locations() .checkNameAvailabilityWithResponse( "japaneast", new CheckNameAvailabilityParameters().withName("newaccountname"), Context.NONE); diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationGetQuotasSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationGetQuotasSamples.java similarity index 53% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationGetQuotasSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationGetQuotasSamples.java index 235becd58a30..475d5f82d953 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationGetQuotasSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationGetQuotasSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Location GetQuotas. */ public final class LocationGetQuotasSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationGetQuotas.json + */ /** * Sample code: LocationGetQuotas. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void locationGetQuotas(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.locations().getQuotasWithResponse("japaneast", Context.NONE); + public static void locationGetQuotas(com.azure.resourcemanager.batch.BatchManager manager) { + manager.locations().getQuotasWithResponse("japaneast", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedCloudServiceSkusSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedCloudServiceSkusSamples.java similarity index 53% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedCloudServiceSkusSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedCloudServiceSkusSamples.java index 4717d3322591..4d60ecfb5daa 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedCloudServiceSkusSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedCloudServiceSkusSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Location ListSupportedCloudServiceSkus. */ public final class LocationListSupportedCloudServiceSkusSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationListCloudServiceSkus.json + */ /** * Sample code: LocationListCloudServiceSkus. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void locationListCloudServiceSkus(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.locations().listSupportedCloudServiceSkus("japaneast", null, null, Context.NONE); + public static void locationListCloudServiceSkus(com.azure.resourcemanager.batch.BatchManager manager) { + manager.locations().listSupportedCloudServiceSkus("japaneast", null, null, Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedVirtualMachineSkusSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedVirtualMachineSkusSamples.java similarity index 53% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedVirtualMachineSkusSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedVirtualMachineSkusSamples.java index f35a5a4d5969..476764b0de93 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/LocationListSupportedVirtualMachineSkusSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedVirtualMachineSkusSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Location ListSupportedVirtualMachineSkus. */ public final class LocationListSupportedVirtualMachineSkusSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/LocationListVirtualMachineSkus.json + */ /** * Sample code: LocationListVirtualMachineSkus. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void locationListVirtualMachineSkus(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.locations().listSupportedVirtualMachineSkus("japaneast", null, null, Context.NONE); + public static void locationListVirtualMachineSkus(com.azure.resourcemanager.batch.BatchManager manager) { + manager.locations().listSupportedVirtualMachineSkus("japaneast", null, null, Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/OperationsListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/OperationsListSamples.java new file mode 100644 index 000000000000..1e5f57bfaa0e --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/OperationsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.Context; + +/** Samples for Operations List. */ +public final class OperationsListSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/OperationsList.json + */ + /** + * Sample code: OperationsList. + * + * @param manager Entry point to BatchManager. + */ + public static void operationsList(com.azure.resourcemanager.batch.BatchManager manager) { + manager.operations().list(Context.NONE); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolCreateSamples.java similarity index 90% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolCreateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolCreateSamples.java index cca3ebf15a2e..90942b072bfa 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolCreateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; @@ -62,13 +62,16 @@ /** Samples for Pool Create. */ public final class PoolCreateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_SharedImageGallery.json + */ /** * Sample code: CreatePool - Custom Image. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -85,14 +88,16 @@ public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchMa .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_CloudServiceConfiguration.json + */ /** * Sample code: CreatePool - Full CloudServiceConfiguration. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createPoolFullCloudServiceConfiguration( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createPoolFullCloudServiceConfiguration(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -182,14 +187,17 @@ public static void createPoolFullCloudServiceConfiguration( .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json + */ /** * Sample code: CreatePool - Minimal CloudServiceConfiguration. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ public static void createPoolMinimalCloudServiceConfiguration( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -201,14 +209,17 @@ public static void createPoolMinimalCloudServiceConfiguration( .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json + */ /** * Sample code: CreatePool - Minimal VirtualMachineConfiguration. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ public static void createPoolMinimalVirtualMachineConfiguration( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -233,13 +244,16 @@ public static void createPoolMinimalVirtualMachineConfiguration( .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_NoPublicIPAddresses.json + */ /** * Sample code: CreatePool - No public IP. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -263,14 +277,17 @@ public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchMan .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json + */ /** * Sample code: CreatePool - VirtualMachineConfiguration Extensions. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ public static void createPoolVirtualMachineConfigurationExtensions( - com.azure.resourcemanager.batch.BatchManager batchManager) throws IOException { - batchManager + com.azure.resourcemanager.batch.BatchManager manager) throws IOException { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -317,13 +334,16 @@ public static void createPoolVirtualMachineConfigurationExtensions( .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_UserAssignedIdentities.json + */ /** * Sample code: CreatePool - UserAssignedIdentities. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -357,13 +377,16 @@ public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.ba .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_PublicIPs.json + */ /** * Sample code: CreatePool - Public IPs. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createPoolPublicIPs(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createPoolPublicIPs(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") @@ -391,14 +414,16 @@ public static void createPoolPublicIPs(com.azure.resourcemanager.batch.BatchMana .create(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolCreate_VirtualMachineConfiguration.json + */ /** * Sample code: CreatePool - Full VirtualMachineConfiguration. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void createPoolFullVirtualMachineConfiguration( - com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void createPoolFullVirtualMachineConfiguration(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDeleteSamples.java similarity index 51% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDeleteSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDeleteSamples.java index 4ef465a51bed..bb581b3cacb6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDeleteSamples.java @@ -2,18 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Pool Delete. */ public final class PoolDeleteSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolDelete.json + */ /** * Sample code: DeletePool. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void deletePool(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager.pools().delete("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + public static void deletePool(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().delete("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDisableAutoScaleSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDisableAutoScaleSamples.java similarity index 65% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDisableAutoScaleSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDisableAutoScaleSamples.java index aed1c3d89874..c56aad12913c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolDisableAutoScaleSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDisableAutoScaleSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Pool DisableAutoScale. */ public final class PoolDisableAutoScaleSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolDisableAutoScale.json + */ /** * Sample code: Disable AutoScale. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void disableAutoScale(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void disableAutoScale(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .disableAutoScaleWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolGetSamples.java new file mode 100644 index 000000000000..6f410492eca5 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolGetSamples.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.Context; + +/** Samples for Pool Get. */ +public final class PoolGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json + */ + /** + * Sample code: GetPool - VirtualMachineConfiguration Extensions. + * + * @param manager Entry point to BatchManager. + */ + public static void getPoolVirtualMachineConfigurationExtensions( + com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolGet.json + */ + /** + * Sample code: GetPool. + * + * @param manager Entry point to BatchManager. + */ + public static void getPool(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolListByBatchAccountSamples.java similarity index 69% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolListByBatchAccountSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolListByBatchAccountSamples.java index ef80e20e981a..a5fbaa28741e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolListByBatchAccountSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolListByBatchAccountSamples.java @@ -2,30 +2,36 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Pool ListByBatchAccount. */ public final class PoolListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolList.json + */ /** * Sample code: ListPool. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void listPool(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void listPool(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, null, null, Context.NONE); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolListWithFilter.json + */ /** * Sample code: ListPoolWithFilter. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void listPoolWithFilter(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void listPoolWithFilter(com.azure.resourcemanager.batch.BatchManager manager) { + manager .pools() .listByBatchAccount( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolStopResizeSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolStopResizeSamples.java similarity index 50% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolStopResizeSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolStopResizeSamples.java index 3cc4afc26d7d..6fc64b313441 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolStopResizeSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolStopResizeSamples.java @@ -2,20 +2,21 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for Pool StopResize. */ public final class PoolStopResizeSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolStopResize.json + */ /** * Sample code: StopPoolResize. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void stopPoolResize(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager - .pools() - .stopResizeWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + public static void stopPoolResize(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools().stopResizeWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolUpdateSamples.java similarity index 80% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolUpdateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolUpdateSamples.java index 329198503c9c..12cc2f5ec5c8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PoolUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.ApplicationPackageReference; @@ -20,14 +20,17 @@ /** Samples for Pool Update. */ public final class PoolUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_EnableAutoScale.json + */ /** * Sample code: UpdatePool - Enable Autoscale. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.BatchManager batchManager) { + public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.BatchManager manager) { Pool resource = - batchManager + manager .pools() .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) .getValue(); @@ -38,28 +41,34 @@ public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.Bat .apply(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_RemoveStartTask.json + */ /** * Sample code: UpdatePool - Remove Start Task. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void updatePoolRemoveStartTask(com.azure.resourcemanager.batch.BatchManager batchManager) { + public static void updatePoolRemoveStartTask(com.azure.resourcemanager.batch.BatchManager manager) { Pool resource = - batchManager + manager .pools() .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) .getValue(); resource.update().withStartTask(new StartTask()).apply(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_ResizePool.json + */ /** * Sample code: UpdatePool - Resize Pool. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchManager batchManager) { + public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchManager manager) { Pool resource = - batchManager + manager .pools() .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) .getValue(); @@ -76,14 +85,17 @@ public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchMan .apply(); } + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PoolUpdate_OtherProperties.json + */ /** * Sample code: UpdatePool - Other Properties. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void updatePoolOtherProperties(com.azure.resourcemanager.batch.BatchManager batchManager) { + public static void updatePoolOtherProperties(com.azure.resourcemanager.batch.BatchManager manager) { Pool resource = - batchManager + manager .pools() .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) .getValue(); diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionGetSamples.java similarity index 70% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionGetSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionGetSamples.java index 91a07364976c..7309d274fe36 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionGetSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnection Get. */ public final class PrivateEndpointConnectionGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionGet.json + */ /** * Sample code: GetPrivateEndpointConnection. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void getPrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void getPrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager manager) { + manager .privateEndpointConnections() .getWithResponse( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionListByBatchAccountSamples.java similarity index 65% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionListByBatchAccountSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionListByBatchAccountSamples.java index 82f63e1de8d0..0ab753fbe07c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionListByBatchAccountSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionListByBatchAccountSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for PrivateEndpointConnection ListByBatchAccount. */ public final class PrivateEndpointConnectionListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionsList.json + */ /** * Sample code: ListPrivateEndpointConnections. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void listPrivateEndpointConnections(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void listPrivateEndpointConnections(com.azure.resourcemanager.batch.BatchManager manager) { + manager .privateEndpointConnections() .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionUpdateSamples.java similarity index 80% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionUpdateSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionUpdateSamples.java index afd769d5e837..b204d45bca37 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateEndpointConnectionUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionUpdateSamples.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; @@ -11,13 +11,16 @@ /** Samples for PrivateEndpointConnection Update. */ public final class PrivateEndpointConnectionUpdateSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateEndpointConnectionUpdate.json + */ /** * Sample code: UpdatePrivateEndpointConnection. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void updatePrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void updatePrivateEndpointConnection(com.azure.resourcemanager.batch.BatchManager manager) { + manager .privateEndpointConnections() .update( "default-azurebatch-japaneast", diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceGetSamples.java similarity index 65% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceGetSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceGetSamples.java index 684e116d654c..eaa58efd61a8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceGetSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for PrivateLinkResource Get. */ public final class PrivateLinkResourceGetSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateLinkResourceGet.json + */ /** * Sample code: GetPrivateLinkResource. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void getPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void getPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { + manager .privateLinkResources() .getWithResponse("default-azurebatch-japaneast", "sampleacct", "sampleacct", Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceListByBatchAccountSamples.java similarity index 65% rename from sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceListByBatchAccountSamples.java rename to sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceListByBatchAccountSamples.java index d87f7ffe6bca..422472166287 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/PrivateLinkResourceListByBatchAccountSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceListByBatchAccountSamples.java @@ -2,19 +2,22 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.batch; +package com.azure.resourcemanager.batch.generated; import com.azure.core.util.Context; /** Samples for PrivateLinkResource ListByBatchAccount. */ public final class PrivateLinkResourceListByBatchAccountSamples { + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-01-01/examples/PrivateLinkResourcesList.json + */ /** * Sample code: ListPrivateLinkResource. * - * @param batchManager Entry point to BatchManager. + * @param manager Entry point to BatchManager. */ - public static void listPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager batchManager) { - batchManager + public static void listPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { + manager .privateLinkResources() .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); }