diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index fdf8d0077ec4..ad4e92616b3e 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -369,7 +369,7 @@ com.azure.resourcemanager:azure-resourcemanager-marketplaceordering;1.0.0;1.1.0- com.azure.resourcemanager:azure-resourcemanager-timeseriesinsights;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-streamanalytics;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-operationsmanagement;1.0.0-beta.3;1.0.0-beta.4 -com.azure.resourcemanager:azure-resourcemanager-batch;2.0.0;2.1.0-beta.1 +com.azure.resourcemanager:azure-resourcemanager-batch;2.0.0;2.1.0 com.azure.resourcemanager:azure-resourcemanager-datalakeanalytics;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-datalakestore;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-iotcentral;1.0.0;1.1.0-beta.3 diff --git a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md index b3156e715763..cf62f51b1350 100644 --- a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md +++ b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md @@ -1,14 +1,364 @@ # Release History -## 2.1.0-beta.1 (Unreleased) +## 2.1.0 (2026-02-11) -### Features Added +- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. The Batch Management Client. Package api-version 2025-06-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.ListPoolsResult` was removed + +#### `models.CertificateProvisioningState` was removed + +#### `models.DetectorListResult` was removed + +#### `models.CertificateReference` was removed + +#### `models.Certificate` was removed + +#### `models.CertificateStoreLocation` was removed + +#### `models.Certificate$Update` was removed + +#### `models.Certificate$UpdateStages` was removed + +#### `models.SupportedSkusResult` was removed + +#### `models.CertificatesCancelDeletionHeaders` was removed + +#### `models.OperationListResult` was removed + +#### `models.ListApplicationPackagesResult` was removed + +#### `models.CertificatesUpdateHeaders` was removed + +#### `models.AccessRulePropertiesSubscriptionsItem` was removed + +#### `models.Certificate$Definition` was removed + +#### `models.CertificateCreateOrUpdateParameters` was removed + +#### `models.Certificates` was removed + +#### `models.Certificate$DefinitionStages` was removed + +#### `models.CertificatesCreateResponse` was removed + +#### `models.OutboundEnvironmentEndpointCollection` was removed + +#### `models.CertificatesCreateHeaders` was removed + +#### `models.CertificatesUpdateResponse` was removed + +#### `models.NodeCommunicationMode` was removed + +#### `models.CertificatesGetHeaders` was removed + +#### `models.CertificatesCancelDeletionResponse` was removed + +#### `models.CertificateBaseProperties` was removed + +#### `models.CertificatesGetResponse` was removed + +#### `models.ListPrivateEndpointConnectionsResult` was removed + +#### `models.BatchAccountListResult` was removed + +#### `models.ListCertificatesResult` was removed + +#### `models.DeleteCertificateError` was removed + +#### `models.ListApplicationsResult` was removed + +#### `models.CertificateFormat` was removed + +#### `models.CertificateVisibility` was removed + +#### `models.ListPrivateLinkResourcesResult` was removed + +#### `models.NetworkSecurityPerimeterConfigurationListResult` was removed + +#### `models.AzureProxyResource` was removed + +#### `models.PoolsDisableAutoScaleHeaders` was modified + +* `withEtag(java.lang.String)` was removed + +#### `models.AutoScaleRunError` was modified + +* `AutoScaleRunError()` was changed to private access +* `withMessage(java.lang.String)` was removed +* `withCode(java.lang.String)` was removed +* `withDetails(java.util.List)` was removed + +#### `models.OperationDisplay` was modified + +* `OperationDisplay()` was changed to private access +* `withResource(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed +* `withOperation(java.lang.String)` was removed +* `withDescription(java.lang.String)` was removed + +#### `models.CheckNameAvailabilityParameters` was modified + +* `java.lang.String type()` -> `models.ResourceType type()` +* `withType(java.lang.String)` was removed + +#### `models.AutoScaleRun` was modified + +* `AutoScaleRun()` was changed to private access +* `withError(models.AutoScaleRunError)` was removed +* `withResults(java.lang.String)` was removed +* `withEvaluationTime(java.time.OffsetDateTime)` was removed + +#### `models.EndpointDependency` was modified + +* `EndpointDependency()` was changed to private access + +#### `models.ResizeOperationStatus` was modified + +* `ResizeOperationStatus()` was changed to private access +* `withStartTime(java.time.OffsetDateTime)` was removed +* `withNodeDeallocationOption(models.ComputeNodeDeallocationOption)` was removed +* `withErrors(java.util.List)` was removed +* `withTargetDedicatedNodes(java.lang.Integer)` was removed +* `withTargetLowPriorityNodes(java.lang.Integer)` was removed +* `withResizeTimeout(java.time.Duration)` was removed + +#### `models.ProvisioningIssue` was modified + +* `ProvisioningIssue()` was changed to private access + +#### `models.PoolsStopResizeHeaders` was modified + +* `withEtag(java.lang.String)` was removed + +#### `models.EndpointDetail` was modified + +* `EndpointDetail()` was changed to private access + +#### `models.NetworkSecurityProfile` was modified + +* `NetworkSecurityProfile()` was changed to private access +* `withDiagnosticSettingsVersion(java.lang.Integer)` was removed +* `withEnabledLogCategories(java.util.List)` was removed +* `withAccessRulesVersion(java.lang.Integer)` was removed +* `withAccessRules(java.util.List)` was removed +* `withName(java.lang.String)` was removed + +#### `models.PoolsUpdateHeaders` was modified + +* `withEtag(java.lang.String)` was removed + +#### `models.AccessRule` was modified + +* `AccessRule()` was changed to private access +* `withName(java.lang.String)` was removed +* `withProperties(models.AccessRuleProperties)` was removed + +#### `BatchManager` was modified + +* `certificates()` was removed + +#### `models.DataDisk` was modified + +* `withStorageAccountType(models.StorageAccountType)` was removed +* `storageAccountType()` was removed + +#### `models.AutoStorageProperties` was modified + +* `AutoStorageProperties()` was changed to private access +* `withNodeIdentityReference(models.ComputeNodeIdentityReference)` was removed +* `withStorageAccountId(java.lang.String)` was removed +* `withAuthenticationMode(models.AutoStorageAuthenticationMode)` was removed +* `withLastKeySync(java.time.OffsetDateTime)` was removed + +#### `models.ProvisioningIssueProperties` was modified + +* `ProvisioningIssueProperties()` was changed to private access + +#### `models.NetworkSecurityPerimeter` was modified + +* `NetworkSecurityPerimeter()` was changed to private access +* `java.util.UUID perimeterGuid()` -> `java.lang.String perimeterGuid()` +* `withLocation(java.lang.String)` was removed +* `withId(java.lang.String)` was removed +* `withPerimeterGuid(java.util.UUID)` was removed + +#### `models.PrivateEndpoint` was modified + +* `PrivateEndpoint()` was changed to private access + +#### `models.VirtualMachineFamilyCoreQuota` was modified + +* `VirtualMachineFamilyCoreQuota()` was changed to private access + +#### `models.PoolsCreateHeaders` was modified + +* `withEtag(java.lang.String)` was removed + +#### `models.AccessRuleProperties` was modified + +* `AccessRuleProperties()` was changed to private access +* `withEmailAddresses(java.util.List)` was removed +* `withDirection(models.AccessRuleDirection)` was removed +* `withSubscriptions(java.util.List)` was removed +* `withFullyQualifiedDomainNames(java.util.List)` was removed +* `withNetworkSecurityPerimeters(java.util.List)` was removed +* `withAddressPrefixes(java.util.List)` was removed +* `withPhoneNumbers(java.util.List)` was removed + +#### `models.Pool$Definition` was modified + +* `withCertificates(java.util.List)` was removed +* `withTargetNodeCommunicationMode(models.NodeCommunicationMode)` was removed +* `withResourceTags(java.util.Map)` was removed +* `withApplicationLicenses(java.util.List)` was removed + +#### `models.NetworkSecurityPerimeterConfigurationProperties` was modified + +* `NetworkSecurityPerimeterConfigurationProperties()` was changed to private access +* `withNetworkSecurityPerimeter(models.NetworkSecurityPerimeter)` was removed +* `withProfile(models.NetworkSecurityProfile)` was removed +* `withResourceAssociation(models.ResourceAssociation)` was removed + +#### `models.SkuCapability` was modified + +* `SkuCapability()` was changed to private access + +#### `models.PoolsGetHeaders` was modified + +* `withEtag(java.lang.String)` was removed + +#### `models.ResourceAssociation` was modified + +* `ResourceAssociation()` was changed to private access +* `withAccessMode(models.ResourceAssociationAccessMode)` was removed +* `withName(java.lang.String)` was removed + +#### `models.Pool` was modified + +* `applicationLicenses()` was removed +* `certificates()` was removed +* `resourceTags()` was removed +* `targetNodeCommunicationMode()` was removed +* `currentNodeCommunicationMode()` was removed + +#### `models.Pool$Update` was modified + +* `withTargetNodeCommunicationMode(models.NodeCommunicationMode)` was removed +* `withApplicationLicenses(java.util.List)` was removed +* `withCertificates(java.util.List)` was removed +* `withResourceTags(java.util.Map)` was removed + +#### `models.ResizeError` was modified + +* `ResizeError()` was changed to private access +* `withCode(java.lang.String)` was removed +* `withDetails(java.util.List)` was removed +* `withMessage(java.lang.String)` was removed + +#### `models.IpRule` was modified + +* `java.lang.String action()` -> `models.IpRuleAction action()` +* `withAction(java.lang.String)` was removed + +### Features Added + +* `models.IPFamily` was added + +* `models.ResourceType` was added + +* `models.ProxyAgentSettings` was added + +* `models.IpRuleAction` was added + +* `models.AccessRulePropertiesSubscription` was added + +* `models.DiskCustomerManagedKey` was added + +* `models.IPTag` was added + +* `models.HostEndpointSettings` was added + +* `models.JobDefaultOrder` was added + +* `models.HostEndpointSettingsModeTypes` was added + +* `models.DiskEncryptionSetParameters` was added + +#### `models.CheckNameAvailabilityParameters` was modified + +* `withType(models.ResourceType)` was added + +#### `models.Application` was modified + +* `systemData()` was added + +#### `models.DiskEncryptionConfiguration` was modified + +* `withCustomerManagedKey(models.DiskCustomerManagedKey)` was added +* `customerManagedKey()` was added + +#### `models.SecurityProfile` was modified + +* `proxyAgentSettings()` was added +* `withProxyAgentSettings(models.ProxyAgentSettings)` was added + +#### `models.BatchAccount` was modified + +* `systemData()` was added + +#### `models.VMDiskSecurityProfile` was modified + +* `withDiskEncryptionSet(models.DiskEncryptionSetParameters)` was added +* `diskEncryptionSet()` was added + +#### `models.PrivateEndpointConnection` was modified + +* `systemData()` was added + +#### `models.ManagedDisk` was modified + +* `diskEncryptionSet()` was added +* `withDiskEncryptionSet(models.DiskEncryptionSetParameters)` was added + +#### `models.DataDisk` was modified + +* `managedDisk()` was added +* `withManagedDisk(models.ManagedDisk)` was added + +#### `models.ApplicationPackage` was modified + +* `systemData()` was added + +#### `models.PrivateLinkResource` was modified + +* `systemData()` was added + +#### `models.TaskSchedulingPolicy` was modified + +* `withJobDefaultOrder(models.JobDefaultOrder)` was added +* `jobDefaultOrder()` was added + +#### `models.PublicIpAddressConfiguration` was modified + +* `ipTags()` was added +* `withIpTags(java.util.List)` was added +* `ipFamilies()` was added +* `withIpFamilies(java.util.List)` was added + +#### `models.Pool` was modified + +* `systemData()` was added + +#### `models.DetectorResponse` was modified + +* `systemData()` was added + +#### `models.IpRule` was modified -### Other Changes +* `withAction(models.IpRuleAction)` was added ## 2.0.0 (2024-09-26) diff --git a/sdk/batch/azure-resourcemanager-batch/README.md b/sdk/batch/azure-resourcemanager-batch/README.md index 92c941f90905..946518988cd8 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. Batch Client. Package tag package-2024-07. 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. The Batch Management Client. Package api-version 2025-06-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 - 2.1.0-beta.1 + 2.1.0 ``` [//]: # ({x-version-update-end}) @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ BatchManager manager = BatchManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -72,8 +72,7 @@ See [API design][design] for general introduction on design and key concepts on ```java // batch account -account = batchManager - .batchAccounts() +account = batchManager.batchAccounts() .define(batchAccountName) .withRegion(REGION) .withExistingResourceGroup(resourceGroup) @@ -84,21 +83,16 @@ pool = batchManager.pools() .define(poolName) .withExistingBatchAccount(resourceGroup, batchAccountName) .withDisplayName(poolDisplayName) - .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() - .withFixedScale( - new FixedScaleSettings() - .withResizeTimeout(Duration.parse("PT8M")) - .withTargetDedicatedNodes(1) - .withTargetLowPriorityNodes(1) - .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION))) + .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() + .withFixedScale(new FixedScaleSettings().withResizeTimeout(Duration.parse("PT8M")) + .withTargetDedicatedNodes(1) + .withTargetLowPriorityNodes(1) + .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION))) .withVmSize("Standard_D1") .create(); ``` @@ -132,5 +126,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md index e5f8ae1b7f75..d54ef983130f 100644 --- a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md +++ b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md @@ -32,15 +32,6 @@ - [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) @@ -86,8 +77,7 @@ */ public final class ApplicationCreateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationCreate.json + * x-ms-original-file: 2025-06-01/ApplicationCreate.json */ /** * Sample code: ApplicationCreate. @@ -113,8 +103,7 @@ public final class ApplicationCreateSamples { */ public final class ApplicationDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationDelete.json + * x-ms-original-file: 2025-06-01/ApplicationDelete.json */ /** * Sample code: ApplicationDelete. @@ -136,8 +125,7 @@ public final class ApplicationDeleteSamples { */ public final class ApplicationGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationGet.json + * x-ms-original-file: 2025-06-01/ApplicationGet.json */ /** * Sample code: ApplicationGet. @@ -159,8 +147,7 @@ public final class ApplicationGetSamples { */ public final class ApplicationListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationList.json + * x-ms-original-file: 2025-06-01/ApplicationList.json */ /** * Sample code: ApplicationList. @@ -184,8 +171,7 @@ import com.azure.resourcemanager.batch.models.Application; */ public final class ApplicationUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationUpdate.json + * x-ms-original-file: 2025-06-01/ApplicationUpdate.json */ /** * Sample code: ApplicationUpdate. @@ -211,8 +197,7 @@ import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParamete */ public final class ApplicationPackageActivateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageActivate.json + * x-ms-original-file: 2025-06-01/ApplicationPackageActivate.json */ /** * Sample code: ApplicationPackageActivate. @@ -235,8 +220,7 @@ public final class ApplicationPackageActivateSamples { */ public final class ApplicationPackageCreateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageCreate.json + * x-ms-original-file: 2025-06-01/ApplicationPackageCreate.json */ /** * Sample code: ApplicationPackageCreate. @@ -260,8 +244,7 @@ public final class ApplicationPackageCreateSamples { */ public final class ApplicationPackageDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageDelete.json + * x-ms-original-file: 2025-06-01/ApplicationPackageDelete.json */ /** * Sample code: ApplicationPackageDelete. @@ -284,8 +267,7 @@ public final class ApplicationPackageDeleteSamples { */ public final class ApplicationPackageGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageGet.json + * x-ms-original-file: 2025-06-01/ApplicationPackageGet.json */ /** * Sample code: ApplicationPackageGet. @@ -308,8 +290,7 @@ public final class ApplicationPackageGetSamples { */ public final class ApplicationPackageListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageList.json + * x-ms-original-file: 2025-06-01/ApplicationPackageList.json */ /** * Sample code: ApplicationPackageList. @@ -341,8 +322,7 @@ import java.util.Map; */ public final class BatchAccountCreateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_BYOS.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_BYOS.json */ /** * Sample code: BatchAccountCreate_BYOS. @@ -355,17 +335,16 @@ public final class BatchAccountCreateSamples { .withRegion("japaneast") .withExistingResourceGroup("default-azurebatch-japaneast") .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + "/subscriptions/12345678-1234-1234-1234-123456789012/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/2024-07-01/examples/ - * BatchAccountCreate_UserAssignedIdentity.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_UserAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_UserAssignedIdentity. @@ -379,16 +358,15 @@ public final class BatchAccountCreateSamples { .withExistingResourceGroup("default-azurebatch-japaneast") .withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities(mapOf( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + "/subscriptions/12345678-1234-1234-1234-123456789012/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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountCreate.json + * x-ms-original-file: 2025-06-01/PrivateBatchAccountCreate.json */ /** * Sample code: PrivateBatchAccountCreate. @@ -401,17 +379,16 @@ public final class BatchAccountCreateSamples { .withRegion("japaneast") .withExistingResourceGroup("default-azurebatch-japaneast") .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .withKeyVaultReference(new KeyVaultReference().withId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample") + "/subscriptions/12345678-1234-1234-1234-123456789012/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/2024-07-01/examples/ - * BatchAccountCreate_SystemAssignedIdentity.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_SystemAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_SystemAssignedIdentity. @@ -425,13 +402,12 @@ public final class BatchAccountCreateSamples { .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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_Default.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_Default.json */ /** * Sample code: BatchAccountCreate_Default. @@ -444,7 +420,7 @@ public final class BatchAccountCreateSamples { .withRegion("japaneast") .withExistingResourceGroup("default-azurebatch-japaneast") .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .create(); } @@ -470,8 +446,7 @@ public final class BatchAccountCreateSamples { */ public final class BatchAccountDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountDelete.json + * x-ms-original-file: 2025-06-01/BatchAccountDelete.json */ /** * Sample code: BatchAccountDelete. @@ -492,8 +467,7 @@ public final class BatchAccountDeleteSamples { */ public final class BatchAccountGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountGet.json + * x-ms-original-file: 2025-06-01/PrivateBatchAccountGet.json */ /** * Sample code: PrivateBatchAccountGet. @@ -507,8 +481,7 @@ public final class BatchAccountGetByResourceGroupSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountGet.json + * x-ms-original-file: 2025-06-01/BatchAccountGet.json */ /** * Sample code: BatchAccountGet. @@ -531,8 +504,7 @@ public final class BatchAccountGetByResourceGroupSamples { */ public final class BatchAccountGetDetectorSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/DetectorGet.json + * x-ms-original-file: 2025-06-01/DetectorGet.json */ /** * Sample code: GetDetector. @@ -555,8 +527,7 @@ public final class BatchAccountGetDetectorSamples { */ public final class BatchAccountGetKeysSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountGetKeys.json + * x-ms-original-file: 2025-06-01/BatchAccountGetKeys.json */ /** * Sample code: BatchAccountGetKeys. @@ -578,8 +549,7 @@ public final class BatchAccountGetKeysSamples { */ public final class BatchAccountListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountList.json + * x-ms-original-file: 2025-06-01/BatchAccountList.json */ /** * Sample code: BatchAccountList. @@ -600,9 +570,7 @@ public final class BatchAccountListSamples { */ public final class BatchAccountListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountListByResourceGroup. - * json + * x-ms-original-file: 2025-06-01/BatchAccountListByResourceGroup.json */ /** * Sample code: BatchAccountListByResourceGroup. @@ -623,8 +591,7 @@ public final class BatchAccountListByResourceGroupSamples { */ public final class BatchAccountListDetectorsSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/DetectorList.json + * x-ms-original-file: 2025-06-01/DetectorList.json */ /** * Sample code: ListDetectors. @@ -646,8 +613,7 @@ public final class BatchAccountListDetectorsSamples { */ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * BatchAccountListOutboundNetworkDependenciesEndpoints.json + * x-ms-original-file: 2025-06-01/BatchAccountListOutboundNetworkDependenciesEndpoints.json */ /** * Sample code: ListOutboundNetworkDependencies. @@ -673,8 +639,7 @@ import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameter */ public final class BatchAccountRegenerateKeySamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountRegenerateKey.json + * x-ms-original-file: 2025-06-01/BatchAccountRegenerateKey.json */ /** * Sample code: BatchAccountRegenerateKey. @@ -698,8 +663,7 @@ public final class BatchAccountRegenerateKeySamples { */ public final class BatchAccountSynchronizeAutoStorageKeysSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * BatchAccountSynchronizeAutoStorageKeys.json + * x-ms-original-file: 2025-06-01/BatchAccountSynchronizeAutoStorageKeys.json */ /** * Sample code: BatchAccountSynchronizeAutoStorageKeys. @@ -725,8 +689,7 @@ import com.azure.resourcemanager.batch.models.BatchAccount; */ public final class BatchAccountUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountUpdate.json + * x-ms-original-file: 2025-06-01/BatchAccountUpdate.json */ /** * Sample code: BatchAccountUpdate. @@ -740,246 +703,24 @@ public final class BatchAccountUpdateSamples { .getValue(); resource.update() .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .apply(); } } ``` -### Certificate_CancelDeletion - -```java -/** - * Samples for Certificate CancelDeletion. - */ -public final class CertificateCancelDeletionSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", com.azure.core.util.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/2024-07-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") - .withPassword("") - .withThumbprintAlgorithm("sha1") - .withThumbprint("0a0e4f50d51beadeac1d35afc5116098e7902e6e") - .withFormat(CertificateFormat.PFX) - .create(); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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") - .withPassword("") - .create(); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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") - .withFormat(CertificateFormat.CER) - .create(); - } -} -``` - -### Certificate_Delete - -```java -/** - * Samples for Certificate Delete. - */ -public final class CertificateDeleteSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", - com.azure.core.util.Context.NONE); - } -} -``` - -### Certificate_Get - -```java -/** - * Samples for Certificate Get. - */ -public final class CertificateGetSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", com.azure.core.util.Context.NONE); - } -} -``` - -### Certificate_ListByBatchAccount - -```java -/** - * Samples for Certificate ListByBatchAccount. - */ -public final class CertificateListByBatchAccountSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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'", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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, - com.azure.core.util.Context.NONE); - } -} -``` - -### Certificate_Update - -```java -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/2024-07-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", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withData("MIIJsgIBAzCCCW4GCSqGSIb3DQE...").withPassword("").apply(); - } -} -``` - ### Location_CheckNameAvailability ```java import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; +import com.azure.resourcemanager.batch.models.ResourceType; /** * Samples for Location CheckNameAvailability. */ public final class LocationCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * LocationCheckNameAvailability_AlreadyExists.json + * x-ms-original-file: 2025-06-01/LocationCheckNameAvailability_AlreadyExists.json */ /** * Sample code: LocationCheckNameAvailability_AlreadyExists. @@ -990,13 +731,13 @@ public final class LocationCheckNameAvailabilitySamples { locationCheckNameAvailabilityAlreadyExists(com.azure.resourcemanager.batch.BatchManager manager) { manager.locations() .checkNameAvailabilityWithResponse("japaneast", - new CheckNameAvailabilityParameters().withName("existingaccountname"), + new CheckNameAvailabilityParameters().withName("existingaccountname") + .withType(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * LocationCheckNameAvailability_Available.json + * x-ms-original-file: 2025-06-01/LocationCheckNameAvailability_Available.json */ /** * Sample code: LocationCheckNameAvailability_Available. @@ -1006,7 +747,9 @@ public final class LocationCheckNameAvailabilitySamples { public static void locationCheckNameAvailabilityAvailable(com.azure.resourcemanager.batch.BatchManager manager) { manager.locations() .checkNameAvailabilityWithResponse("japaneast", - new CheckNameAvailabilityParameters().withName("newaccountname"), com.azure.core.util.Context.NONE); + new CheckNameAvailabilityParameters().withName("newaccountname") + .withType(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS), + com.azure.core.util.Context.NONE); } } ``` @@ -1019,8 +762,7 @@ public final class LocationCheckNameAvailabilitySamples { */ public final class LocationGetQuotasSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationGetQuotas.json + * x-ms-original-file: 2025-06-01/LocationGetQuotas.json */ /** * Sample code: LocationGetQuotas. @@ -1041,9 +783,7 @@ public final class LocationGetQuotasSamples { */ public final class LocationListSupportedVirtualMachineSkusSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationListVirtualMachineSkus. - * json + * x-ms-original-file: 2025-06-01/LocationListVirtualMachineSkus.json */ /** * Sample code: LocationListVirtualMachineSkus. @@ -1064,8 +804,7 @@ public final class LocationListSupportedVirtualMachineSkusSamples { */ public final class NetworkSecurityPerimeterGetConfigurationSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationGet.json + * x-ms-original-file: 2025-06-01/NspConfigurationGet.json */ /** * Sample code: GetNspConfiguration. @@ -1088,8 +827,7 @@ public final class NetworkSecurityPerimeterGetConfigurationSamples { */ public final class NetworkSecurityPerimeterListConfigurationsSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationsList.json + * x-ms-original-file: 2025-06-01/NspConfigurationsList.json */ /** * Sample code: ListNspConfigurations. @@ -1111,8 +849,7 @@ public final class NetworkSecurityPerimeterListConfigurationsSamples { */ public final class NetworkSecurityPerimeterReconcileConfigurationSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationReconcile.json + * x-ms-original-file: 2025-06-01/NspConfigurationReconcile.json */ /** * Sample code: ReconcileNspConfiguration. @@ -1135,8 +872,7 @@ public final class NetworkSecurityPerimeterReconcileConfigurationSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/OperationsList.json + * x-ms-original-file: 2025-06-01/OperationsList.json */ /** * Sample code: OperationsList. @@ -1154,17 +890,22 @@ public final class OperationsListSamples { ```java import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.batch.models.AutomaticOSUpgradePolicy; import com.azure.resourcemanager.batch.models.AutoScaleSettings; +import com.azure.resourcemanager.batch.models.AutomaticOSUpgradePolicy; import com.azure.resourcemanager.batch.models.BatchPoolIdentity; import com.azure.resourcemanager.batch.models.CachingType; +import com.azure.resourcemanager.batch.models.ComputeNodeFillType; +import com.azure.resourcemanager.batch.models.ComputeNodeIdentityReference; 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.DiskCustomerManagedKey; import com.azure.resourcemanager.batch.models.DiskEncryptionConfiguration; +import com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters; import com.azure.resourcemanager.batch.models.DiskEncryptionTarget; import com.azure.resourcemanager.batch.models.FixedScaleSettings; +import com.azure.resourcemanager.batch.models.IPFamily; import com.azure.resourcemanager.batch.models.ImageReference; import com.azure.resourcemanager.batch.models.InboundEndpointProtocol; import com.azure.resourcemanager.batch.models.InboundNatPool; @@ -1173,7 +914,6 @@ import com.azure.resourcemanager.batch.models.ManagedDisk; 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.NodeCommunicationMode; import com.azure.resourcemanager.batch.models.NodePlacementConfiguration; import com.azure.resourcemanager.batch.models.NodePlacementPolicyType; import com.azure.resourcemanager.batch.models.OSDisk; @@ -1182,16 +922,19 @@ import com.azure.resourcemanager.batch.models.PoolIdentityType; import com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration; import com.azure.resourcemanager.batch.models.RollingUpgradePolicy; import com.azure.resourcemanager.batch.models.ScaleSettings; +import com.azure.resourcemanager.batch.models.SecurityEncryptionTypes; import com.azure.resourcemanager.batch.models.SecurityProfile; import com.azure.resourcemanager.batch.models.SecurityTypes; import com.azure.resourcemanager.batch.models.ServiceArtifactReference; import com.azure.resourcemanager.batch.models.StorageAccountType; +import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy; import com.azure.resourcemanager.batch.models.UefiSettings; import com.azure.resourcemanager.batch.models.UpgradeMode; import com.azure.resourcemanager.batch.models.UpgradePolicy; import com.azure.resourcemanager.batch.models.UserAssignedIdentities; -import com.azure.resourcemanager.batch.models.VirtualMachineConfiguration; +import com.azure.resourcemanager.batch.models.VMDiskSecurityProfile; 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; @@ -1204,8 +947,7 @@ import java.util.Map; */ public final class PoolCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration ServiceArtifactReference. @@ -1227,7 +969,7 @@ public final class PoolCreateSamples { .withNodeAgentSkuId("batch.node.windows amd64") .withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false)) .withServiceArtifactReference(new ServiceArtifactReference().withId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile")))) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile")))) .withScaleSettings(new ScaleSettings() .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(2).withTargetLowPriorityNodes(0))) .withUpgradePolicy(new UpgradePolicy().withMode(UpgradeMode.AUTOMATIC) @@ -1236,8 +978,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_SecurityProfile.json + * x-ms-original-file: 2025-06-01/PoolCreate_SecurityProfile.json */ /** * Sample code: CreatePool - SecurityProfile. @@ -1265,8 +1006,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_Tags.json + * x-ms-original-file: 2025-06-01/PoolCreate_Tags.json */ /** * Sample code: CreatePool - Tags. @@ -1277,7 +1017,6 @@ public final class PoolCreateSamples { manager.pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") - .withTags(mapOf("TagName1", "TagValue1", "TagName2", "TagValue2")) .withVmSize("Standard_d4s_v3") .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration( new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical") @@ -1290,8 +1029,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration OSDisk. @@ -1320,8 +1058,39 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_MinimalVirtualMachineConfiguration.json + * x-ms-original-file: 2025-06-01/PoolCreate_DiskEncryptionSet_ForUserSubscriptionAccounts.json + */ + /** + * Sample code: CreatePool - disk encryption set for user subscription accounts. + * + * @param manager Entry point to BatchManager. + */ + public static void + createPoolDiskEncryptionSetForUserSubscriptionAccounts(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("Standard_D4ds_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2022-Datacenter") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64") + .withOsDisk(new OSDisk().withManagedDisk(new ManagedDisk() + .withStorageAccountType(StorageAccountType.STANDARD_LRS) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId")))) + .withSecurityProfile(new SecurityProfile().withEncryptionAtHost(false)))) + .withScaleSettings(new ScaleSettings().withFixedScale( + new FixedScaleSettings().withResizeTimeout(Duration.parse("PT15M")).withTargetDedicatedNodes(1))) + .withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK)) + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_MinimalVirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Minimal VirtualMachineConfiguration. @@ -1346,8 +1115,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration Extensions. @@ -1379,14 +1147,46 @@ public final class PoolCreateSamples { .withScaleSettings( new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=1") .withEvaluationInterval(Duration.parse("PT5M")))) - .withTargetNodeCommunicationMode(NodeCommunicationMode.DEFAULT) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UserAssignedIdentities - * .json + * x-ms-original-file: 2025-06-01/PoolCreate_CustomerManagedKey_ForBatchManagedAccounts.json + */ + /** + * Sample code: CreatePool - customer managed key for Batch managed accounts. + * + * @param manager Entry point to BatchManager. + */ + public static void + createPoolCustomerManagedKeyForBatchManagedAccounts(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/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedIdentities()))) + .withVmSize("Standard_D4ds_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2022-Datacenter") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64") + .withDiskEncryptionConfiguration(new DiskEncryptionConfiguration() + .withTargets(Arrays.asList(DiskEncryptionTarget.OS_DISK)) + .withCustomerManagedKey(new DiskCustomerManagedKey().withKeyUrl("fakeTokenPlaceholder") + .withIdentityReference(new ComputeNodeIdentityReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")))))) + .withScaleSettings(new ScaleSettings().withFixedScale( + new FixedScaleSettings().withResizeTimeout(Duration.parse("PT15M")).withTargetDedicatedNodes(1))) + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_UserAssignedIdentities.json */ /** * Sample code: CreatePool - UserAssignedIdentities. @@ -1399,9 +1199,9 @@ public final class PoolCreateSamples { .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", + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedIdentities(), - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", new UserAssignedIdentities()))) .withVmSize("STANDARD_D4") .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration( @@ -1416,8 +1216,35 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UpgradePolicy.json + * x-ms-original-file: 2025-06-01/PoolCreate_AcceleratedNetworking.json + */ + /** + * Sample code: CreatePool - accelerated networking. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D1_V2") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2016-datacenter-smalldisk") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64"))) + .withScaleSettings(new ScaleSettings() + .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) + .withNetworkConfiguration(new NetworkConfiguration().withSubnetId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123") + .withEnableAcceleratedNetworking(true)) + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_UpgradePolicy.json */ /** * Sample code: CreatePool - UpgradePolicy. @@ -1457,38 +1284,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_AcceleratedNetworking. - * json - */ - /** - * Sample code: CreatePool - accelerated networking. - * - * @param manager Entry point to BatchManager. - */ - public static void createPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools() - .define("testpool") - .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") - .withVmSize("STANDARD_D1_V2") - .withDeploymentConfiguration( - new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() - .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") - .withOffer("WindowsServer") - .withSku("2016-datacenter-smalldisk") - .withVersion("latest")) - .withNodeAgentSkuId("batch.node.windows amd64"))) - .withScaleSettings(new ScaleSettings() - .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) - .withNetworkConfiguration(new NetworkConfiguration().withSubnetId( - "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123") - .withEnableAcceleratedNetworking(true)) - .create(); - } - - /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Full VirtualMachineConfiguration. @@ -1508,15 +1304,14 @@ public final class PoolCreateSamples { .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), + .withDataDisks(Arrays.asList(new DataDisk().withLun(0) + .withCaching(CachingType.READ_WRITE) + .withDiskSizeGB(30) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_SSD_LRS)), new DataDisk().withLun(1) .withCaching(CachingType.NONE) .withDiskSizeGB(200) - .withStorageAccountType(StorageAccountType.STANDARD_LRS))) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.PREMIUM_LRS)))) .withLicenseType("Windows_Server") .withDiskEncryptionConfiguration(new DiskEncryptionConfiguration() .withTargets(Arrays.asList(DiskEncryptionTarget.OS_DISK, DiskEncryptionTarget.TEMPORARY_DISK))) @@ -1547,81 +1342,130 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_SharedImageGallery. - * json + * x-ms-original-file: 2025-06-01/PoolCreate_ConfidentialDiskEncryptionSet_ForUserSubscriptionAccounts.json */ /** - * Sample code: CreatePool - Custom Image. + * Sample code: CreatePool - confidential disk encryption set for user subscription accounts. * * @param manager Entry point to BatchManager. */ - public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchManager manager) { + public static void createPoolConfidentialDiskEncryptionSetForUserSubscriptionAccounts( + 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"))) + .withVmSize("Standard_DC2as_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2019-datacenter-core-g2") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64") + .withDataDisks(Arrays.asList(new DataDisk().withLun(0) + .withDiskSizeGB(1024) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_LRS) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"))))) + .withOsDisk(new OSDisk().withManagedDisk(new ManagedDisk() + .withStorageAccountType(StorageAccountType.STANDARD_LRS) + .withSecurityProfile(new VMDiskSecurityProfile() + .withSecurityEncryptionType(SecurityEncryptionTypes.DISK_WITH_VMGUEST_STATE) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"))) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId")))) + .withSecurityProfile(new SecurityProfile().withSecurityType(SecurityTypes.CONFIDENTIAL_VM) + .withEncryptionAtHost(false) + .withUefiSettings(new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true))))) + .withScaleSettings(new ScaleSettings().withFixedScale( + new FixedScaleSettings().withResizeTimeout(Duration.parse("PT15M")).withTargetDedicatedNodes(1))) + .withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK)) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_NoPublicIPAddresses. - * json + * x-ms-original-file: 2025-06-01/PoolCreate_SharedImageGallery.json */ /** - * Sample code: CreatePool - No public IP. + * Sample code: CreatePool - Custom Image. * * @param manager Entry point to BatchManager. */ - public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager manager) { + 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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_DualStackNetworking.json + */ + /** + * Sample code: CreatePool - dual stack networking. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolDualStackNetworking(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools() + .define("dualstackpool") + .withExistingBatchAccount("default-azurebatch", "exampleacc") + .withVmSize("Standard_D4ds_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference( + new ImageReference().withPublisher("Canonical").withOffer("ubuntu-24_04-lts").withSku("server")) + .withNodeAgentSkuId("batch.node.ubuntu 24.04"))) + .withScaleSettings(new ScaleSettings() + .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) + .withNetworkConfiguration(new NetworkConfiguration() + .withEndpointConfiguration(new PoolEndpointConfiguration() + .withInboundNatPools(Arrays.asList(new InboundNatPool().withName("sshpool") + .withProtocol(InboundEndpointProtocol.TCP) + .withBackendPort(22) + .withFrontendPortRangeStart(40000) + .withFrontendPortRangeEnd(40500) + .withNetworkSecurityGroupRules(Arrays.asList(new NetworkSecurityGroupRule().withPriority(1000) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("*") + .withSourcePortRanges(Arrays.asList("*"))))))) .withPublicIpAddressConfiguration( - new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES))) + new PublicIpAddressConfiguration().withIpFamilies(Arrays.asList(IPFamily.IPV4, IPFamily.IPV6)))) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_ResourceTags.json + * x-ms-original-file: 2025-06-01/PoolCreate_NoPublicIPAddresses.json */ /** - * Sample code: CreatePool - ResourceTags. + * Sample code: CreatePool - No public IP. * * @param manager Entry point to BatchManager. */ - public static void createPoolResourceTags(com.azure.resourcemanager.batch.BatchManager manager) { + public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager manager) { manager.pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") - .withVmSize("Standard_d4s_v3") + .withVmSize("STANDARD_D4") .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration( - new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical") - .withOffer("UbuntuServer") - .withSku("18_04-lts-gen2") - .withVersion("latest")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))) - .withScaleSettings(new ScaleSettings() - .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) - .withResourceTags(mapOf("TagName1", "TagValue1", "TagName2", "TagValue2")) + new VirtualMachineConfiguration().withImageReference(new ImageReference().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/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/12345678-1234-1234-1234-123456789012/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/2024-07-01/examples/PoolCreate_PublicIPs.json + * x-ms-original-file: 2025-06-01/PoolCreate_PublicIPs.json */ /** * Sample code: CreatePool - Public IPs. @@ -1635,14 +1479,14 @@ public final class PoolCreateSamples { .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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + "/subscriptions/12345678-1234-1234-1234-123456789012/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/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135")))) .create(); } @@ -1668,8 +1512,7 @@ public final class PoolCreateSamples { */ public final class PoolDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDelete.json + * x-ms-original-file: 2025-06-01/PoolDelete.json */ /** * Sample code: DeletePool. @@ -1691,8 +1534,7 @@ public final class PoolDeleteSamples { */ public final class PoolDisableAutoScaleSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDisableAutoScale.json + * x-ms-original-file: 2025-06-01/PoolDisableAutoScale.json */ /** * Sample code: Disable AutoScale. @@ -1715,8 +1557,7 @@ public final class PoolDisableAutoScaleSamples { */ public final class PoolGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_SecurityProfile.json + * x-ms-original-file: 2025-06-01/PoolGet_SecurityProfile.json */ /** * Sample code: GetPool - SecurityProfile. @@ -1730,8 +1571,7 @@ public final class PoolGetSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolGet_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: 2025-06-01/PoolGet_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: GetPool - VirtualMachineConfiguration Extensions. @@ -1746,8 +1586,7 @@ public final class PoolGetSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolGet_VirtualMachineConfiguration_MangedOSDisk.json + * x-ms-original-file: 2025-06-01/PoolGet_VirtualMachineConfiguration_MangedOSDisk.json */ /** * Sample code: GetPool - VirtualMachineConfiguration OSDisk. @@ -1761,8 +1600,7 @@ public final class PoolGetSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_UpgradePolicy.json + * x-ms-original-file: 2025-06-01/PoolGet_UpgradePolicy.json */ /** * Sample code: GetPool - UpgradePolicy. @@ -1776,8 +1614,7 @@ public final class PoolGetSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json + * x-ms-original-file: 2025-06-01/PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json */ /** * Sample code: GetPool - VirtualMachineConfiguration ServiceArtifactReference. @@ -1792,9 +1629,7 @@ public final class PoolGetSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_AcceleratedNetworking. - * json + * x-ms-original-file: 2025-06-01/PoolGet_AcceleratedNetworking.json */ /** * Sample code: GetPool - AcceleratedNetworking. @@ -1808,7 +1643,7 @@ public final class PoolGetSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet.json + * x-ms-original-file: 2025-06-01/PoolGet.json */ /** * Sample code: GetPool. @@ -1831,7 +1666,7 @@ public final class PoolGetSamples { */ public final class PoolListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolList.json + * x-ms-original-file: 2025-06-01/PoolList.json */ /** * Sample code: ListPool. @@ -1845,8 +1680,7 @@ public final class PoolListByBatchAccountSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolListWithFilter.json + * x-ms-original-file: 2025-06-01/PoolListWithFilter.json */ /** * Sample code: ListPoolWithFilter. @@ -1871,8 +1705,7 @@ public final class PoolListByBatchAccountSamples { */ public final class PoolStopResizeSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolStopResize.json + * x-ms-original-file: 2025-06-01/PoolStopResize.json */ /** * Sample code: StopPoolResize. @@ -1892,12 +1725,9 @@ public final class PoolStopResizeSamples { ```java 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.NodeCommunicationMode; import com.azure.resourcemanager.batch.models.Pool; import com.azure.resourcemanager.batch.models.ScaleSettings; import com.azure.resourcemanager.batch.models.StartTask; @@ -1909,8 +1739,7 @@ import java.util.Arrays; */ public final class PoolUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_EnableAutoScale.json + * x-ms-original-file: 2025-06-01/PoolUpdate_EnableAutoScale.json */ /** * Sample code: UpdatePool - Enable Autoscale. @@ -1928,8 +1757,7 @@ public final class PoolUpdateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_RemoveStartTask.json + * x-ms-original-file: 2025-06-01/PoolUpdate_RemoveStartTask.json */ /** * Sample code: UpdatePool - Remove Start Task. @@ -1944,8 +1772,7 @@ public final class PoolUpdateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_ResizePool.json + * x-ms-original-file: 2025-06-01/PoolUpdate_ResizePool.json */ /** * Sample code: UpdatePool - Resize Pool. @@ -1966,8 +1793,7 @@ public final class PoolUpdateSamples { } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_OtherProperties.json + * x-ms-original-file: 2025-06-01/PoolUpdate_OtherProperties.json */ /** * Sample code: UpdatePool - Other Properties. @@ -1980,16 +1806,11 @@ public final class PoolUpdateSamples { .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"), + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_5678") .withVersion("1.0"))) - .withTargetNodeCommunicationMode(NodeCommunicationMode.SIMPLIFIED) .apply(); } } @@ -2003,9 +1824,7 @@ public final class PoolUpdateSamples { */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionDelete. - * json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionDelete.json */ /** * Sample code: PrivateEndpointConnectionDelete. @@ -2029,8 +1848,7 @@ public final class PrivateEndpointConnectionDeleteSamples { */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionGet.json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionGet.json */ /** * Sample code: GetPrivateEndpointConnection. @@ -2054,9 +1872,7 @@ public final class PrivateEndpointConnectionGetSamples { */ public final class PrivateEndpointConnectionListByBatchAccountSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionsList. - * json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionsList.json */ /** * Sample code: ListPrivateEndpointConnections. @@ -2082,9 +1898,7 @@ import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus */ public final class PrivateEndpointConnectionUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionUpdate. - * json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionUpdate.json */ /** * Sample code: UpdatePrivateEndpointConnection. @@ -2111,8 +1925,7 @@ public final class PrivateEndpointConnectionUpdateSamples { */ public final class PrivateLinkResourceGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateLinkResourceGet.json + * x-ms-original-file: 2025-06-01/PrivateLinkResourceGet.json */ /** * Sample code: GetPrivateLinkResource. @@ -2135,8 +1948,7 @@ public final class PrivateLinkResourceGetSamples { */ public final class PrivateLinkResourceListByBatchAccountSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: 2025-06-01/PrivateLinkResourcesList.json */ /** * Sample code: ListPrivateLinkResource. diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index 01a036443853..ff30bc87c214 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -1,7 +1,7 @@ 4.0.0 @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-batch - 2.1.0-beta.1 + 2.1.0 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. Batch Client. Package tag package-2024-07. + 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. The Batch Management Client. Package api-version 2025-06-01. https://github.com/Azure/azure-sdk-for-java @@ -47,11 +47,6 @@ 0 - - com.azure - azure-json - 1.5.1 - com.azure azure-core @@ -74,6 +69,11 @@ 1.18.2 test + + com.azure + azure-json + 1.5.1 + com.azure.resourcemanager azure-resourcemanager-storage 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 83f8d05ad5ad..5869cbdb3d11 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch; @@ -11,24 +11,24 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; 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.BatchManagementClientBuilder; -import com.azure.resourcemanager.batch.implementation.CertificatesImpl; import com.azure.resourcemanager.batch.implementation.LocationsImpl; import com.azure.resourcemanager.batch.implementation.NetworkSecurityPerimetersImpl; import com.azure.resourcemanager.batch.implementation.OperationsImpl; @@ -38,7 +38,6 @@ import com.azure.resourcemanager.batch.models.ApplicationPackages; import com.azure.resourcemanager.batch.models.Applications; import com.azure.resourcemanager.batch.models.BatchAccounts; -import com.azure.resourcemanager.batch.models.Certificates; import com.azure.resourcemanager.batch.models.Locations; import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeters; import com.azure.resourcemanager.batch.models.Operations; @@ -49,26 +48,23 @@ import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * Entry point to BatchManager. - * Batch Client. + * The Batch Management Client. */ public final class BatchManager { + private Operations operations; + private BatchAccounts batchAccounts; private ApplicationPackages applicationPackages; private Applications applications; - private Locations locations; - - private Operations operations; - - private Certificates certificates; - private PrivateLinkResources privateLinkResources; private PrivateEndpointConnections privateEndpointConnections; @@ -77,6 +73,8 @@ public final class BatchManager { private NetworkSecurityPerimeters networkSecurityPerimeters; + private Locations locations; + private final BatchManagementClient clientObject; private BatchManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -129,6 +127,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-batch.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -236,12 +237,14 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.batch") .append("/") - .append("2.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -274,7 +277,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -287,6 +290,18 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil } } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets the resource collection API of BatchAccounts. It manages BatchAccount. * @@ -323,42 +338,6 @@ public Applications applications() { return applications; } - /** - * Gets the resource collection API of Locations. - * - * @return Resource collection API of Locations. - */ - public Locations locations() { - if (this.locations == null) { - this.locations = new LocationsImpl(clientObject.getLocations(), this); - } - return locations; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Certificates. It manages Certificate. - * - * @return Resource collection API of Certificates. - */ - public Certificates certificates() { - if (this.certificates == null) { - this.certificates = new CertificatesImpl(clientObject.getCertificates(), this); - } - return certificates; - } - /** * Gets the resource collection API of PrivateLinkResources. * @@ -409,6 +388,18 @@ public NetworkSecurityPerimeters networkSecurityPerimeters() { return networkSecurityPerimeters; } + /** + * Gets the resource collection API of Locations. + * + * @return Resource collection API of Locations. + */ + public Locations locations() { + if (this.locations == null) { + this.locations = new LocationsImpl(clientObject.getLocations(), this); + } + return locations; + } + /** * Gets wrapped service client BatchManagementClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. 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 224a14a0cf93..cfba9b995060 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -17,50 +17,54 @@ */ public interface ApplicationPackagesClient { /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application along with - * {@link Response}. + * @return information about the specified application package along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response activateWithResponse(String resourceGroupName, String accountName, - String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context); + Response getWithResponse(String resourceGroupName, String accountName, + String applicationName, String versionName, Context context); /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return information about the specified application package. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationPackageInner activate(String resourceGroupName, String accountName, String applicationName, - String versionName, ActivateApplicationPackageParameters parameters); + ApplicationPackageInner get(String resourceGroupName, String accountName, String applicationName, + String versionName); /** * Creates an application package record. The record contains a storageUrl where the package should be uploaded to. * Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can * be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @param parameters The parameters for the request. @@ -80,8 +84,11 @@ Response createWithResponse(String resourceGroupName, S * Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can * be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -96,8 +103,11 @@ ApplicationPackageInner create(String resourceGroupName, String accountName, Str /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @param context The context to associate with this operation. @@ -113,8 +123,11 @@ Response deleteWithResponse(String resourceGroupName, String accountName, /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -125,66 +138,83 @@ Response deleteWithResponse(String resourceGroupName, String accountName, void delete(String resourceGroupName, String accountName, String applicationName, String versionName); /** - * Gets information about the specified application package. + * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @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 specified application package along with {@link Response}. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, - String applicationName, String versionName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName, String applicationName); /** - * Gets information about the specified application package. + * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. + * @param maxresults The maximum number of items to return in the response. + * @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 specified application package. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationPackageInner get(String resourceGroupName, String accountName, String applicationName, - String versionName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String accountName, String applicationName, + Integer maxresults, Context context); /** - * Lists all of the application packages in the specified application. + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. + * @param parameters The parameters for the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedIterable}. + * @return an application package which represents a particular version of an application along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String applicationName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response activateWithResponse(String resourceGroupName, String accountName, + String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context); /** - * Lists all of the application packages in the specified application. + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param maxresults The maximum number of items to return in the response. - * @param context The context to associate with this operation. + * @param versionName The version of the application. + * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedIterable}. + * @return an application package which represents a particular version of an application. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String accountName, String applicationName, - Integer maxresults, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + ApplicationPackageInner activate(String resourceGroupName, String accountName, String applicationName, + String versionName, ActivateApplicationPackageParameters parameters); } 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 2f25fdc16566..31d48f2f26ee 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -16,133 +16,160 @@ */ public interface ApplicationsClient { /** - * Adds an application to the specified Batch account. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account along with {@link Response}. + * @return information about the specified application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceGroupName, String accountName, String applicationName, - ApplicationInner parameters, Context context); + Response getWithResponse(String resourceGroupName, String accountName, String applicationName, + Context context); /** - * Adds an application to the specified Batch account. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 contains information about an application in a Batch account. + * @return information about the specified application. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner create(String resourceGroupName, String accountName, String applicationName); + ApplicationInner get(String resourceGroupName, String accountName, String applicationName); /** - * Deletes an application. + * Adds an application to the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, - Context context); + Response createWithResponse(String resourceGroupName, String accountName, String applicationName, + ApplicationInner parameters, Context context); /** - * Deletes an application. + * Adds an application to the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 contains information about an application in a Batch account. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String applicationName); + ApplicationInner create(String resourceGroupName, String accountName, String applicationName); /** - * Gets information about the specified application. + * Updates settings for the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified application along with {@link Response}. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, String applicationName, - Context context); + Response updateWithResponse(String resourceGroupName, String accountName, String applicationName, + ApplicationInner parameters, Context context); /** - * Gets information about the specified application. + * Updates settings for the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified application. + * @return contains information about an application in a Batch account. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner get(String resourceGroupName, String accountName, String applicationName); + ApplicationInner update(String resourceGroupName, String accountName, String applicationName, + ApplicationInner parameters); /** - * Updates settings for the specified application. + * Deletes an application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String accountName, String applicationName, - ApplicationInner parameters, Context context); + Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, + Context context); /** - * Updates settings for the specified application. + * Deletes an application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account. */ @ServiceMethod(returns = ReturnType.SINGLE) - ApplicationInner update(String resourceGroupName, String accountName, String applicationName, - ApplicationInner parameters); + void delete(String resourceGroupName, String accountName, String applicationName); /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -154,8 +181,11 @@ ApplicationInner update(String resourceGroupName, String accountName, String app /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. 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 a97a0eb610be..0ac46edc37f7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -23,11 +23,45 @@ * An instance of this class provides access to all the operations defined in BatchAccountsClient. */ public interface BatchAccountsClient { + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @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 specified Batch account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context); + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BatchAccountInner getByResourceGroup(String resourceGroupName, String accountName); + /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -46,7 +80,7 @@ SyncPoller, BatchAccountInner> beginCreate(String * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -66,7 +100,7 @@ SyncPoller, BatchAccountInner> beginCreate(String * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -84,7 +118,7 @@ SyncPoller, BatchAccountInner> beginCreate(String * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -103,8 +137,11 @@ BatchAccountInner create(String resourceGroupName, String accountName, BatchAcco /** * Updates the properties of an existing Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -119,8 +156,11 @@ Response updateWithResponse(String resourceGroupName, String /** * Updates the properties of an existing Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -133,8 +173,11 @@ Response updateWithResponse(String resourceGroupName, String /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -146,8 +189,11 @@ Response updateWithResponse(String resourceGroupName, String /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -160,8 +206,11 @@ Response updateWithResponse(String resourceGroupName, String /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -172,8 +221,11 @@ Response updateWithResponse(String resourceGroupName, String /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -183,32 +235,31 @@ Response updateWithResponse(String resourceGroupName, String void delete(String resourceGroupName, String accountName, Context context); /** - * Gets information about the specified Batch account. + * Gets information about the Batch accounts associated with the specified resource group. * - * @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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 along with {@link Response}. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); /** - * Gets information about the specified Batch account. + * Gets information about the Batch accounts associated with the specified resource group. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 specified Batch account. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchAccountInner getByResourceGroup(String resourceGroupName, String accountName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** * Gets information about the Batch accounts associated with the subscription. @@ -234,39 +285,15 @@ Response getByResourceGroupWithResponse(String resourceGroupN @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(Context context); - /** - * Gets information about the Batch accounts associated with the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains 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 Batch accounts associated with the specified resource group as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Gets information about the Batch accounts associated with the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains 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 Batch accounts associated with the specified resource group as paginated response - * with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - /** * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -281,8 +308,11 @@ Response synchronizeAutoStorageKeysWithResponse(String resourceGroupName, * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -298,8 +328,11 @@ Response synchronizeAutoStorageKeysWithResponse(String resourceGroupName, * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -319,8 +352,11 @@ Response regenerateKeyWithResponse(String resourceGroupNa * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -338,13 +374,19 @@ BatchAccountKeysInner regenerateKey(String resourceGroupName, String accountName * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 a set of Azure Batch account keys along with {@link Response}. + * @return the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey' along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) Response getKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -356,50 +398,72 @@ BatchAccountKeysInner regenerateKey(String resourceGroupName, String accountName * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. */ @ServiceMethod(returns = ReturnType.SINGLE) BatchAccountKeysInner getKeys(String resourceGroupName, String accountName); /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String accountName); + PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String accountName); /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String accountName, Context context); + PagedIterable listOutboundNetworkDependenciesEndpoints(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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param detectorId The name of the detector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -414,8 +478,11 @@ Response getDetectorWithResponse(String resourceGroupName /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -426,39 +493,37 @@ Response getDetectorWithResponse(String resourceGroupName DetectorResponseInner getDetector(String resourceGroupName, String accountName, String detectorId); /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + * @return information about the detectors available for a given Batch account as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String accountName); + PagedIterable listDetectors(String resourceGroupName, String accountName); /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the detectors available for a given Batch account as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String accountName, Context context); + PagedIterable listDetectors(String resourceGroupName, String accountName, Context context); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java index 5b557ea19317..b0b74804b442 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -12,26 +12,26 @@ */ public interface BatchManagementClient { /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -46,6 +46,13 @@ public interface BatchManagementClient { */ Duration getDefaultPollInterval(); + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the BatchAccountsClient object to access its operations. * @@ -67,27 +74,6 @@ public interface BatchManagementClient { */ ApplicationsClient getApplications(); - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - LocationsClient getLocations(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the CertificatesClient object to access its operations. - * - * @return the CertificatesClient object. - */ - CertificatesClient getCertificates(); - /** * Gets the PrivateLinkResourcesClient object to access its operations. * @@ -115,4 +101,11 @@ public interface BatchManagementClient { * @return the NetworkSecurityPerimetersClient object. */ NetworkSecurityPerimetersClient getNetworkSecurityPerimeters(); + + /** + * Gets the LocationsClient object to access its operations. + * + * @return the LocationsClient object. + */ + LocationsClient getLocations(); } 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 deleted file mode 100644 index 2767f20bde7b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/CertificatesClient.java +++ /dev/null @@ -1,312 +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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; -import com.azure.resourcemanager.batch.models.CertificateCreateOrUpdateParameters; -import com.azure.resourcemanager.batch.models.CertificatesCancelDeletionResponse; -import com.azure.resourcemanager.batch.models.CertificatesCreateResponse; -import com.azure.resourcemanager.batch.models.CertificatesGetResponse; -import com.azure.resourcemanager.batch.models.CertificatesUpdateResponse; - -/** - * An instance of this class provides access to all the operations defined in CertificatesClient. - */ -public interface CertificatesClient { - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", - * "properties/provisioningStateTransitionTime", "name". - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, - String select, String filter, Context context); - - /** - * Creates a new certificate inside the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply - * the operation only if the certificate already exists. If omitted, this operation will always be applied. - * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing - * certificate. Other values will be ignored. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificatesCreateResponse createWithResponse(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch, Context context); - - /** - * Creates a new certificate inside the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner create(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters); - - /** - * Updates the properties of an existing certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Certificate entity to update. - * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to - * "*" to apply the operation unconditionally. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificatesUpdateResponse updateWithResponse(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters, String ifMatch, Context context); - - /** - * Updates the properties of an existing certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Certificate entity to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String certificateName); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String certificateName, - Context context); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String certificateName); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String accountName, String certificateName, Context context); - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificatesGetResponse getWithResponse(String resourceGroupName, String accountName, String certificateName, - Context context); - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner get(String resourceGroupName, String accountName, String certificateName); - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificatesCancelDeletionResponse cancelDeletionWithResponse(String resourceGroupName, String accountName, - String certificateName, Context context); - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner cancelDeletion(String resourceGroupName, String accountName, String certificateName); -} 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 06015ce1f486..ada144fe76ad 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/NetworkSecurityPerimetersClient.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/NetworkSecurityPerimetersClient.java index 9363de438829..dbefd6048314 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/NetworkSecurityPerimetersClient.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/NetworkSecurityPerimetersClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -18,73 +18,88 @@ */ public interface NetworkSecurityPerimetersClient { /** - * Lists all of the NSP configurations in the specified account. + * Gets information about the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. + * @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 result of a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedIterable}. + * @return information about the specified NSP configuration along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listConfigurations(String resourceGroupName, - String accountName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getConfigurationWithResponse(String resourceGroupName, + String accountName, String networkSecurityPerimeterConfigurationName, Context context); /** - * Lists all of the NSP configurations in the specified account. + * Gets information about the specified NSP configuration. * - * @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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedIterable}. + * @return information about the specified NSP configuration. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listConfigurations(String resourceGroupName, - String accountName, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkSecurityPerimeterConfigurationInner getConfiguration(String resourceGroupName, String accountName, + String networkSecurityPerimeterConfigurationName); /** - * Gets information about the specified NSP configuration. + * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 NSP configuration along with {@link Response}. + * @return result of a list NSP (network security perimeter) configurations request as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getConfigurationWithResponse(String resourceGroupName, - String accountName, String networkSecurityPerimeterConfigurationName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurations(String resourceGroupName, + String accountName); /** - * Gets information about the specified NSP configuration. + * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @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 specified NSP configuration. + * @return result of a list NSP (network security perimeter) configurations request as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - NetworkSecurityPerimeterConfigurationInner getConfiguration(String resourceGroupName, String accountName, - String networkSecurityPerimeterConfigurationName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurations(String resourceGroupName, + String accountName, Context context); /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -97,9 +112,12 @@ SyncPoller, Void> beginReconcileConfiguration(String resourceGr /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @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. @@ -113,9 +131,12 @@ SyncPoller, Void> beginReconcileConfiguration(String resourceGr /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -127,9 +148,12 @@ void reconcileConfiguration(String resourceGroupName, String accountName, /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @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. 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 32c7ca5593ac..4e8d6b8cbdc2 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; 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 786002bf505a..81af75b11965 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -22,54 +22,48 @@ */ public interface PoolsClient { /** - * Lists all of the pools in the specified account. + * Gets information about the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param poolName The pool name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); + @ServiceMethod(returns = ReturnType.SINGLE) + PoolsGetResponse getWithResponse(String resourceGroupName, String accountName, String poolName, Context context); /** - * Lists all of the pools in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are: + * Gets information about the specified pool. * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param poolName The pool name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified pool. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, - String select, String filter, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PoolInner get(String resourceGroupName, String accountName, String poolName); /** * Creates a new pool inside the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Additional parameters for pool creation. * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the @@ -89,8 +83,11 @@ PoolsCreateResponse createWithResponse(String resourceGroupName, String accountN /** * Creates a new pool inside the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Additional parameters for pool creation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -104,8 +101,11 @@ PoolsCreateResponse createWithResponse(String resourceGroupName, String accountN /** * Updates the properties of an existing pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any * property not supplied will be unchanged. @@ -124,8 +124,11 @@ PoolsUpdateResponse updateWithResponse(String resourceGroupName, String accountN /** * Updates the properties of an existing pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any * property not supplied will be unchanged. @@ -140,8 +143,11 @@ PoolsUpdateResponse updateWithResponse(String resourceGroupName, String accountN /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -154,8 +160,11 @@ PoolsUpdateResponse updateWithResponse(String resourceGroupName, String accountN /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -170,8 +179,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -183,8 +195,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -195,39 +210,63 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String void delete(String resourceGroupName, String accountName, String poolName, Context context); /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PoolsGetResponse getWithResponse(String resourceGroupName, String accountName, String poolName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBatchAccount(String resourceGroupName, String accountName); /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". + * Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + * + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale. + * @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 specified pool. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PoolInner get(String resourceGroupName, String accountName, String poolName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, + String select, String filter, Context context); /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -242,8 +281,11 @@ PoolsDisableAutoScaleResponse disableAutoScaleWithResponse(String resourceGroupN /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -262,8 +304,11 @@ PoolsDisableAutoScaleResponse disableAutoScaleWithResponse(String resourceGroupN * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,8 +329,11 @@ PoolsStopResizeResponse stopResizeWithResponse(String resourceGroupName, String * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. 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 ce0b47a0adbe..98ee43ef0bbd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -17,40 +17,14 @@ * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public interface PrivateEndpointConnectionsClient { - /** - * Lists all of the private endpoint connections in the specified 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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); - - /** - * Lists all of the private endpoint connections in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, Context context); - /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param context The context to associate with this operation. @@ -66,8 +40,11 @@ Response getWithResponse(String resourceGroupNam /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -82,8 +59,11 @@ PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -101,8 +81,11 @@ SyncPoller, PrivateEndpointConnection /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -123,8 +106,11 @@ SyncPoller, PrivateEndpointConnection /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -141,8 +127,11 @@ PrivateEndpointConnectionInner update(String resourceGroupName, String accountNa /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -163,8 +152,11 @@ PrivateEndpointConnectionInner update(String resourceGroupName, String accountNa /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,8 +171,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param context The context to associate with this operation. @@ -196,8 +191,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -210,8 +208,11 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param context The context to associate with this operation. @@ -221,4 +222,39 @@ SyncPoller, Void> beginDelete(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context); + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBatchAccount(String resourceGroupName, String accountName); + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @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 values returned by the List operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBatchAccount(String resourceGroupName, String accountName, + Integer maxresults, Context context); } 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 0a1b9d5a4af2..6f5fd57212ca 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent; @@ -16,61 +16,73 @@ */ public interface PrivateLinkResourcesClient { /** - * Lists all of the private link resources in the specified account. + * Gets information about the specified private link resource. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified private link resource along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String accountName, + String privateLinkResourceName, Context context); /** - * Lists all of the private link resources in the specified account. + * Gets information about the specified private link resource. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified private link resource. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceInner get(String resourceGroupName, String accountName, String privateLinkResourceName); /** - * Gets information about the specified private link resource. + * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the account. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 along with {@link Response}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String accountName, - String privateLinkResourceName, Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBatchAccount(String resourceGroupName, String accountName); /** - * Gets information about the specified private link resource. + * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @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 specified private link resource. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceInner get(String resourceGroupName, String accountName, String privateLinkResourceName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBatchAccount(String resourceGroupName, String accountName, + Integer maxresults, Context context); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java index 3cb97f8821b9..5e994f5861e6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java @@ -1,14 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.models.AzureProxyResource; import java.io.IOException; import java.util.Map; @@ -16,7 +17,7 @@ * Contains information about an application in a Batch account. */ @Fluent -public final class ApplicationInner extends AzureProxyResource { +public final class ApplicationInner extends ProxyResource { /* * The properties associated with the Application. */ @@ -27,6 +28,16 @@ public final class ApplicationInner extends AzureProxyResource { */ private String etag; + /* + * The tags of the resource. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -62,11 +73,39 @@ private ApplicationProperties innerProperties() { * * @return the etag value. */ - @Override public String etag() { return this.etag; } + /** + * Get the tags property: The tags of the resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags of the resource. + * + * @param tags the tags value to set. + * @return the ApplicationInner object itself. + */ + public ApplicationInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -97,15 +136,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ApplicationInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the displayName property: The display name for the application. * @@ -184,7 +214,6 @@ public ApplicationInner withDefaultVersion(String defaultVersion) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (innerProperties() != null) { innerProperties().validate(); @@ -197,8 +226,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -224,13 +253,15 @@ public static ApplicationInner fromJson(JsonReader jsonReader) throws IOExceptio deserializedApplicationInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedApplicationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedApplicationInner.innerProperties = ApplicationProperties.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedApplicationInner.etag = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedApplicationInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedApplicationInner.innerProperties = ApplicationProperties.fromJson(reader); + deserializedApplicationInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedApplicationInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java index dfdc8377317e..872337aca80d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java @@ -1,14 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.models.AzureProxyResource; import com.azure.resourcemanager.batch.models.PackageState; import java.io.IOException; import java.time.OffsetDateTime; @@ -18,7 +19,7 @@ * An application package which represents a particular version of an application. */ @Fluent -public final class ApplicationPackageInner extends AzureProxyResource { +public final class ApplicationPackageInner extends ProxyResource { /* * The properties associated with the Application Package. */ @@ -29,6 +30,16 @@ public final class ApplicationPackageInner extends AzureProxyResource { */ private String etag; + /* + * The tags of the resource. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -64,11 +75,39 @@ private ApplicationPackageProperties innerProperties() { * * @return the etag value. */ - @Override public String etag() { return this.etag; } + /** + * Get the tags property: The tags of the resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags of the resource. + * + * @param tags the tags value to set. + * @return the ApplicationPackageInner object itself. + */ + public ApplicationPackageInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -99,15 +138,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ApplicationPackageInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the state property: The current state of the application package. * @@ -158,7 +188,6 @@ public OffsetDateTime lastActivationTime() { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (innerProperties() != null) { innerProperties().validate(); @@ -171,8 +200,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -198,13 +227,15 @@ public static ApplicationPackageInner fromJson(JsonReader jsonReader) throws IOE deserializedApplicationPackageInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedApplicationPackageInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedApplicationPackageInner.innerProperties = ApplicationPackageProperties.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedApplicationPackageInner.etag = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedApplicationPackageInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedApplicationPackageInner.innerProperties = ApplicationPackageProperties.fromJson(reader); + deserializedApplicationPackageInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedApplicationPackageInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java index 0fefc2668d73..32b5ea180e5c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java index ce92ec631384..bcfced2c182a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java index 121a3faedc21..3817aa938b30 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -30,6 +30,8 @@ public final class BatchAccountCreateProperties implements JsonSerializable tags) { - super.withTags(tags); - return this; - } - /** * Get the accountEndpoint property: The account endpoint used to interact with the Batch service. * @@ -165,7 +151,9 @@ public ProvisioningState provisioningState() { } /** - * Get the poolAllocationMode property: The allocation mode for creating pools in the Batch account. + * Get the poolAllocationMode property: The allocation mode to use for creating pools in the Batch account. + * + * The allocation mode for creating pools in the Batch account. * * @return the poolAllocationMode value. */ @@ -174,7 +162,9 @@ public PoolAllocationMode poolAllocationMode() { } /** - * Get the keyVaultReference property: Identifies the Azure key vault associated with a Batch account. + * Get the keyVaultReference property: A reference to the Azure key vault associated with the Batch account. + * + * Identifies the Azure key vault associated with a Batch account. * * @return the keyVaultReference value. */ @@ -183,7 +173,10 @@ public KeyVaultReference keyVaultReference() { } /** - * Get the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Get the publicNetworkAccess property: The network interface type for accessing Azure Batch service and Batch + * account operations. + * + * The network access type for operating on the resources in the Batch account. * * @return the publicNetworkAccess value. */ @@ -192,21 +185,10 @@ public PublicNetworkAccessType publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Get the networkProfile property: Network profile for Batch account, which contains network rule settings for each + * endpoint. * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the BatchAccountInner object itself. - */ - public BatchAccountInner withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * The network profile only takes effect when publicNetworkAccess is enabled. * * @return the networkProfile value. */ @@ -214,20 +196,6 @@ public NetworkProfile networkProfile() { return this.innerProperties() == null ? null : this.innerProperties().networkProfile(); } - /** - * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. - * - * @param networkProfile the networkProfile value to set. - * @return the BatchAccountInner object itself. - */ - public BatchAccountInner withNetworkProfile(NetworkProfile networkProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new BatchAccountProperties(); - } - this.innerProperties().withNetworkProfile(networkProfile); - return this; - } - /** * Get the privateEndpointConnections property: List of private endpoint connections associated with the Batch * account. @@ -239,9 +207,11 @@ public List privateEndpointConnections() { } /** - * Get the autoStorage property: Contains information about the auto-storage account associated with a Batch + * Get the autoStorage property: The properties and status of any auto-storage account associated with the Batch * account. * + * Contains information about the auto-storage account associated with a Batch account. + * * @return the autoStorage value. */ public AutoStorageProperties autoStorage() { @@ -249,9 +219,10 @@ public AutoStorageProperties autoStorage() { } /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Get the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @return the encryption value. */ @@ -260,8 +231,10 @@ public EncryptionProperties encryption() { } /** - * Get the dedicatedCoreQuota property: For accounts with PoolAllocationMode set to UserSubscription, quota is - * managed on the subscription so this value is not returned. + * Get the dedicatedCoreQuota property: The dedicated 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 dedicatedCoreQuota value. */ @@ -270,8 +243,10 @@ public Integer dedicatedCoreQuota() { } /** - * Get the lowPriorityCoreQuota property: For accounts with PoolAllocationMode set to UserSubscription, quota is - * managed on the subscription so this value is not returned. + * 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. */ @@ -291,10 +266,12 @@ public List dedicatedCoreQuotaPerVMFamily() { } /** - * Get the dedicatedCoreQuotaPerVMFamilyEnforced property: If this flag is true, dedicated core quota is enforced - * via both the dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota properties on the account. If this flag is - * false, dedicated core quota is enforced only via the dedicatedCoreQuota property on the account and does not - * consider Virtual Machine family. + * Get the dedicatedCoreQuotaPerVMFamilyEnforced property: A value indicating whether core quotas per Virtual + * Machine family are enforced for this account + * + * If this flag is true, dedicated core quota is enforced via both the dedicatedCoreQuotaPerVMFamily and + * dedicatedCoreQuota properties on the account. If this flag is false, dedicated core quota is enforced only via + * the dedicatedCoreQuota property on the account and does not consider Virtual Machine family. * * @return the dedicatedCoreQuotaPerVMFamilyEnforced value. */ @@ -388,6 +365,8 @@ public static BatchAccountInner fromJson(JsonReader jsonReader) throws IOExcepti deserializedBatchAccountInner.innerProperties = BatchAccountProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedBatchAccountInner.identity = BatchAccountIdentity.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedBatchAccountInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountKeysInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountKeysInner.java index 6d334fa64d1a..e04befbbe2b7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountKeysInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountKeysInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -34,7 +34,7 @@ public final class BatchAccountKeysInner implements JsonSerializable { /* * The account endpoint used to interact with the Batch service. @@ -42,21 +42,29 @@ public final class BatchAccountProperties implements JsonSerializable privateEndpointConnections; /* + * The properties and status of any auto-storage account associated with the Batch account. + * * Contains information about the auto-storage account associated with a Batch account. */ private AutoStorageProperties autoStorage; /* + * The encryption configuration for the Batch account. + * * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a * Microsoft managed key. For additional control, a customer-managed key can be used instead. */ private EncryptionProperties encryption; /* + * The dedicated 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. */ private Integer dedicatedCoreQuota; /* + * 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. */ @@ -96,6 +112,8 @@ public final class BatchAccountProperties implements JsonSerializable dedicatedCoreQuotaPerVMFamily; /* + * A value indicating whether core quotas per Virtual Machine family are enforced for this account + * * If this flag is true, dedicated core quota is enforced via both the dedicatedCoreQuotaPerVMFamily and * dedicatedCoreQuota properties on the account. If this flag is false, dedicated core quota is enforced only via * the dedicatedCoreQuota property on the account and does not consider Virtual Machine family. @@ -121,7 +139,7 @@ public final class BatchAccountProperties implements JsonSerializable privateEndpointConnections() { } /** - * Get the autoStorage property: Contains information about the auto-storage account associated with a Batch + * Get the autoStorage property: The properties and status of any auto-storage account associated with the Batch * account. * + * Contains information about the auto-storage account associated with a Batch account. + * * @return the autoStorage value. */ public AutoStorageProperties autoStorage() { @@ -231,9 +239,10 @@ public AutoStorageProperties autoStorage() { } /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Get the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @return the encryption value. */ @@ -242,8 +251,10 @@ public EncryptionProperties encryption() { } /** - * Get the dedicatedCoreQuota property: For accounts with PoolAllocationMode set to UserSubscription, quota is - * managed on the subscription so this value is not returned. + * Get the dedicatedCoreQuota property: The dedicated 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 dedicatedCoreQuota value. */ @@ -252,8 +263,10 @@ public Integer dedicatedCoreQuota() { } /** - * Get the lowPriorityCoreQuota property: For accounts with PoolAllocationMode set to UserSubscription, quota is - * managed on the subscription so this value is not returned. + * 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. */ @@ -273,10 +286,12 @@ public List dedicatedCoreQuotaPerVMFamily() { } /** - * Get the dedicatedCoreQuotaPerVMFamilyEnforced property: If this flag is true, dedicated core quota is enforced - * via both the dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota properties on the account. If this flag is - * false, dedicated core quota is enforced only via the dedicatedCoreQuota property on the account and does not - * consider Virtual Machine family. + * Get the dedicatedCoreQuotaPerVMFamilyEnforced property: A value indicating whether core quotas per Virtual + * Machine family are enforced for this account + * + * If this flag is true, dedicated core quota is enforced via both the dedicatedCoreQuotaPerVMFamily and + * dedicatedCoreQuota properties on the account. If this flag is false, dedicated core quota is enforced only via + * the dedicatedCoreQuota property on the account and does not consider Virtual Machine family. * * @return the dedicatedCoreQuotaPerVMFamilyEnforced value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java index f1329519ee51..73b82c4ca2d8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -28,6 +28,8 @@ public final class BatchAccountUpdateProperties implements JsonSerializable allowedAuthenticationModes; /* - * If not specified, the default value is 'enabled'. + * The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. */ private PublicNetworkAccessType publicNetworkAccess; /* + * Network profile for Batch account, which contains network rule settings for each endpoint. + * * The network profile only takes effect when publicNetworkAccess is enabled. */ private NetworkProfile networkProfile; @@ -76,9 +82,10 @@ public BatchAccountUpdateProperties withAutoStorage(AutoStorageBaseProperties au } /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Get the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @return the encryption value. */ @@ -87,9 +94,10 @@ public EncryptionProperties encryption() { } /** - * Set the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Set the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @param encryption the encryption value to set. * @return the BatchAccountUpdateProperties object itself. @@ -123,7 +131,9 @@ public List allowedAuthenticationModes() { } /** - * Get the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Get the publicNetworkAccess property: The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * * @return the publicNetworkAccess value. */ @@ -132,7 +142,9 @@ public PublicNetworkAccessType publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Set the publicNetworkAccess property: The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the BatchAccountUpdateProperties object itself. @@ -143,7 +155,10 @@ public BatchAccountUpdateProperties withPublicNetworkAccess(PublicNetworkAccessT } /** - * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * Get the networkProfile property: Network profile for Batch account, which contains network rule settings for each + * endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled. * * @return the networkProfile value. */ @@ -152,7 +167,10 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * Set the networkProfile property: Network profile for Batch account, which contains network rule settings for each + * endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled. * * @param networkProfile the networkProfile value to set. * @return the BatchAccountUpdateProperties object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchLocationQuotaInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchLocationQuotaInner.java index dd39af3d88c0..90b0f93b4556 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchLocationQuotaInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchLocationQuotaInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -24,7 +24,7 @@ public final class BatchLocationQuotaInner implements JsonSerializable { - CertificateCreateOrUpdateProperties deserializedCertificateCreateOrUpdateProperties - = new CertificateCreateOrUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("thumbprintAlgorithm".equals(fieldName)) { - deserializedCertificateCreateOrUpdateProperties.withThumbprintAlgorithm(reader.getString()); - } else if ("thumbprint".equals(fieldName)) { - deserializedCertificateCreateOrUpdateProperties.withThumbprint(reader.getString()); - } else if ("format".equals(fieldName)) { - deserializedCertificateCreateOrUpdateProperties - .withFormat(CertificateFormat.fromString(reader.getString())); - } else if ("data".equals(fieldName)) { - deserializedCertificateCreateOrUpdateProperties.data = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedCertificateCreateOrUpdateProperties.password = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateCreateOrUpdateProperties; - }); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateInner.java deleted file mode 100644 index bab649e518f3..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateInner.java +++ /dev/null @@ -1,300 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.models.AzureProxyResource; -import com.azure.resourcemanager.batch.models.CertificateFormat; -import com.azure.resourcemanager.batch.models.CertificateProvisioningState; -import com.azure.resourcemanager.batch.models.DeleteCertificateError; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * Contains information about a certificate. - */ -@Fluent -public final class CertificateInner extends AzureProxyResource { - /* - * The properties associated with the certificate. - */ - private CertificateProperties innerProperties; - - /* - * The ETag of the resource, used for concurrency statements. - */ - private String etag; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of CertificateInner class. - */ - public CertificateInner() { - } - - /** - * Get the innerProperties property: The properties associated with the certificate. - * - * @return the innerProperties value. - */ - private CertificateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - @Override - public String etag() { - return this.etag; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public CertificateInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public CertificateProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the provisioningStateTransitionTime property: The time at which the certificate entered its current state. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningStateTransitionTime(); - } - - /** - * Get the previousProvisioningState property: The previous provisioned state of the resource. - * - * @return the previousProvisioningState value. - */ - public CertificateProvisioningState previousProvisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().previousProvisioningState(); - } - - /** - * Get the previousProvisioningStateTransitionTime property: The time at which the certificate entered its previous - * state. - * - * @return the previousProvisioningStateTransitionTime value. - */ - public OffsetDateTime previousProvisioningStateTransitionTime() { - return this.innerProperties() == null ? null : this.innerProperties().previousProvisioningStateTransitionTime(); - } - - /** - * Get the publicData property: The public key of the certificate. - * - * @return the publicData value. - */ - public String publicData() { - return this.innerProperties() == null ? null : this.innerProperties().publicData(); - } - - /** - * Get the deleteCertificateError property: This is only returned when the certificate provisioningState is - * 'Failed'. - * - * @return the deleteCertificateError value. - */ - public DeleteCertificateError deleteCertificateError() { - return this.innerProperties() == null ? null : this.innerProperties().deleteCertificateError(); - } - - /** - * Get the thumbprintAlgorithm property: This must match the first portion of the certificate name. Currently - * required to be 'SHA1'. - * - * @return the thumbprintAlgorithm value. - */ - public String thumbprintAlgorithm() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprintAlgorithm(); - } - - /** - * Set the thumbprintAlgorithm property: This must match the first portion of the certificate name. Currently - * required to be 'SHA1'. - * - * @param thumbprintAlgorithm the thumbprintAlgorithm value to set. - * @return the CertificateInner object itself. - */ - public CertificateInner withThumbprintAlgorithm(String thumbprintAlgorithm) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateProperties(); - } - this.innerProperties().withThumbprintAlgorithm(thumbprintAlgorithm); - return this; - } - - /** - * Get the thumbprint property: This must match the thumbprint from the name. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); - } - - /** - * Set the thumbprint property: This must match the thumbprint from the name. - * - * @param thumbprint the thumbprint value to set. - * @return the CertificateInner object itself. - */ - public CertificateInner withThumbprint(String thumbprint) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateProperties(); - } - this.innerProperties().withThumbprint(thumbprint); - return this; - } - - /** - * Get the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @return the format value. - */ - public CertificateFormat format() { - return this.innerProperties() == null ? null : this.innerProperties().format(); - } - - /** - * Set the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @param format the format value to set. - * @return the CertificateInner object itself. - */ - public CertificateInner withFormat(CertificateFormat format) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateProperties(); - } - this.innerProperties().withFormat(format); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CertificateInner. - */ - public static CertificateInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateInner deserializedCertificateInner = new CertificateInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCertificateInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCertificateInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCertificateInner.type = reader.getString(); - } else if ("etag".equals(fieldName)) { - deserializedCertificateInner.etag = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCertificateInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedCertificateInner.innerProperties = CertificateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateInner; - }); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateProperties.java deleted file mode 100644 index 87f61b422ed3..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CertificateProperties.java +++ /dev/null @@ -1,212 +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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.models.CertificateBaseProperties; -import com.azure.resourcemanager.batch.models.CertificateFormat; -import com.azure.resourcemanager.batch.models.CertificateProvisioningState; -import com.azure.resourcemanager.batch.models.DeleteCertificateError; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Certificate properties. - */ -@Fluent -public final class CertificateProperties extends CertificateBaseProperties { - /* - * The provisioningState property. - */ - private CertificateProvisioningState provisioningState; - - /* - * The time at which the certificate entered its current state. - */ - private OffsetDateTime provisioningStateTransitionTime; - - /* - * The previous provisioned state of the resource - */ - private CertificateProvisioningState previousProvisioningState; - - /* - * The time at which the certificate entered its previous state. - */ - private OffsetDateTime previousProvisioningStateTransitionTime; - - /* - * The public key of the certificate. - */ - private String publicData; - - /* - * This is only returned when the certificate provisioningState is 'Failed'. - */ - private DeleteCertificateError deleteCertificateError; - - /** - * Creates an instance of CertificateProperties class. - */ - public CertificateProperties() { - } - - /** - * Get the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - public CertificateProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the provisioningStateTransitionTime property: The time at which the certificate entered its current state. - * - * @return the provisioningStateTransitionTime value. - */ - public OffsetDateTime provisioningStateTransitionTime() { - return this.provisioningStateTransitionTime; - } - - /** - * Get the previousProvisioningState property: The previous provisioned state of the resource. - * - * @return the previousProvisioningState value. - */ - public CertificateProvisioningState previousProvisioningState() { - return this.previousProvisioningState; - } - - /** - * Get the previousProvisioningStateTransitionTime property: The time at which the certificate entered its previous - * state. - * - * @return the previousProvisioningStateTransitionTime value. - */ - public OffsetDateTime previousProvisioningStateTransitionTime() { - return this.previousProvisioningStateTransitionTime; - } - - /** - * Get the publicData property: The public key of the certificate. - * - * @return the publicData value. - */ - public String publicData() { - return this.publicData; - } - - /** - * Get the deleteCertificateError property: This is only returned when the certificate provisioningState is - * 'Failed'. - * - * @return the deleteCertificateError value. - */ - public DeleteCertificateError deleteCertificateError() { - return this.deleteCertificateError; - } - - /** - * {@inheritDoc} - */ - @Override - public CertificateProperties withThumbprintAlgorithm(String thumbprintAlgorithm) { - super.withThumbprintAlgorithm(thumbprintAlgorithm); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CertificateProperties withThumbprint(String thumbprint) { - super.withThumbprint(thumbprint); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CertificateProperties withFormat(CertificateFormat format) { - super.withFormat(format); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (deleteCertificateError() != null) { - deleteCertificateError().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("thumbprintAlgorithm", thumbprintAlgorithm()); - jsonWriter.writeStringField("thumbprint", thumbprint()); - jsonWriter.writeStringField("format", format() == null ? null : format().toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CertificateProperties. - */ - public static CertificateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateProperties deserializedCertificateProperties = new CertificateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("thumbprintAlgorithm".equals(fieldName)) { - deserializedCertificateProperties.withThumbprintAlgorithm(reader.getString()); - } else if ("thumbprint".equals(fieldName)) { - deserializedCertificateProperties.withThumbprint(reader.getString()); - } else if ("format".equals(fieldName)) { - deserializedCertificateProperties.withFormat(CertificateFormat.fromString(reader.getString())); - } else if ("provisioningState".equals(fieldName)) { - deserializedCertificateProperties.provisioningState - = CertificateProvisioningState.fromString(reader.getString()); - } else if ("provisioningStateTransitionTime".equals(fieldName)) { - deserializedCertificateProperties.provisioningStateTransitionTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("previousProvisioningState".equals(fieldName)) { - deserializedCertificateProperties.previousProvisioningState - = CertificateProvisioningState.fromString(reader.getString()); - } else if ("previousProvisioningStateTransitionTime".equals(fieldName)) { - deserializedCertificateProperties.previousProvisioningStateTransitionTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("publicData".equals(fieldName)) { - deserializedCertificateProperties.publicData = reader.getString(); - } else if ("deleteCertificateError".equals(fieldName)) { - deserializedCertificateProperties.deleteCertificateError = DeleteCertificateError.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateProperties; - }); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CheckNameAvailabilityResultInner.java index c5f3b2819db7..53b6a4e91f6a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CheckNameAvailabilityResultInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/CheckNameAvailabilityResultInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -37,7 +37,7 @@ public final class CheckNameAvailabilityResultInner implements JsonSerializable< /** * Creates an instance of CheckNameAvailabilityResultInner class. */ - public CheckNameAvailabilityResultInner() { + private CheckNameAvailabilityResultInner() { } /** 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 index 9c2496fcb87f..bc06f09d9fd4 100644 --- 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 @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.models.AzureProxyResource; import java.io.IOException; import java.util.Map; /** * Contains the information for a detector. */ -@Fluent -public final class DetectorResponseInner extends AzureProxyResource { +@Immutable +public final class DetectorResponseInner extends ProxyResource { /* * The properties associated with the detector. */ @@ -27,6 +28,16 @@ public final class DetectorResponseInner extends AzureProxyResource { */ private String etag; + /* + * The tags of the resource. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -45,7 +56,7 @@ public final class DetectorResponseInner extends AzureProxyResource { /** * Creates an instance of DetectorResponseInner class. */ - public DetectorResponseInner() { + private DetectorResponseInner() { } /** @@ -62,11 +73,28 @@ private DetectorResponseProperties innerProperties() { * * @return the etag value. */ - @Override public String etag() { return this.etag; } + /** + * Get the tags property: The tags of the resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -97,15 +125,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public DetectorResponseInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the value property: A base64 encoded string that represents the content of a detector. * @@ -115,26 +134,11 @@ 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. */ - @Override public void validate() { if (innerProperties() != null) { innerProperties().validate(); @@ -147,8 +151,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -174,13 +178,15 @@ public static DetectorResponseInner fromJson(JsonReader jsonReader) throws IOExc deserializedDetectorResponseInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedDetectorResponseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedDetectorResponseInner.innerProperties = DetectorResponseProperties.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedDetectorResponseInner.etag = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedDetectorResponseInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedDetectorResponseInner.innerProperties = DetectorResponseProperties.fromJson(reader); + deserializedDetectorResponseInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedDetectorResponseInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 index c0c9abc47ec6..be706e7fe20a 100644 --- 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Detector response properties. */ -@Fluent +@Immutable public final class DetectorResponseProperties implements JsonSerializable { /* * A base64 encoded string that represents the content of a detector. @@ -24,7 +24,7 @@ public final class DetectorResponseProperties implements JsonSerializable { /* + * The operation name. + * * This is of the format {provider}/{resource}/{operation} */ private String name; @@ -45,11 +47,13 @@ public final class OperationInner implements JsonSerializable { /** * Creates an instance of OperationInner class. */ - public OperationInner() { + private OperationInner() { } /** - * Get the name property: This is of the format {provider}/{resource}/{operation}. + * Get the name property: The operation name. + * + * This is of the format {provider}/{resource}/{operation}. * * @return the name value. */ @@ -57,17 +61,6 @@ public String name() { return this.name; } - /** - * Set the name property: This is of the format {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the OperationInner object itself. - */ - public OperationInner withName(String name) { - this.name = name; - return this; - } - /** * Get the isDataAction property: Indicates whether the operation is a data action. * @@ -77,17 +70,6 @@ public Boolean isDataAction() { return this.isDataAction; } - /** - * Set the isDataAction property: Indicates whether the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationInner object itself. - */ - public OperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - /** * Get the display property: The object that describes the operation. * @@ -97,17 +79,6 @@ public OperationDisplay display() { return this.display; } - /** - * Set the display property: The object that describes the operation. - * - * @param display the display value to set. - * @return the OperationInner object itself. - */ - public OperationInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - /** * Get the origin property: The intended executor of the operation. * @@ -117,17 +88,6 @@ public String origin() { return this.origin; } - /** - * Set the origin property: The intended executor of the operation. - * - * @param origin the origin value to set. - * @return the OperationInner object itself. - */ - public OperationInner withOrigin(String origin) { - this.origin = origin; - return this; - } - /** * Get the properties property: Properties of the operation. * @@ -137,17 +97,6 @@ public Object properties() { return this.properties; } - /** - * Set the properties property: Properties of the operation. - * - * @param properties the properties value to set. - * @return the OperationInner object itself. - */ - public OperationInner withProperties(Object properties) { - this.properties = properties; - return this; - } - /** * Validates the instance. * @@ -169,7 +118,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("isDataAction", this.isDataAction); jsonWriter.writeJsonField("display", this.display); jsonWriter.writeStringField("origin", this.origin); - jsonWriter.writeUntypedField("properties", this.properties); + if (this.properties != null) { + jsonWriter.writeUntypedField("properties", this.properties); + } return jsonWriter.writeEndObject(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OutboundEnvironmentEndpointInner.java index 340ec7dbc0f1..8144fb7c00f5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OutboundEnvironmentEndpointInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/OutboundEnvironmentEndpointInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -31,7 +31,7 @@ public final class OutboundEnvironmentEndpointInner implements JsonSerializable< /** * Creates an instance of OutboundEnvironmentEndpointInner class. */ - public OutboundEnvironmentEndpointInner() { + private OutboundEnvironmentEndpointInner() { } /** 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 0a77243b16b9..e47fa29cf53f 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 @@ -1,25 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import com.azure.resourcemanager.batch.models.AllocationState; import com.azure.resourcemanager.batch.models.ApplicationPackageReference; import com.azure.resourcemanager.batch.models.AutoScaleRun; -import com.azure.resourcemanager.batch.models.AzureProxyResource; import com.azure.resourcemanager.batch.models.BatchPoolIdentity; -import com.azure.resourcemanager.batch.models.CertificateReference; import com.azure.resourcemanager.batch.models.DeploymentConfiguration; import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; import com.azure.resourcemanager.batch.models.MetadataItem; import com.azure.resourcemanager.batch.models.MountConfiguration; import com.azure.resourcemanager.batch.models.NetworkConfiguration; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; import com.azure.resourcemanager.batch.models.PoolProvisioningState; import com.azure.resourcemanager.batch.models.ResizeOperationStatus; import com.azure.resourcemanager.batch.models.ScaleSettings; @@ -36,7 +35,7 @@ * Contains information about a pool. */ @Fluent -public final class PoolInner extends AzureProxyResource { +public final class PoolInner extends ProxyResource { /* * The properties associated with the pool. */ @@ -52,6 +51,16 @@ public final class PoolInner extends AzureProxyResource { */ private String etag; + /* + * The tags of the resource. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -107,11 +116,39 @@ public PoolInner withIdentity(BatchPoolIdentity identity) { * * @return the etag value. */ - @Override public String etag() { return this.etag; } + /** + * Get the tags property: The tags of the resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags of the resource. + * + * @param tags the tags value to set. + * @return the PoolInner object itself. + */ + public PoolInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -143,17 +180,9 @@ public String id() { } /** - * {@inheritDoc} - */ - @Override - public PoolInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the displayName property: The display name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * Get the displayName property: The display name for the pool. + * + * The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. * * @return the displayName value. */ @@ -162,8 +191,9 @@ public String displayName() { } /** - * Set the displayName property: The display name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * Set the displayName property: The display name for the pool. + * + * The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. * * @param displayName the displayName value to set. * @return the PoolInner object itself. @@ -177,9 +207,10 @@ public PoolInner withDisplayName(String displayName) { } /** - * Get the lastModified property: This is the last time at which the pool level data, such as the - * targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute - * node changing state. + * Get the lastModified property: The last modified time of the pool. + * + * This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, + * changed. It does not factor in node-level changes such as a compute node changing state. * * @return the lastModified value. */ @@ -233,11 +264,11 @@ public OffsetDateTime allocationStateTransitionTime() { } /** - * Get the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines - * (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports - * all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series). + * Get the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except + * STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). * * @return the vmSize value. */ @@ -246,11 +277,11 @@ public String vmSize() { } /** - * Set the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines - * (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports - * all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series). + * Set the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except + * STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). * * @param vmSize the vmSize value to set. * @return the PoolInner object itself. @@ -264,7 +295,10 @@ public PoolInner withVmSize(String vmSize) { } /** - * Get the deploymentConfiguration property: Deployment configuration properties. + * Get the deploymentConfiguration property: This property describes the virtual machines that the pool nodes will + * be deployed on. + * + * Deployment configuration properties. * * @return the deploymentConfiguration value. */ @@ -273,7 +307,10 @@ public DeploymentConfiguration deploymentConfiguration() { } /** - * Set the deploymentConfiguration property: Deployment configuration properties. + * Set the deploymentConfiguration property: This property describes the virtual machines that the pool nodes will + * be deployed on. + * + * Deployment configuration properties. * * @param deploymentConfiguration the deploymentConfiguration value to set. * @return the PoolInner object itself. @@ -305,9 +342,11 @@ public Integer currentLowPriorityNodes() { } /** - * Get the scaleSettings property: 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. + * Get the scaleSettings property: Settings which configure the number of nodes in 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. * * @return the scaleSettings value. */ @@ -316,9 +355,11 @@ public ScaleSettings scaleSettings() { } /** - * Set the scaleSettings property: 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. + * Set the scaleSettings property: Settings which configure the number of nodes in 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. * * @param scaleSettings the scaleSettings value to set. * @return the PoolInner object itself. @@ -332,8 +373,9 @@ public PoolInner withScaleSettings(ScaleSettings scaleSettings) { } /** - * Get the autoScaleRun property: This property is set only if the pool automatically scales, i.e. autoScaleSettings - * are used. + * Get the autoScaleRun property: The results and errors from the last execution of the autoscale formula. + * + * This property is set only if the pool automatically scales, i.e. autoScaleSettings are used. * * @return the autoScaleRun value. */ @@ -342,9 +384,11 @@ public AutoScaleRun autoScaleRun() { } /** - * Get the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not - * specified, this value defaults to 'Disabled'. + * Get the interNodeCommunication property: Whether the pool permits direct communication between nodes. + * + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance + * of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to + * 'Disabled'. * * @return the interNodeCommunication value. */ @@ -353,9 +397,11 @@ public InterNodeCommunicationState interNodeCommunication() { } /** - * Set the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not - * specified, this value defaults to 'Disabled'. + * Set the interNodeCommunication property: Whether the pool permits direct communication between nodes. + * + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance + * of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to + * 'Disabled'. * * @param interNodeCommunication the interNodeCommunication value to set. * @return the PoolInner object itself. @@ -369,7 +415,9 @@ public PoolInner withInterNodeCommunication(InterNodeCommunicationState interNod } /** - * Get the networkConfiguration property: The network configuration for a pool. + * Get the networkConfiguration property: The network configuration for the pool. + * + * The network configuration for a pool. * * @return the networkConfiguration value. */ @@ -378,7 +426,9 @@ public NetworkConfiguration networkConfiguration() { } /** - * Set the networkConfiguration property: The network configuration for a pool. + * Set the networkConfiguration property: The network configuration for the pool. + * + * The network configuration for a pool. * * @param networkConfiguration the networkConfiguration value to set. * @return the PoolInner object itself. @@ -392,8 +442,11 @@ public PoolInner withNetworkConfiguration(NetworkConfiguration networkConfigurat } /** - * Get the taskSlotsPerNode property: The default value is 1. The maximum value is the smaller of 4 times the number - * of cores of the vmSize of the pool or 256. + * Get the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single + * compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool + * or 256. * * @return the taskSlotsPerNode value. */ @@ -402,8 +455,11 @@ public Integer taskSlotsPerNode() { } /** - * Set the taskSlotsPerNode property: The default value is 1. The maximum value is the smaller of 4 times the number - * of cores of the vmSize of the pool or 256. + * Set the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single + * compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool + * or 256. * * @param taskSlotsPerNode the taskSlotsPerNode value to set. * @return the PoolInner object itself. @@ -417,7 +473,9 @@ public PoolInner withTaskSlotsPerNode(Integer taskSlotsPerNode) { } /** - * Get the taskSchedulingPolicy property: If not specified, the default is spread. + * Get the taskSchedulingPolicy property: How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread. * * @return the taskSchedulingPolicy value. */ @@ -426,7 +484,9 @@ public TaskSchedulingPolicy taskSchedulingPolicy() { } /** - * Set the taskSchedulingPolicy property: If not specified, the default is spread. + * Set the taskSchedulingPolicy property: How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread. * * @param taskSchedulingPolicy the taskSchedulingPolicy value to set. * @return the PoolInner object itself. @@ -463,8 +523,9 @@ public PoolInner withUserAccounts(List userAccounts) { } /** - * Get the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of - * user code. + * Get the metadata property: A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. * * @return the metadata value. */ @@ -473,8 +534,9 @@ public List metadata() { } /** - * Set the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of - * user code. + * Set the metadata property: A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. * * @param metadata the metadata value to set. * @return the PoolInner object itself. @@ -488,8 +550,10 @@ public PoolInner withMetadata(List metadata) { } /** - * Get the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove - * the start task from the pool. + * Get the startTask property: A task specified to run on each compute node as it joins the pool. + * + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the + * pool. * * @return the startTask value. */ @@ -498,8 +562,10 @@ public StartTask startTask() { } /** - * Set the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove - * the start task from the pool. + * Set the startTask property: A task specified to run on each compute node as it joins the pool. + * + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the + * pool. * * @param startTask the startTask value to set. * @return the PoolInner object itself. @@ -513,46 +579,12 @@ public PoolInner withStartTask(StartTask startTask) { } /** - * Get the certificates property: For Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory - * inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task - * to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in - * the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @return the certificates value. - */ - public List certificates() { - return this.innerProperties() == null ? null : this.innerProperties().certificates(); - } - - /** - * Set the certificates property: For Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory - * inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task - * to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in - * the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. + * Get the applicationPackages property: The list of application packages to be installed on each compute node in + * the pool. * - * @param certificates the certificates value to set. - * @return the PoolInner object itself. - */ - public PoolInner withCertificates(List certificates) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withCertificates(certificates); - return this; - } - - /** - * Get the applicationPackages property: Changes to application package references affect all new compute nodes - * joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or - * reimaged. There is a maximum of 10 application package references on any given pool. + * Changes to application package references affect all new compute nodes joining the pool, but do not affect + * compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 + * application package references on any given pool. * * @return the applicationPackages value. */ @@ -561,9 +593,12 @@ public List applicationPackages() { } /** - * Set the applicationPackages property: Changes to application package references affect all new compute nodes - * joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or - * reimaged. There is a maximum of 10 application package references on any given pool. + * Set the applicationPackages property: The list of application packages to be installed on each compute node in + * the pool. + * + * Changes to application package references affect all new compute nodes joining the pool, but do not affect + * compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 + * application package references on any given pool. * * @param applicationPackages the applicationPackages value to set. * @return the PoolInner object itself. @@ -577,33 +612,10 @@ public PoolInner withApplicationPackages(List appli } /** - * Get the applicationLicenses property: The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not supported, pool creation will fail. + * Get the resizeOperationStatus property: Contains details about the current or last completed resize operation. * - * @return the applicationLicenses value. - */ - public List applicationLicenses() { - return this.innerProperties() == null ? null : this.innerProperties().applicationLicenses(); - } - - /** - * Set the applicationLicenses property: The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not supported, pool creation will fail. - * - * @param applicationLicenses the applicationLicenses value to set. - * @return the PoolInner object itself. - */ - public PoolInner withApplicationLicenses(List applicationLicenses) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withApplicationLicenses(applicationLicenses); - return this; - } - - /** - * Get the resizeOperationStatus property: Describes either the current operation (if the pool AllocationState is - * Resizing) or the previously completed operation (if the AllocationState is Steady). + * Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed + * operation (if the AllocationState is Steady). * * @return the resizeOperationStatus value. */ @@ -612,7 +624,9 @@ public ResizeOperationStatus resizeOperationStatus() { } /** - * Get the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + * Get the mountConfiguration property: A list of file systems to mount on each node in the pool. + * + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. * * @return the mountConfiguration value. */ @@ -621,7 +635,9 @@ public List mountConfiguration() { } /** - * Set the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + * Set the mountConfiguration property: A list of file systems to mount on each node in the pool. + * + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. * * @param mountConfiguration the mountConfiguration value to set. * @return the PoolInner object itself. @@ -635,39 +651,9 @@ public PoolInner withMountConfiguration(List mountConfigurat } /** - * Get the targetNodeCommunicationMode property: If omitted, the default value is Default. - * - * @return the targetNodeCommunicationMode value. - */ - public NodeCommunicationMode targetNodeCommunicationMode() { - return this.innerProperties() == null ? null : this.innerProperties().targetNodeCommunicationMode(); - } - - /** - * Set the targetNodeCommunicationMode property: If omitted, the default value is Default. - * - * @param targetNodeCommunicationMode the targetNodeCommunicationMode value to set. - * @return the PoolInner object itself. - */ - public PoolInner withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withTargetNodeCommunicationMode(targetNodeCommunicationMode); - return this; - } - - /** - * Get the currentNodeCommunicationMode property: Determines how a pool communicates with the Batch service. + * Get the upgradePolicy property: The upgrade policy for the pool. * - * @return the currentNodeCommunicationMode value. - */ - public NodeCommunicationMode currentNodeCommunicationMode() { - return this.innerProperties() == null ? null : this.innerProperties().currentNodeCommunicationMode(); - } - - /** - * Get the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling. + * Describes an upgrade policy - automatic, manual, or rolling. * * @return the upgradePolicy value. */ @@ -676,7 +662,9 @@ public UpgradePolicy upgradePolicy() { } /** - * Set the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling. + * Set the upgradePolicy property: The upgrade policy for the pool. + * + * Describes an upgrade policy - automatic, manual, or rolling. * * @param upgradePolicy the upgradePolicy value to set. * @return the PoolInner object itself. @@ -689,39 +677,11 @@ public PoolInner withUpgradePolicy(UpgradePolicy upgradePolicy) { return this; } - /** - * Get the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified, - * these tags are propagated to the backing Azure resources associated with the pool. This property can only be - * specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. - * - * @return the resourceTags value. - */ - public Map resourceTags() { - return this.innerProperties() == null ? null : this.innerProperties().resourceTags(); - } - - /** - * Set the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified, - * these tags are propagated to the backing Azure resources associated with the pool. This property can only be - * specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. - * - * @param resourceTags the resourceTags value to set. - * @return the PoolInner object itself. - */ - public PoolInner withResourceTags(Map resourceTags) { - if (this.innerProperties() == null) { - this.innerProperties = new PoolProperties(); - } - this.innerProperties().withResourceTags(resourceTags); - return this; - } - /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (innerProperties() != null) { innerProperties().validate(); @@ -737,9 +697,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); jsonWriter.writeJsonField("identity", this.identity); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -765,15 +725,17 @@ public static PoolInner fromJson(JsonReader jsonReader) throws IOException { deserializedPoolInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedPoolInner.type = reader.getString(); - } else if ("etag".equals(fieldName)) { - deserializedPoolInner.etag = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPoolInner.withTags(tags); } else if ("properties".equals(fieldName)) { deserializedPoolInner.innerProperties = PoolProperties.fromJson(reader); } else if ("identity".equals(fieldName)) { deserializedPoolInner.identity = BatchPoolIdentity.fromJson(reader); + } else if ("etag".equals(fieldName)) { + deserializedPoolInner.etag = reader.getString(); + } else if ("tags".equals(fieldName)) { + Map tags = reader.readMap(reader1 -> reader1.getString()); + deserializedPoolInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedPoolInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } 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 0cd34095252c..ac2176a35085 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -13,13 +13,11 @@ import com.azure.resourcemanager.batch.models.AllocationState; import com.azure.resourcemanager.batch.models.ApplicationPackageReference; import com.azure.resourcemanager.batch.models.AutoScaleRun; -import com.azure.resourcemanager.batch.models.CertificateReference; import com.azure.resourcemanager.batch.models.DeploymentConfiguration; import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; import com.azure.resourcemanager.batch.models.MetadataItem; import com.azure.resourcemanager.batch.models.MountConfiguration; import com.azure.resourcemanager.batch.models.NetworkConfiguration; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; import com.azure.resourcemanager.batch.models.PoolProvisioningState; import com.azure.resourcemanager.batch.models.ResizeOperationStatus; import com.azure.resourcemanager.batch.models.ScaleSettings; @@ -30,7 +28,6 @@ import java.io.IOException; import java.time.OffsetDateTime; import java.util.List; -import java.util.Map; /** * Pool properties. @@ -38,11 +35,15 @@ @Fluent public final class PoolProperties implements JsonSerializable { /* + * The display name for the pool. + * * The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. */ private String displayName; /* + * The last modified time of the pool. + * * This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, * changed. It does not factor in node-level changes such as a compute node changing state. */ @@ -74,15 +75,17 @@ public final class PoolProperties implements JsonSerializable { private OffsetDateTime allocationStateTransitionTime; /* - * For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines - * (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports - * all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series). + * The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except + * STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). */ private String vmSize; /* + * This property describes the virtual machines that the pool nodes will be deployed on. + * * Deployment configuration properties. */ private DeploymentConfiguration deploymentConfiguration; @@ -98,6 +101,8 @@ public final class PoolProperties implements JsonSerializable { private Integer currentLowPriorityNodes; /* + * Settings which configure the number of nodes in 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. @@ -105,11 +110,15 @@ public final class PoolProperties implements JsonSerializable { private ScaleSettings scaleSettings; /* + * The results and errors from the last execution of the autoscale formula. + * * This property is set only if the pool automatically scales, i.e. autoScaleSettings are used. */ private AutoScaleRun autoScaleRun; /* + * Whether the pool permits direct communication between nodes. + * * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance * of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to * 'Disabled'. @@ -117,17 +126,23 @@ public final class PoolProperties implements JsonSerializable { private InterNodeCommunicationState interNodeCommunication; /* + * The network configuration for the pool. + * * The network configuration for a pool. */ private NetworkConfiguration networkConfiguration; /* + * The number of task slots that can be used to run concurrent tasks on a single compute node in the pool. + * * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool * or 256. */ private Integer taskSlotsPerNode; /* + * How tasks are distributed across compute nodes in a pool. + * * If not specified, the default is spread. */ private TaskSchedulingPolicy taskSchedulingPolicy; @@ -138,29 +153,23 @@ public final class PoolProperties implements JsonSerializable { private List userAccounts; /* + * A list of name-value pairs associated with the pool as metadata. + * * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. */ private List metadata; /* + * A task specified to run on each compute node as it joins the pool. + * * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the * pool. */ private StartTask startTask; /* - * For Windows compute nodes, the Batch service installs the certificates to the specified certificate store and - * location. For Linux compute nodes, the certificates are stored in a directory inside the task working directory - * and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For - * certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. + * The list of application packages to be installed on each compute node in the pool. * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - */ - private List certificates; - - /* * Changes to application package references affect all new compute nodes joining the pool, but do not affect * compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 * application package references on any given pool. @@ -168,44 +177,27 @@ public final class PoolProperties implements JsonSerializable { private List applicationPackages; /* - * The list of application licenses must be a subset of available Batch service application licenses. If a license - * is requested which is not supported, pool creation will fail. - */ - private List applicationLicenses; - - /* + * Contains 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). */ private ResizeOperationStatus resizeOperationStatus; /* + * A list of file systems to mount on each node in the pool. + * * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. */ private List mountConfiguration; /* - * If omitted, the default value is Default. - */ - private NodeCommunicationMode targetNodeCommunicationMode; - - /* - * Determines how a pool communicates with the Batch service. - */ - private NodeCommunicationMode currentNodeCommunicationMode; - - /* + * The upgrade policy for the pool. + * * Describes an upgrade policy - automatic, manual, or rolling. */ private UpgradePolicy upgradePolicy; - /* - * The user-defined tags to be associated with the Azure Batch Pool. When specified, these tags are propagated to - * the backing Azure resources associated with the pool. This property can only be specified when the Batch account - * was created with the poolAllocationMode property set to 'UserSubscription'. - */ - private Map resourceTags; - /** * Creates an instance of PoolProperties class. */ @@ -213,8 +205,9 @@ public PoolProperties() { } /** - * Get the displayName property: The display name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * Get the displayName property: The display name for the pool. + * + * The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. * * @return the displayName value. */ @@ -223,8 +216,9 @@ public String displayName() { } /** - * Set the displayName property: The display name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * Set the displayName property: The display name for the pool. + * + * The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. * * @param displayName the displayName value to set. * @return the PoolProperties object itself. @@ -235,9 +229,10 @@ public PoolProperties withDisplayName(String displayName) { } /** - * Get the lastModified property: This is the last time at which the pool level data, such as the - * targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute - * node changing state. + * Get the lastModified property: The last modified time of the pool. + * + * This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, + * changed. It does not factor in node-level changes such as a compute node changing state. * * @return the lastModified value. */ @@ -291,11 +286,11 @@ public OffsetDateTime allocationStateTransitionTime() { } /** - * Get the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines - * (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports - * all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series). + * Get the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except + * STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). * * @return the vmSize value. */ @@ -304,11 +299,11 @@ public String vmSize() { } /** - * Set the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines - * (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports - * all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series). + * Set the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except + * STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). * * @param vmSize the vmSize value to set. * @return the PoolProperties object itself. @@ -319,7 +314,10 @@ public PoolProperties withVmSize(String vmSize) { } /** - * Get the deploymentConfiguration property: Deployment configuration properties. + * Get the deploymentConfiguration property: This property describes the virtual machines that the pool nodes will + * be deployed on. + * + * Deployment configuration properties. * * @return the deploymentConfiguration value. */ @@ -328,7 +326,10 @@ public DeploymentConfiguration deploymentConfiguration() { } /** - * Set the deploymentConfiguration property: Deployment configuration properties. + * Set the deploymentConfiguration property: This property describes the virtual machines that the pool nodes will + * be deployed on. + * + * Deployment configuration properties. * * @param deploymentConfiguration the deploymentConfiguration value to set. * @return the PoolProperties object itself. @@ -357,9 +358,11 @@ public Integer currentLowPriorityNodes() { } /** - * Get the scaleSettings property: 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. + * Get the scaleSettings property: Settings which configure the number of nodes in 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. * * @return the scaleSettings value. */ @@ -368,9 +371,11 @@ public ScaleSettings scaleSettings() { } /** - * Set the scaleSettings property: 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. + * Set the scaleSettings property: Settings which configure the number of nodes in 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. * * @param scaleSettings the scaleSettings value to set. * @return the PoolProperties object itself. @@ -381,8 +386,9 @@ public PoolProperties withScaleSettings(ScaleSettings scaleSettings) { } /** - * Get the autoScaleRun property: This property is set only if the pool automatically scales, i.e. autoScaleSettings - * are used. + * Get the autoScaleRun property: The results and errors from the last execution of the autoscale formula. + * + * This property is set only if the pool automatically scales, i.e. autoScaleSettings are used. * * @return the autoScaleRun value. */ @@ -391,9 +397,11 @@ public AutoScaleRun autoScaleRun() { } /** - * Get the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not - * specified, this value defaults to 'Disabled'. + * Get the interNodeCommunication property: Whether the pool permits direct communication between nodes. + * + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance + * of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to + * 'Disabled'. * * @return the interNodeCommunication value. */ @@ -402,9 +410,11 @@ public InterNodeCommunicationState interNodeCommunication() { } /** - * Set the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not - * specified, this value defaults to 'Disabled'. + * Set the interNodeCommunication property: Whether the pool permits direct communication between nodes. + * + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance + * of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to + * 'Disabled'. * * @param interNodeCommunication the interNodeCommunication value to set. * @return the PoolProperties object itself. @@ -415,7 +425,9 @@ public PoolProperties withInterNodeCommunication(InterNodeCommunicationState int } /** - * Get the networkConfiguration property: The network configuration for a pool. + * Get the networkConfiguration property: The network configuration for the pool. + * + * The network configuration for a pool. * * @return the networkConfiguration value. */ @@ -424,7 +436,9 @@ public NetworkConfiguration networkConfiguration() { } /** - * Set the networkConfiguration property: The network configuration for a pool. + * Set the networkConfiguration property: The network configuration for the pool. + * + * The network configuration for a pool. * * @param networkConfiguration the networkConfiguration value to set. * @return the PoolProperties object itself. @@ -435,8 +449,11 @@ public PoolProperties withNetworkConfiguration(NetworkConfiguration networkConfi } /** - * Get the taskSlotsPerNode property: The default value is 1. The maximum value is the smaller of 4 times the number - * of cores of the vmSize of the pool or 256. + * Get the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single + * compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool + * or 256. * * @return the taskSlotsPerNode value. */ @@ -445,8 +462,11 @@ public Integer taskSlotsPerNode() { } /** - * Set the taskSlotsPerNode property: The default value is 1. The maximum value is the smaller of 4 times the number - * of cores of the vmSize of the pool or 256. + * Set the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single + * compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool + * or 256. * * @param taskSlotsPerNode the taskSlotsPerNode value to set. * @return the PoolProperties object itself. @@ -457,7 +477,9 @@ public PoolProperties withTaskSlotsPerNode(Integer taskSlotsPerNode) { } /** - * Get the taskSchedulingPolicy property: If not specified, the default is spread. + * Get the taskSchedulingPolicy property: How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread. * * @return the taskSchedulingPolicy value. */ @@ -466,7 +488,9 @@ public TaskSchedulingPolicy taskSchedulingPolicy() { } /** - * Set the taskSchedulingPolicy property: If not specified, the default is spread. + * Set the taskSchedulingPolicy property: How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread. * * @param taskSchedulingPolicy the taskSchedulingPolicy value to set. * @return the PoolProperties object itself. @@ -497,8 +521,9 @@ public PoolProperties withUserAccounts(List userAccounts) { } /** - * Get the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of - * user code. + * Get the metadata property: A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. * * @return the metadata value. */ @@ -507,8 +532,9 @@ public List metadata() { } /** - * Set the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use of - * user code. + * Set the metadata property: A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. * * @param metadata the metadata value to set. * @return the PoolProperties object itself. @@ -519,8 +545,10 @@ public PoolProperties withMetadata(List metadata) { } /** - * Get the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove - * the start task from the pool. + * Get the startTask property: A task specified to run on each compute node as it joins the pool. + * + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the + * pool. * * @return the startTask value. */ @@ -529,8 +557,10 @@ public StartTask startTask() { } /** - * Set the startTask property: In an PATCH (update) operation, this property can be set to an empty object to remove - * the start task from the pool. + * Set the startTask property: A task specified to run on each compute node as it joins the pool. + * + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the + * pool. * * @param startTask the startTask value to set. * @return the PoolProperties object itself. @@ -541,43 +571,12 @@ public PoolProperties withStartTask(StartTask startTask) { } /** - * Get the certificates property: For Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory - * inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task - * to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in - * the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @return the certificates value. - */ - public List certificates() { - return this.certificates; - } - - /** - * Set the certificates property: For Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory - * inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task - * to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in - * the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. + * Get the applicationPackages property: The list of application packages to be installed on each compute node in + * the pool. * - * @param certificates the certificates value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withCertificates(List certificates) { - this.certificates = certificates; - return this; - } - - /** - * Get the applicationPackages property: Changes to application package references affect all new compute nodes - * joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or - * reimaged. There is a maximum of 10 application package references on any given pool. + * Changes to application package references affect all new compute nodes joining the pool, but do not affect + * compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 + * application package references on any given pool. * * @return the applicationPackages value. */ @@ -586,9 +585,12 @@ public List applicationPackages() { } /** - * Set the applicationPackages property: Changes to application package references affect all new compute nodes - * joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or - * reimaged. There is a maximum of 10 application package references on any given pool. + * Set the applicationPackages property: The list of application packages to be installed on each compute node in + * the pool. + * + * Changes to application package references affect all new compute nodes joining the pool, but do not affect + * compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 + * application package references on any given pool. * * @param applicationPackages the applicationPackages value to set. * @return the PoolProperties object itself. @@ -599,30 +601,10 @@ public PoolProperties withApplicationPackages(List } /** - * Get the applicationLicenses property: The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not supported, pool creation will fail. + * Get the resizeOperationStatus property: Contains details about the current or last completed resize operation. * - * @return the applicationLicenses value. - */ - public List applicationLicenses() { - return this.applicationLicenses; - } - - /** - * Set the applicationLicenses property: The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not supported, pool creation will fail. - * - * @param applicationLicenses the applicationLicenses value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withApplicationLicenses(List applicationLicenses) { - this.applicationLicenses = applicationLicenses; - return this; - } - - /** - * Get the resizeOperationStatus property: Describes either the current operation (if the pool AllocationState is - * Resizing) or the previously completed operation (if the AllocationState is Steady). + * Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed + * operation (if the AllocationState is Steady). * * @return the resizeOperationStatus value. */ @@ -631,7 +613,9 @@ public ResizeOperationStatus resizeOperationStatus() { } /** - * Get the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + * Get the mountConfiguration property: A list of file systems to mount on each node in the pool. + * + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. * * @return the mountConfiguration value. */ @@ -640,7 +624,9 @@ public List mountConfiguration() { } /** - * Set the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + * Set the mountConfiguration property: A list of file systems to mount on each node in the pool. + * + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. * * @param mountConfiguration the mountConfiguration value to set. * @return the PoolProperties object itself. @@ -651,36 +637,9 @@ public PoolProperties withMountConfiguration(List mountConfi } /** - * Get the targetNodeCommunicationMode property: If omitted, the default value is Default. + * Get the upgradePolicy property: The upgrade policy for the pool. * - * @return the targetNodeCommunicationMode value. - */ - public NodeCommunicationMode targetNodeCommunicationMode() { - return this.targetNodeCommunicationMode; - } - - /** - * Set the targetNodeCommunicationMode property: If omitted, the default value is Default. - * - * @param targetNodeCommunicationMode the targetNodeCommunicationMode value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode) { - this.targetNodeCommunicationMode = targetNodeCommunicationMode; - return this; - } - - /** - * Get the currentNodeCommunicationMode property: Determines how a pool communicates with the Batch service. - * - * @return the currentNodeCommunicationMode value. - */ - public NodeCommunicationMode currentNodeCommunicationMode() { - return this.currentNodeCommunicationMode; - } - - /** - * Get the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling. + * Describes an upgrade policy - automatic, manual, or rolling. * * @return the upgradePolicy value. */ @@ -689,7 +648,9 @@ public UpgradePolicy upgradePolicy() { } /** - * Set the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling. + * Set the upgradePolicy property: The upgrade policy for the pool. + * + * Describes an upgrade policy - automatic, manual, or rolling. * * @param upgradePolicy the upgradePolicy value to set. * @return the PoolProperties object itself. @@ -699,30 +660,6 @@ public PoolProperties withUpgradePolicy(UpgradePolicy upgradePolicy) { return this; } - /** - * Get the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified, - * these tags are propagated to the backing Azure resources associated with the pool. This property can only be - * specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. - * - * @return the resourceTags value. - */ - public Map resourceTags() { - return this.resourceTags; - } - - /** - * Set the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified, - * these tags are propagated to the backing Azure resources associated with the pool. This property can only be - * specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. - * - * @param resourceTags the resourceTags value to set. - * @return the PoolProperties object itself. - */ - public PoolProperties withResourceTags(Map resourceTags) { - this.resourceTags = resourceTags; - return this; - } - /** * Validates the instance. * @@ -753,9 +690,6 @@ public void validate() { if (startTask() != null) { startTask().validate(); } - if (certificates() != null) { - certificates().forEach(e -> e.validate()); - } if (applicationPackages() != null) { applicationPackages().forEach(e -> e.validate()); } @@ -788,17 +722,11 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeArrayField("userAccounts", this.userAccounts, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("metadata", this.metadata, (writer, element) -> writer.writeJson(element)); jsonWriter.writeJsonField("startTask", this.startTask); - jsonWriter.writeArrayField("certificates", this.certificates, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("applicationPackages", this.applicationPackages, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("applicationLicenses", this.applicationLicenses, - (writer, element) -> writer.writeString(element)); jsonWriter.writeArrayField("mountConfiguration", this.mountConfiguration, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("targetNodeCommunicationMode", - this.targetNodeCommunicationMode == null ? null : this.targetNodeCommunicationMode.toString()); jsonWriter.writeJsonField("upgradePolicy", this.upgradePolicy); - jsonWriter.writeMapField("resourceTags", this.resourceTags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -864,34 +792,18 @@ public static PoolProperties fromJson(JsonReader jsonReader) throws IOException deserializedPoolProperties.metadata = metadata; } else if ("startTask".equals(fieldName)) { deserializedPoolProperties.startTask = StartTask.fromJson(reader); - } else if ("certificates".equals(fieldName)) { - List certificates - = reader.readArray(reader1 -> CertificateReference.fromJson(reader1)); - deserializedPoolProperties.certificates = certificates; } else if ("applicationPackages".equals(fieldName)) { List applicationPackages = reader.readArray(reader1 -> ApplicationPackageReference.fromJson(reader1)); deserializedPoolProperties.applicationPackages = applicationPackages; - } else if ("applicationLicenses".equals(fieldName)) { - List applicationLicenses = reader.readArray(reader1 -> reader1.getString()); - deserializedPoolProperties.applicationLicenses = applicationLicenses; } else if ("resizeOperationStatus".equals(fieldName)) { deserializedPoolProperties.resizeOperationStatus = ResizeOperationStatus.fromJson(reader); } else if ("mountConfiguration".equals(fieldName)) { List mountConfiguration = reader.readArray(reader1 -> MountConfiguration.fromJson(reader1)); deserializedPoolProperties.mountConfiguration = mountConfiguration; - } else if ("targetNodeCommunicationMode".equals(fieldName)) { - deserializedPoolProperties.targetNodeCommunicationMode - = NodeCommunicationMode.fromString(reader.getString()); - } else if ("currentNodeCommunicationMode".equals(fieldName)) { - deserializedPoolProperties.currentNodeCommunicationMode - = NodeCommunicationMode.fromString(reader.getString()); } else if ("upgradePolicy".equals(fieldName)) { deserializedPoolProperties.upgradePolicy = UpgradePolicy.fromJson(reader); - } else if ("resourceTags".equals(fieldName)) { - Map resourceTags = reader.readMap(reader1 -> reader1.getString()); - deserializedPoolProperties.resourceTags = resourceTags; } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java index 12dd596519b1..a3b9f0322cc9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java @@ -1,14 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec 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.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.models.AzureProxyResource; import com.azure.resourcemanager.batch.models.PrivateEndpoint; import com.azure.resourcemanager.batch.models.PrivateEndpointConnectionProvisioningState; import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; @@ -20,7 +21,7 @@ * Contains information about a private link resource. */ @Fluent -public final class PrivateEndpointConnectionInner extends AzureProxyResource { +public final class PrivateEndpointConnectionInner extends ProxyResource { /* * The properties associated with the private endpoint connection. */ @@ -31,6 +32,16 @@ public final class PrivateEndpointConnectionInner extends AzureProxyResource { */ private String etag; + /* + * The tags of the resource. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -66,11 +77,39 @@ private PrivateEndpointConnectionProperties innerProperties() { * * @return the etag value. */ - @Override public String etag() { return this.etag; } + /** + * Get the tags property: The tags of the resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: The tags of the resource. + * + * @param tags the tags value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -101,15 +140,6 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public PrivateEndpointConnectionInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the provisioningState property: The provisioning state of the private endpoint connection. * @@ -120,7 +150,9 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { } /** - * Get the privateEndpoint property: The private endpoint of the private endpoint connection. + * Get the privateEndpoint property: The ARM resource identifier of the private endpoint. + * + * The private endpoint of the private endpoint connection. * * @return the privateEndpoint value. */ @@ -129,7 +161,9 @@ public PrivateEndpoint privateEndpoint() { } /** - * Get the groupIds property: The value has one and only one group id. + * Get the groupIds property: The group id of the private endpoint connection. + * + * The value has one and only one group id. * * @return the groupIds value. */ @@ -168,7 +202,6 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (innerProperties() != null) { innerProperties().validate(); @@ -181,8 +214,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -209,14 +242,16 @@ public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) thr deserializedPrivateEndpointConnectionInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedPrivateEndpointConnectionInner.etag = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateEndpointConnectionInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.innerProperties - = PrivateEndpointConnectionProperties.fromJson(reader); + deserializedPrivateEndpointConnectionInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java index 97b711c6983c..8e4a8640b00c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -27,17 +27,21 @@ public final class PrivateEndpointConnectionProperties private PrivateEndpointConnectionProvisioningState provisioningState; /* + * The ARM resource identifier of the private endpoint. + * * The private endpoint of the private endpoint connection. */ private PrivateEndpoint privateEndpoint; /* + * The group id of the private endpoint connection. + * * The value has one and only one group id. */ private List groupIds; /* - * The private link service connection state of the private endpoint connection + * The private link service connection state of the private endpoint connection. */ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; @@ -57,7 +61,9 @@ public PrivateEndpointConnectionProvisioningState provisioningState() { } /** - * Get the privateEndpoint property: The private endpoint of the private endpoint connection. + * Get the privateEndpoint property: The ARM resource identifier of the private endpoint. + * + * The private endpoint of the private endpoint connection. * * @return the privateEndpoint value. */ @@ -66,7 +72,9 @@ public PrivateEndpoint privateEndpoint() { } /** - * Get the groupIds property: The value has one and only one group id. + * Get the groupIds property: The group id of the private endpoint connection. + * + * The value has one and only one group id. * * @return the groupIds value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java index fdaca055ee45..41f01de1c219 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java @@ -1,14 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.models.AzureProxyResource; import java.io.IOException; import java.util.List; import java.util.Map; @@ -16,8 +17,8 @@ /** * Contains information about a private link resource. */ -@Fluent -public final class PrivateLinkResourceInner extends AzureProxyResource { +@Immutable +public final class PrivateLinkResourceInner extends ProxyResource { /* * The properties associated with the private link resource. */ @@ -28,6 +29,16 @@ public final class PrivateLinkResourceInner extends AzureProxyResource { */ private String etag; + /* + * The tags of the resource. + */ + private Map tags; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -46,7 +57,7 @@ public final class PrivateLinkResourceInner extends AzureProxyResource { /** * Creates an instance of PrivateLinkResourceInner class. */ - public PrivateLinkResourceInner() { + private PrivateLinkResourceInner() { } /** @@ -63,11 +74,28 @@ private PrivateLinkResourceProperties innerProperties() { * * @return the etag value. */ - @Override public String etag() { return this.etag; } + /** + * Get the tags property: The tags of the resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -99,16 +127,9 @@ public String id() { } /** - * {@inheritDoc} - */ - @Override - public PrivateLinkResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the groupId property: The group id is used to establish the private link connection. + * Get the groupId property: The group id of the private link resource. + * + * The group id is used to establish the private link connection. * * @return the groupId value. */ @@ -129,6 +150,8 @@ public List requiredMembers() { /** * Get the requiredZoneNames property: The list of required zone names for the private DNS resource name. * + * The list of required zone names for the private DNS resource name. + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { @@ -140,7 +163,6 @@ public List requiredZoneNames() { * * @throws IllegalArgumentException thrown if the instance is not valid. */ - @Override public void validate() { if (innerProperties() != null) { innerProperties().validate(); @@ -153,8 +175,8 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.innerProperties); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -180,14 +202,16 @@ public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IO deserializedPrivateLinkResourceInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedPrivateLinkResourceInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResourceInner.innerProperties + = PrivateLinkResourceProperties.fromJson(reader); } else if ("etag".equals(fieldName)) { deserializedPrivateLinkResourceInner.etag = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResourceInner.innerProperties - = PrivateLinkResourceProperties.fromJson(reader); + deserializedPrivateLinkResourceInner.tags = tags; + } else if ("systemData".equals(fieldName)) { + deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java index 582ad974079f..0abd6978a91c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -18,6 +18,8 @@ @Immutable public final class PrivateLinkResourceProperties implements JsonSerializable { /* + * The group id of the private link resource. + * * The group id is used to establish the private link connection. */ private String groupId; @@ -28,6 +30,8 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredMembers; /* + * The list of required zone names for the private DNS resource name. + * * The list of required zone names for the private DNS resource name */ private List requiredZoneNames; @@ -35,11 +39,13 @@ public final class PrivateLinkResourceProperties implements JsonSerializable requiredMembers() { /** * Get the requiredZoneNames property: The list of required zone names for the private DNS resource name. * + * The list of required zone names for the private DNS resource name. + * * @return the requiredZoneNames value. */ public List requiredZoneNames() { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java index 7b5c6024c95f..cd969071ff9c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.fluent.models; @@ -43,7 +43,7 @@ public final class SupportedSkuInner implements JsonSerializable tags() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String displayName() { return this.innerModel().displayName(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java index bbe90fa3b7c3..dd1874260069 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner; import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; @@ -50,6 +51,10 @@ public Map tags() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public PackageState state() { return this.innerModel().state(); } 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 d8e9ad200641..1b452287f60d 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -29,10 +29,11 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient; import com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner; +import com.azure.resourcemanager.batch.implementation.models.ListApplicationPackagesResult; import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; -import com.azure.resourcemanager.batch.models.ListApplicationPackagesResult; import reactor.core.publisher.Mono; /** @@ -64,148 +65,155 @@ public final class ApplicationPackagesClientImpl implements ApplicationPackagesC * The interface defining all the services for BatchManagementClientApplicationPackages to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientApplicationPackages") public interface ApplicationPackagesService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> activate(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ActivateApplicationPackageParameters parameters, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ApplicationPackageInner parameters, @HeaderParam("Accept") String accept, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationPackageInner parameters, Context context); @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationPackageInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") - @ExpectedResponses({ 200 }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("applicationName") String applicationName, @QueryParam("maxresults") Integer maxresults, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> activate(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActivateApplicationPackageParameters parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response activateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, @PathParam("versionName") String versionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ActivateApplicationPackageParameters parameters, Context context); + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application along with - * {@link Response} on successful completion of {@link Mono}. + * @return information about the specified application package along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> activateWithResponseAsync(String resourceGroupName, - String accountName, String applicationName, String versionName, - ActivateApplicationPackageParameters parameters) { + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String applicationName, String versionName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - if (versionName == null) { - return Mono.error(new IllegalArgumentException("Parameter versionName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.activate(this.client.getEndpoint(), resourceGroupName, accountName, - applicationName, versionName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @param parameters The parameters for the request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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(String resourceGroupName, - String accountName, String applicationName, String versionName, ActivateApplicationPackageParameters parameters, - 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.")); @@ -220,85 +228,105 @@ private Mono> activateWithResponseAsync(String if (versionName == null) { return Mono.error(new IllegalArgumentException("Parameter versionName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.activate(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, versionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, versionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application on successful completion - * of {@link Mono}. + * @return information about the specified application package on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono activateAsync(String resourceGroupName, String accountName, - String applicationName, String versionName, ActivateApplicationPackageParameters parameters) { - return activateWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, parameters) + private Mono getAsync(String resourceGroupName, String accountName, String applicationName, + String versionName) { + return getWithResponseAsync(resourceGroupName, accountName, applicationName, versionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application along with - * {@link Response}. + * @return information about the specified application package along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response activateWithResponse(String resourceGroupName, String accountName, - String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context) { - return activateWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, parameters, - context).block(); + public Response getWithResponse(String resourceGroupName, String accountName, + String applicationName, String versionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (applicationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (versionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, applicationName, versionName, accept, context); } /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return information about the specified application package. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationPackageInner activate(String resourceGroupName, String accountName, String applicationName, - String versionName, ActivateApplicationPackageParameters parameters) { - return activateWithResponse(resourceGroupName, accountName, applicationName, versionName, parameters, - Context.NONE).getValue(); + public ApplicationPackageInner get(String resourceGroupName, String accountName, String applicationName, + String versionName) { + return getWithResponse(resourceGroupName, accountName, applicationName, versionName, Context.NONE).getValue(); } /** @@ -306,8 +334,11 @@ public ApplicationPackageInner activate(String resourceGroupName, String account * Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can * be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @param parameters The parameters for the request. @@ -324,60 +355,10 @@ private Mono> createWithResponseAsync(String r return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - if (versionName == null) { - return Mono.error(new IllegalArgumentException("Parameter versionName 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 (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, accountName, - applicationName, versionName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates an application package record. The record contains a storageUrl where the package should be uploaded to. - * Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can - * be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @param parameters The parameters for the request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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(String resourceGroupName, - String accountName, String applicationName, String versionName, ApplicationPackageInner parameters, - 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.")); @@ -392,17 +373,15 @@ private Mono> createWithResponseAsync(String r if (versionName == null) { return Mono.error(new IllegalArgumentException("Parameter versionName 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 (parameters != null) { parameters.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, versionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, versionName, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -410,8 +389,11 @@ private Mono> createWithResponseAsync(String r * Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can * be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -433,8 +415,11 @@ private Mono createAsync(String resourceGroupName, Stri * Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can * be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @param parameters The parameters for the request. @@ -448,8 +433,39 @@ private Mono createAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String accountName, String applicationName, String versionName, ApplicationPackageInner parameters, Context context) { - return createWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, parameters, - context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (applicationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (versionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (parameters != null) { + parameters.validate(); + } + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, versionName, accept, + parameters, context); } /** @@ -457,8 +473,11 @@ public Response createWithResponse(String resourceGroup * Once it is uploaded the `ApplicationPackage` needs to be activated using `ApplicationPackageActive` before it can * be used. If the auto storage account was configured to use storage keys, the URL returned will contain a SAS. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -477,8 +496,11 @@ public ApplicationPackageInner create(String resourceGroupName, String accountNa /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -493,6 +515,10 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -507,73 +533,26 @@ private Mono> deleteWithResponseAsync(String resourceGroupName, S if (versionName == null) { return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - versionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, versionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String applicationName, String versionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - if (versionName == null) { - return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, versionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes an application package record and its associated binary file. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @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, @@ -585,8 +564,11 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @param context The context to associate with this operation. @@ -598,14 +580,44 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, String versionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (applicationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (versionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, versionName, context); } /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -618,72 +630,32 @@ public void delete(String resourceGroupName, String accountName, String applicat } /** - * Gets information about the specified application package. + * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. + * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response} on successful completion - * of {@link Mono}. + * @return the result of performing list application packages along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String applicationName, String versionName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String accountName, String applicationName, Integer maxresults) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } - if (versionName == null) { - return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - versionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about the specified application package. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @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 specified application package along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String applicationName, String versionName, 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.")); @@ -695,259 +667,369 @@ private Mono> getWithResponseAsync(String reso return Mono .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } - if (versionName == null) { - return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, versionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets information about the specified application package. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String applicationName, - String versionName) { - return getWithResponseAsync(resourceGroupName, accountName, applicationName, versionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, maxresults, 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 specified application package. + * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @param context The context to associate with this operation. + * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return the result of performing list application packages as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String applicationName, String versionName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName, + String applicationName, Integer maxresults) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, applicationName, maxresults), + nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Gets information about the specified application package. + * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the result of performing list application packages as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationPackageInner get(String resourceGroupName, String accountName, String applicationName, - String versionName) { - return getWithResponse(resourceGroupName, accountName, applicationName, versionName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String accountName, + String applicationName) { + final Integer maxresults = null; + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, applicationName, maxresults), + nextLink -> listNextSinglePageAsync(nextLink)); } /** * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the result of performing list application packages along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String accountName, String applicationName, Integer maxresults) { + private PagedResponse listSinglePage(String resourceGroupName, String accountName, + String applicationName, Integer maxresults) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - maxresults, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, applicationName, maxresults, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param maxresults The maximum number of items to return in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the result of performing list application packages along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String accountName, String applicationName, Integer maxresults, Context context) { + private PagedResponse listSinglePage(String resourceGroupName, String accountName, + String applicationName, Integer maxresults, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, maxresults, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, applicationName, maxresults, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 as paginated response with {@link PagedFlux}. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, - String applicationName, Integer maxresults) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, applicationName, maxresults), - nextLink -> listNextSinglePageAsync(nextLink)); + public PagedIterable list(String resourceGroupName, String accountName, + String applicationName) { + final Integer maxresults = null; + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, applicationName, maxresults), + nextLink -> listNextSinglePage(nextLink)); } /** * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param maxresults The maximum number of items to return in the response. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedFlux}. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, - String applicationName) { - final Integer maxresults = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, applicationName, maxresults), - nextLink -> listNextSinglePageAsync(nextLink)); + public PagedIterable list(String resourceGroupName, String accountName, + String applicationName, Integer maxresults, Context context) { + return new PagedIterable<>( + () -> listSinglePage(resourceGroupName, accountName, applicationName, maxresults, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** - * Lists all of the application packages in the specified application. + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param maxresults The maximum number of items to return in the response. - * @param context The context to associate with this operation. + * @param versionName The version of the application. + * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedFlux}. + * @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.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, - String applicationName, Integer maxresults, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, accountName, applicationName, maxresults, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> activateWithResponseAsync(String resourceGroupName, + String accountName, String applicationName, String versionName, + ActivateApplicationPackageParameters parameters) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (versionName == null) { + return Mono.error(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.activate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, versionName, + contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the application packages in the specified application. + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. + * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedIterable}. + * @return an application package which represents a particular version of an application on successful completion + * of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, - String applicationName) { - final Integer maxresults = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, applicationName, maxresults)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateAsync(String resourceGroupName, String accountName, + String applicationName, String versionName, ActivateApplicationPackageParameters parameters) { + return activateWithResponseAsync(resourceGroupName, accountName, applicationName, versionName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Lists all of the application packages in the specified application. + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param maxresults The maximum number of items to return in the response. + * @param versionName The version of the application. + * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedIterable}. + * @return an application package which represents a particular version of an application along with + * {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String accountName, - String applicationName, Integer maxresults, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, applicationName, maxresults, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response activateWithResponse(String resourceGroupName, String accountName, + String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (applicationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (versionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter versionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.activateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, versionName, contentType, + accept, parameters, context); + } + + /** + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an application package which represents a particular version of an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApplicationPackageInner activate(String resourceGroupName, String accountName, String applicationName, + String versionName, ActivateApplicationPackageParameters parameters) { + return activateWithResponse(resourceGroupName, accountName, applicationName, versionName, parameters, + Context.NONE).getValue(); } /** @@ -976,6 +1058,33 @@ private Mono> listNextSinglePageAsync(Str .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of performing list application packages along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -984,22 +1093,25 @@ 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the result of performing list application packages along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationPackagesClientImpl.class); } 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 ebc249e02187..b20f23568fa7 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -28,10 +28,10 @@ public ApplicationPackagesImpl(ApplicationPackagesClient innerClient, this.serviceManager = serviceManager; } - public Response activateWithResponse(String resourceGroupName, String accountName, - String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context) { + public Response getWithResponse(String resourceGroupName, String accountName, + String applicationName, String versionName, Context context) { Response inner = this.serviceClient() - .activateWithResponse(resourceGroupName, accountName, applicationName, versionName, parameters, context); + .getWithResponse(resourceGroupName, accountName, applicationName, versionName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationPackageImpl(inner.getValue(), this.manager())); @@ -40,10 +40,10 @@ public Response activateWithResponse(String resourceGroupNam } } - public ApplicationPackage activate(String resourceGroupName, String accountName, String applicationName, - String versionName, ActivateApplicationPackageParameters parameters) { + public ApplicationPackage get(String resourceGroupName, String accountName, String applicationName, + String versionName) { ApplicationPackageInner inner - = this.serviceClient().activate(resourceGroupName, accountName, applicationName, versionName, parameters); + = this.serviceClient().get(resourceGroupName, accountName, applicationName, versionName); if (inner != null) { return new ApplicationPackageImpl(inner, this.manager()); } else { @@ -61,10 +61,24 @@ public void delete(String resourceGroupName, String accountName, String applicat this.serviceClient().delete(resourceGroupName, accountName, applicationName, versionName); } - public Response getWithResponse(String resourceGroupName, String accountName, - String applicationName, String versionName, Context context) { + public PagedIterable list(String resourceGroupName, String accountName, + String applicationName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, accountName, applicationName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String accountName, String applicationName, + Integer maxresults, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, accountName, applicationName, maxresults, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager())); + } + + public Response activateWithResponse(String resourceGroupName, String accountName, + String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context) { Response inner = this.serviceClient() - .getWithResponse(resourceGroupName, accountName, applicationName, versionName, context); + .activateWithResponse(resourceGroupName, accountName, applicationName, versionName, parameters, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ApplicationPackageImpl(inner.getValue(), this.manager())); @@ -73,10 +87,10 @@ public Response getWithResponse(String resourceGroupName, St } } - public ApplicationPackage get(String resourceGroupName, String accountName, String applicationName, - String versionName) { + public ApplicationPackage activate(String resourceGroupName, String accountName, String applicationName, + String versionName, ActivateApplicationPackageParameters parameters) { ApplicationPackageInner inner - = this.serviceClient().get(resourceGroupName, accountName, applicationName, versionName); + = this.serviceClient().activate(resourceGroupName, accountName, applicationName, versionName, parameters); if (inner != null) { return new ApplicationPackageImpl(inner, this.manager()); } else { @@ -84,20 +98,6 @@ public ApplicationPackage get(String resourceGroupName, String accountName, Stri } } - public PagedIterable list(String resourceGroupName, String accountName, - String applicationName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, applicationName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String accountName, String applicationName, - Integer maxresults, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, accountName, applicationName, maxresults, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationPackageImpl(inner1, this.manager())); - } - public ApplicationPackage getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { 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 95170ce08e36..6cc7c13662fc 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -29,9 +29,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.fluent.ApplicationsClient; import com.azure.resourcemanager.batch.fluent.models.ApplicationInner; -import com.azure.resourcemanager.batch.models.ListApplicationsResult; +import com.azure.resourcemanager.batch.implementation.models.ListApplicationsResult; import reactor.core.publisher.Mono; /** @@ -63,133 +64,146 @@ public final class ApplicationsClientImpl implements ApplicationsClient { * The interface defining all the services for BatchManagementClientApplications to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientApplications") public interface ApplicationsService { @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ApplicationInner parameters, @HeaderParam("Accept") String accept, + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") - @ExpectedResponses({ 200, 204 }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInner parameters, Context context); @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, @HeaderParam("Accept") String accept, + @BodyParam("application/json") ApplicationInner parameters, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("applicationName") String applicationName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ApplicationInner parameters, @HeaderParam("Accept") String accept, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationInner parameters, Context context); + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ApplicationInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("applicationName") String applicationName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("maxresults") Integer maxresults, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Adds an application to the specified Batch account. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account along with {@link Response} on successful - * completion of {@link Mono}. + * @return information about the specified application along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String accountName, - String applicationName, ApplicationInner parameters) { + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String applicationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName 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 (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Adds an application to the specified Batch account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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(String resourceGroupName, String accountName, - String applicationName, ApplicationInner parameters, 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.")); @@ -201,263 +215,123 @@ private Mono> createWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter applicationName 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 (parameters != null) { - parameters.validate(); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Adds an application to the specified Batch account. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 contains information about an application in a Batch account on successful completion of {@link Mono}. + * @return information about the specified application on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accountName, String applicationName) { - final ApplicationInner parameters = null; - return createWithResponseAsync(resourceGroupName, accountName, applicationName, parameters) + private Mono getAsync(String resourceGroupName, String accountName, String applicationName) { + return getWithResponseAsync(resourceGroupName, accountName, applicationName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Adds an application to the specified Batch account. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse(String resourceGroupName, String accountName, - String applicationName, ApplicationInner parameters, Context context) { - return createWithResponseAsync(resourceGroupName, accountName, applicationName, parameters, context).block(); - } - - /** - * Adds an application to the specified Batch account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the 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 contains information about an application in a Batch account. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner create(String resourceGroupName, String accountName, String applicationName) { - final ApplicationInner parameters = null; - return createWithResponse(resourceGroupName, accountName, applicationName, parameters, Context.NONE).getValue(); - } - - /** - * Deletes an application. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return information about the specified application along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String applicationName) { + public Response getWithResponse(String resourceGroupName, String accountName, + String applicationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, accountName, - applicationName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes an application. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, - String applicationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes an application. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String applicationName) { - return deleteWithResponseAsync(resourceGroupName, accountName, applicationName) - .flatMap(ignored -> Mono.empty()); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, applicationName, accept, context); } /** - * Deletes an application. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the account. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, accountName, applicationName, context).block(); - } - - /** - * Deletes an application. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 specified application. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String applicationName) { - deleteWithResponse(resourceGroupName, accountName, applicationName, Context.NONE); + public ApplicationInner get(String resourceGroupName, String accountName, String applicationName) { + return getWithResponse(resourceGroupName, accountName, applicationName, Context.NONE).getValue(); } /** - * Gets information about the specified application. + * Adds an application to the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified application along with {@link Response} on successful completion of - * {@link Mono}. + * @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> getWithResponseAsync(String resourceGroupName, String accountName, - String applicationName) { + private Mono> createWithResponseAsync(String resourceGroupName, String accountName, + String applicationName, ApplicationInner parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, accountName, - applicationName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about the specified application. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param applicationName The name of the application. This must be unique within the 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 specified application along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String applicationName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -470,72 +344,116 @@ private Mono> getWithResponseAsync(String resourceGro return Mono .error(new IllegalArgumentException("Parameter applicationName 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 (parameters != null) { + parameters.validate(); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, accept, parameters, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets information about the specified application. + * Adds an application to the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 specified application on successful completion of {@link Mono}. + * @return contains information about an application in a Batch account on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String applicationName) { - return getWithResponseAsync(resourceGroupName, accountName, applicationName) + private Mono createAsync(String resourceGroupName, String accountName, String applicationName) { + final ApplicationInner parameters = null; + return createWithResponseAsync(resourceGroupName, accountName, applicationName, parameters) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Gets information about the specified application. + * Adds an application to the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the specified application along with {@link Response}. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String applicationName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, applicationName, context).block(); + public Response createWithResponse(String resourceGroupName, String accountName, + String applicationName, ApplicationInner parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (applicationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + if (parameters != null) { + parameters.validate(); + } + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, accept, parameters, + context); } /** - * Gets information about the specified application. + * Adds an application to the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 specified application. + * @return contains information about an application in a Batch account. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner get(String resourceGroupName, String accountName, String applicationName) { - return getWithResponse(resourceGroupName, accountName, applicationName, Context.NONE).getValue(); + public ApplicationInner create(String resourceGroupName, String accountName, String applicationName) { + final ApplicationInner parameters = null; + return createWithResponse(resourceGroupName, accountName, applicationName, parameters, Context.NONE).getValue(); } /** * Updates settings for the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -551,6 +469,10 @@ private Mono> updateWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -562,172 +484,250 @@ private Mono> updateWithResponseAsync(String resource return Mono .error(new IllegalArgumentException("Parameter applicationName 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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates settings for the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param applicationName The name of the application. This must be unique within the account. + * @param parameters The parameters for the request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return contains information about an application in a Batch account on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String accountName, String applicationName, + ApplicationInner parameters) { + return updateWithResponseAsync(resourceGroupName, accountName, applicationName, parameters) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Updates settings for the specified application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account along with {@link Response} on successful - * completion of {@link Mono}. + * @return contains information about an application in a Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, + public Response updateWithResponse(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (applicationName == null) { - return Mono - .error(new IllegalArgumentException("Parameter applicationName 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, accountName, applicationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, contentType, accept, + parameters, context); } /** * Updates settings for the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account on successful completion of {@link Mono}. + * @return contains information about an application in a Batch account. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String applicationName, + public ApplicationInner update(String resourceGroupName, String accountName, String applicationName, ApplicationInner parameters) { - return updateWithResponseAsync(resourceGroupName, accountName, applicationName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return updateWithResponse(resourceGroupName, accountName, applicationName, parameters, Context.NONE).getValue(); } /** - * Updates settings for the specified application. + * Deletes an application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account along with {@link Response}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String accountName, - String applicationName, ApplicationInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, applicationName, parameters, context).block(); + private Mono> deleteWithResponseAsync(String resourceGroupName, String accountName, + String applicationName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (applicationName == null) { + return Mono + .error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); + } + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Updates settings for the specified application. + * Deletes an application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an application in a Batch account. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ApplicationInner update(String resourceGroupName, String accountName, String applicationName, - ApplicationInner parameters) { - return updateWithResponse(resourceGroupName, accountName, applicationName, parameters, Context.NONE).getValue(); + private Mono deleteAsync(String resourceGroupName, String accountName, String applicationName) { + return deleteWithResponseAsync(resourceGroupName, accountName, applicationName) + .flatMap(ignored -> Mono.empty()); } /** - * Lists all of the applications in the specified account. + * Deletes an application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param applicationName The name of the application. This must be unique within the account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list applications along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer maxresults) { + public Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (applicationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), resourceGroupName, accountName, maxresults, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, applicationName, context); + } + + /** + * Deletes an application. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param applicationName The name of the application. This must be unique within the account. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String accountName, String applicationName) { + deleteWithResponse(resourceGroupName, accountName, applicationName, Context.NONE); } /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. - * @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. @@ -736,11 +736,15 @@ private Mono> listSinglePageAsync(String resourc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceGroupName, String accountName, - Integer maxresults, Context context) { + Integer maxresults) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -748,24 +752,23 @@ private Mono> listSinglePageAsync(String resourc if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), resourceGroupName, accountName, maxresults, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, 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())); } /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -781,8 +784,11 @@ private PagedFlux listAsync(String resourceGroupName, String a /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -798,27 +804,96 @@ private PagedFlux listAsync(String resourceGroupName, String a /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String accountName, + Integer maxresults) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the applications in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list applications as paginated response with {@link PagedFlux}. + * @return the result of performing list applications along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String accountName, Integer maxresults, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, accountName, maxresults, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String accountName, + Integer maxresults, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -827,14 +902,18 @@ private PagedFlux listAsync(String resourceGroupName, String a @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName) { final Integer maxresults = null; - return new PagedIterable<>(listAsync(resourceGroupName, accountName, maxresults)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, maxresults), + nextLink -> listNextSinglePage(nextLink)); } /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -845,7 +924,8 @@ public PagedIterable list(String resourceGroupName, String acc @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(String resourceGroupName, String accountName, Integer maxresults, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, accountName, maxresults, context)); + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, accountName, maxresults, context), + nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -874,6 +954,33 @@ private Mono> listNextSinglePageAsync(String nex .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the result of performing list applications along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -882,22 +989,25 @@ 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the result of performing list applications along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(ApplicationsClientImpl.class); } 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 221e7244875f..023cd86149c1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -27,15 +27,6 @@ public ApplicationsImpl(ApplicationsClient innerClient, this.serviceManager = serviceManager; } - public Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, applicationName, context); - } - - public void delete(String resourceGroupName, String accountName, String applicationName) { - this.serviceClient().delete(resourceGroupName, accountName, applicationName); - } - public Response getWithResponse(String resourceGroupName, String accountName, String applicationName, Context context) { Response inner @@ -57,6 +48,15 @@ public Application get(String resourceGroupName, String accountName, String appl } } + public Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, accountName, applicationName, context); + } + + public void delete(String resourceGroupName, String accountName, String applicationName) { + this.serviceClient().delete(resourceGroupName, accountName, applicationName); + } + public PagedIterable list(String resourceGroupName, String accountName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, accountName); return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationImpl(inner1, this.manager())); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java index 67c09d27caa3..6d4362594554 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.BatchAccountInner; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; @@ -65,6 +66,10 @@ public BatchAccountIdentity identity() { return this.innerModel().identity(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String accountEndpoint() { return this.innerModel().accountEndpoint(); } @@ -198,7 +203,6 @@ public BatchAccount create(Context context) { } BatchAccountImpl(String name, com.azure.resourcemanager.batch.BatchManager serviceManager) { - this.innerObject = new BatchAccountInner(); this.serviceManager = serviceManager; this.accountName = name; this.createParameters = new BatchAccountCreateParameters(); @@ -366,6 +370,6 @@ public BatchAccountImpl withAllowedAuthenticationModes(List } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountKeysImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountKeysImpl.java index 31d3588eb9a1..e53c72693cbb 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountKeysImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountKeysImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; 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 92d6c3ab4263..2f2b46d261ee 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -29,8 +29,10 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.batch.fluent.BatchAccountsClient; @@ -38,12 +40,12 @@ 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.implementation.models.BatchAccountListResult; +import com.azure.resourcemanager.batch.implementation.models.DetectorListResult; +import com.azure.resourcemanager.batch.implementation.models.OutboundEnvironmentEndpointCollection; 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; import reactor.core.publisher.Mono; @@ -77,131 +79,269 @@ public final class BatchAccountsClientImpl implements BatchAccountsClient { * The interface defining all the services for BatchManagementClientBatchAccounts to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientBatchAccounts") public interface BatchAccountsService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> create(@HostParam("$host") String endpoint, + Mono>> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchAccountCreateParameters parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BatchAccountCreateParameters parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchAccountCreateParameters parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchAccountUpdateParameters parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BatchAccountUpdateParameters parameters, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchAccountUpdateParameters parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts") + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/batchAccounts") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys") @ExpectedResponses({ 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> synchronizeAutoStorageKeys(@HostParam("$host") String endpoint, + Mono> synchronizeAutoStorageKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys") + @ExpectedResponses({ 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response synchronizeAutoStorageKeysSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> regenerateKey(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchAccountRegenerateKeyParameters parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateKey(@HostParam("$host") String endpoint, + Response regenerateKeySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BatchAccountRegenerateKeyParameters parameters, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getKeys(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BatchAccountRegenerateKeyParameters parameters, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getKeys(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + Response getKeysSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/detectors") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpoints( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints") @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, + Response listOutboundNetworkDependenciesEndpointsSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.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, + Mono> getDetector(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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/{accountName}/outboundNetworkDependenciesEndpoints") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/detectors/{detectorId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpoints( - @HostParam("$host") String endpoint, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("accountName") String accountName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Response getDetectorSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @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/{accountName}/detectors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listDetectors(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/detectors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listDetectorsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listOutboundNetworkDependenciesEndpointsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listOutboundNetworkDependenciesEndpointsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -209,41 +349,43 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDetectorsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpointsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listDetectorsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and - * should instead be updated with the Update Batch Account API. + * Gets information about the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For * example: http://accountname.region.batch.azure.com/. - * @param parameters Additional parameters for account creation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response} on successful completion of + * @return information about the specified Batch account along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createWithResponseAsync(String resourceGroupName, String accountName, - BatchAccountCreateParameters parameters) { + private Mono> getByResourceGroupWithResponseAsync(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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -251,33 +393,100 @@ private Mono>> createWithResponseAsync(String resource 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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @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 specified Batch account along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + } + + /** + * Gets information about the specified Batch account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BatchAccountInner getByResourceGroup(String resourceGroupName, String accountName) { + return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. - * @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. @@ -286,11 +495,15 @@ private Mono>> createWithResponseAsync(String resource */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createWithResponseAsync(String resourceGroupName, String accountName, - BatchAccountCreateParameters parameters, Context context) { + BatchAccountCreateParameters parameters) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -298,26 +511,23 @@ private Mono>> createWithResponseAsync(String resource if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, accountName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -326,21 +536,47 @@ private Mono>> createWithResponseAsync(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 {@link PollerFlux} for polling of contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response}. */ - @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, this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String accountName, + BatchAccountCreateParameters parameters) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, parameters, + Context.NONE); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -350,23 +586,46 @@ 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 the {@link PollerFlux} for polling of contains information about an Azure Batch account. + * @return contains information about an Azure Batch account along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchAccountInner> beginCreateAsync(String resourceGroupName, - String accountName, BatchAccountCreateParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createWithResponseAsync(resourceGroupName, accountName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BatchAccountInner.class, BatchAccountInner.class, context); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response createWithResponse(String resourceGroupName, String accountName, + BatchAccountCreateParameters parameters, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, parameters, context); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -375,25 +634,26 @@ 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 the {@link SyncPoller} for polling of contains information about an Azure Batch account. + * @return the {@link PollerFlux} for polling of contains information about an Azure Batch account. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchAccountInner> beginCreate(String resourceGroupName, + private PollerFlux, BatchAccountInner> beginCreateAsync(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { - return this.beginCreateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); + Mono>> mono = createWithResponseAsync(resourceGroupName, accountName, parameters); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BatchAccountInner.class, BatchAccountInner.class, this.client.getContext()); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. - * @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. @@ -401,43 +661,46 @@ public SyncPoller, BatchAccountInner> beginCreate( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchAccountInner> beginCreate(String resourceGroupName, - String accountName, BatchAccountCreateParameters parameters, Context context) { - return this.beginCreateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); + String accountName, BatchAccountCreateParameters parameters) { + Response response = createWithResponse(resourceGroupName, accountName, parameters); + return this.client.getLroResult(response, BatchAccountInner.class, + BatchAccountInner.class, Context.NONE); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. + * @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 contains information about an Azure Batch account on successful completion of {@link Mono}. + * @return the {@link SyncPoller} for polling of contains information about an Azure Batch account. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accountName, - BatchAccountCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, accountName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BatchAccountInner> beginCreate(String resourceGroupName, + String accountName, BatchAccountCreateParameters parameters, Context context) { + Response response = createWithResponse(resourceGroupName, accountName, parameters, context); + return this.client.getLroResult(response, BatchAccountInner.class, + BatchAccountInner.class, context); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. - * @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. @@ -445,8 +708,8 @@ private Mono createAsync(String resourceGroupName, String acc */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createAsync(String resourceGroupName, String accountName, - BatchAccountCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, accountName, parameters, context).last() + BatchAccountCreateParameters parameters) { + return beginCreateAsync(resourceGroupName, accountName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } @@ -454,7 +717,7 @@ private Mono createAsync(String resourceGroupName, String acc * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -468,14 +731,14 @@ private Mono createAsync(String resourceGroupName, String acc @ServiceMethod(returns = ReturnType.SINGLE) public BatchAccountInner create(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { - return createAsync(resourceGroupName, accountName, parameters).block(); + return beginCreate(resourceGroupName, accountName, parameters).getFinalResult(); } /** * Creates a new Batch account with the specified parameters. Existing accounts cannot be updated with this API and * should instead be updated with the Update Batch Account API. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as * part of the DNS name that is used to access the Batch service in the region in which the account is created. For @@ -490,14 +753,17 @@ public BatchAccountInner create(String resourceGroupName, String accountName, @ServiceMethod(returns = ReturnType.SINGLE) public BatchAccountInner create(String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, Context context) { - return createAsync(resourceGroupName, accountName, parameters, context).block(); + return beginCreate(resourceGroupName, accountName, parameters, context).getFinalResult(); } /** * Updates the properties of an existing Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -512,49 +778,10 @@ private Mono> updateWithResponseAsync(String resourc return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the properties of an existing Batch account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param parameters Additional parameters for account update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about an Azure Batch account along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String accountName, - BatchAccountUpdateParameters parameters, 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.")); @@ -562,26 +789,26 @@ private Mono> updateWithResponseAsync(String resourc if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, accountName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates the properties of an existing Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -598,8 +825,11 @@ private Mono updateAsync(String resourceGroupName, String acc /** * Updates the properties of an existing Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account update. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -610,14 +840,44 @@ private Mono updateAsync(String resourceGroupName, String acc @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String accountName, BatchAccountUpdateParameters parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, parameters, context); } /** * Updates the properties of an existing Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account update. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -633,8 +893,11 @@ public BatchAccountInner update(String resourceGroupName, String accountName, /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -646,6 +909,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -653,94 +920,115 @@ private Mono>> deleteWithResponseAsync(String resource if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the specified 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - Context context) { + private Response deleteWithResponse(String resourceGroupName, String accountName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, accountName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, Context.NONE); } /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @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, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context); } /** * Deletes the specified 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, context); + 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); + this.client.getContext()); } /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -748,14 +1036,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { - return this.beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, accountName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -765,14 +1057,18 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, accountName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -786,39 +1082,28 @@ private Mono deleteAsync(String resourceGroupName, String accountName) { /** * Deletes the specified 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the specified Batch account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String accountName) { - deleteAsync(resourceGroupName, accountName).block(); + beginDelete(resourceGroupName, accountName).getFinalResult(); } /** * Deletes the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -826,127 +1111,156 @@ public void delete(String resourceGroupName, String accountName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public void delete(String resourceGroupName, String accountName, Context context) { - deleteAsync(resourceGroupName, accountName, context).block(); + beginDelete(resourceGroupName, accountName, context).getFinalResult(); } /** - * Gets information about the specified Batch account. + * Gets information about the Batch accounts associated with the specified resource group. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @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> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accountName) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - accountName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 specified Batch account. + * Gets information about the Batch accounts associated with the specified resource group. * - * @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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response} on successful completion of - * {@link Mono}. + * @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) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Gets information about the Batch accounts associated with the specified resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String accountName, Context context) { + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified Batch account. + * Gets information about the Batch accounts associated with the specified resource group. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 specified Batch account on successful completion of {@link Mono}. + * @return information about the Batch accounts associated with the specified resource group along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified Batch account. + * Gets information about the Batch accounts associated with the specified resource group. * - * @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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Gets information about the specified Batch account. + * Gets information about the Batch accounts associated with the specified resource group. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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 specified Batch account. + * @return information about the Batch accounts associated with the specified resource group as paginated response + * with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchAccountInner getByResourceGroup(String resourceGroupName, String accountName) { - return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** @@ -976,35 +1290,6 @@ private Mono> listSinglePageAsync() { .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets information about the Batch accounts associated with the subscription. - * - * @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 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) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** * Gets information about the Batch accounts associated with the subscription. * @@ -1021,185 +1306,94 @@ private PagedFlux listAsync() { /** * Gets information about the Batch accounts associated with the subscription. * - * @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 Batch accounts associated with the subscription as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets information about the Batch accounts associated with the subscription. - * - * @throws 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 as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Gets information about the Batch accounts associated with the subscription. - * - * @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 Batch accounts associated with the subscription as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Gets information about the Batch accounts associated with the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains 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 Batch accounts associated with the specified resource group along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return information about the Batch accounts associated with the subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + private PagedResponse listSinglePage() { 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the Batch accounts associated with the specified resource group. + * Gets information about the Batch accounts associated with the subscription. * - * @param resourceGroupName The name of the resource group that contains 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 Batch accounts associated with the specified resource group along with - * {@link PagedResponse} on successful completion of {@link Mono}. + * @return information about the Batch accounts associated with the subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { + private PagedResponse listSinglePage(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets information about the Batch accounts associated with the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains 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 Batch accounts associated with the specified resource group as paginated response - * with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Gets information about the Batch accounts associated with the specified resource group. - * - * @param resourceGroupName The name of the resource group that contains 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 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) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the Batch accounts associated with the specified resource group. + * Gets information about the Batch accounts associated with the subscription. * - * @param resourceGroupName The name of the resource group that contains 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 Batch accounts associated with the specified resource group as paginated response - * with {@link PagedIterable}. + * @return information about the Batch accounts associated with the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + public PagedIterable list() { + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Gets information about the Batch accounts associated with the specified resource group. + * Gets information about the Batch accounts associated with the subscription. * - * @param resourceGroupName The name of the resource group that contains 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 Batch accounts associated with the specified resource group as paginated response - * with {@link PagedIterable}. + * @return information about the Batch accounts associated with the subscription as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + public PagedIterable list(Context context) { + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1212,43 +1406,10 @@ private Mono> synchronizeAutoStorageKeysWithResponseAsync(String return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.synchronizeAutoStorageKeys(this.client.getEndpoint(), resourceGroupName, - accountName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage - * key authentication is being used. - * - * @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 the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> synchronizeAutoStorageKeysWithResponseAsync(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.")); @@ -1256,22 +1417,21 @@ private Mono> synchronizeAutoStorageKeysWithResponseAsync(String if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.synchronizeAutoStorageKeys(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.synchronizeAutoStorageKeys(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1287,8 +1447,11 @@ private Mono synchronizeAutoStorageKeysAsync(String resourceGroupName, Str * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -1298,15 +1461,37 @@ private Mono synchronizeAutoStorageKeysAsync(String resourceGroupName, Str @ServiceMethod(returns = ReturnType.SINGLE) public Response synchronizeAutoStorageKeysWithResponse(String resourceGroupName, String accountName, Context context) { - return synchronizeAutoStorageKeysWithResponseAsync(resourceGroupName, accountName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + return service.synchronizeAutoStorageKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, context); } /** * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1324,8 +1509,11 @@ public void synchronizeAutoStorageKeys(String resourceGroupName, String accountN * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1339,6 +1527,10 @@ private Mono> regenerateKeyWithResponseAsync(Str return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -1346,19 +1538,17 @@ private Mono> regenerateKeyWithResponseAsync(Str if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } if (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKey(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.regenerateKey(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, parameters, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } @@ -1370,54 +1560,11 @@ private Mono> regenerateKeyWithResponseAsync(Str * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param parameters The type of key to regenerate. - * @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 a set of Azure Batch account keys along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regenerateKeyWithResponseAsync(String resourceGroupName, - String accountName, BatchAccountRegenerateKeyParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regenerateKey(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Regenerates the specified account key for the Batch account. - * - * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the - * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to - * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will - * fail. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1439,8 +1586,11 @@ private Mono regenerateKeyAsync(String resourceGroupName, * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1451,7 +1601,34 @@ private Mono regenerateKeyAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeyWithResponse(String resourceGroupName, String accountName, BatchAccountRegenerateKeyParameters parameters, Context context) { - return regenerateKeyWithResponseAsync(resourceGroupName, accountName, parameters, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.regenerateKeySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, contentType, accept, parameters, context); } /** @@ -1462,8 +1639,11 @@ public Response regenerateKeyWithResponse(String resource * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1483,12 +1663,18 @@ public BatchAccountKeysInner regenerateKey(String resourceGroupName, String acco * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response} on successful completion of {@link Mono}. + * @return the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey' along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getKeysWithResponseAsync(String resourceGroupName, @@ -1497,46 +1683,10 @@ private Mono> getKeysWithResponseAsync(String re return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getKeys(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the account keys for the specified Batch account. - * - * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the - * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to - * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. - * - * @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 a set of Azure Batch account keys along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getKeysWithResponseAsync(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.")); @@ -1544,14 +1694,11 @@ private Mono> getKeysWithResponseAsync(String re if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getKeys(this.client.getEndpoint(), resourceGroupName, accountName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.getKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1561,12 +1708,18 @@ private Mono> getKeysWithResponseAsync(String re * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey' on + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getKeysAsync(String resourceGroupName, String accountName) { @@ -1581,18 +1734,44 @@ private Mono getKeysAsync(String resourceGroupName, Strin * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 a set of Azure Batch account keys along with {@link Response}. + * @return the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey' along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getKeysWithResponse(String resourceGroupName, String accountName, Context context) { - return getKeysWithResponseAsync(resourceGroupName, accountName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); } /** @@ -1602,12 +1781,17 @@ public Response getKeysWithResponse(String resourceGroupN * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. */ @ServiceMethod(returns = ReturnType.SINGLE) public BatchAccountKeysInner getKeys(String resourceGroupName, String accountName) { @@ -1615,157 +1799,228 @@ public BatchAccountKeysInner getKeys(String resourceGroupName, String accountNam } /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return values returned by the List operation along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync(String resourceGroupName, - String accountName) { + private Mono> + listOutboundNetworkDependenciesEndpointsSinglePageAsync(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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } 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(), + .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, accept, + context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return values returned by the List operation as paginated response with {@link PagedFlux}. */ - @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)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, accountName), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); } /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return values returned by the List operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, accountName), - nextLink -> listDetectorsNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listOutboundNetworkDependenciesEndpointsSinglePage(String resourceGroupName, String accountName) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listOutboundNetworkDependenciesEndpointsSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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}. + * @return values returned by the List operation along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync(String resourceGroupName, String accountName, - Context context) { - return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, accountName, context), - nextLink -> listDetectorsNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listOutboundNetworkDependenciesEndpointsSinglePage( + String resourceGroupName, String accountName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listOutboundNetworkDependenciesEndpointsSync( + this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, + accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors(String resourceGroupName, String accountName) { - return new PagedIterable<>(listDetectorsAsync(resourceGroupName, accountName)); + public PagedIterable + listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String accountName) { + return new PagedIterable<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePage(resourceGroupName, accountName), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePage(nextLink)); } /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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}. + * @return values returned by the List operation 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)); + public PagedIterable + listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String accountName, Context context) { + return new PagedIterable<>( + () -> listOutboundNetworkDependenciesEndpointsSinglePage(resourceGroupName, accountName, context), + nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePage(nextLink, 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -1780,14 +2035,14 @@ private Mono> getDetectorWithResponseAsync(Strin 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } @@ -1796,275 +2051,366 @@ private Mono> getDetectorWithResponseAsync(Strin } 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)) + .withContext(context -> service.getDetector(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @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(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the given detector for a given Batch account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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}. + * @return information about the given detector for a given Batch account along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync(String resourceGroupName, - String accountName, String detectorId, Context context) { + public Response getDetectorWithResponse(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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); + return service.getDetectorSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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}. + * @return information about the given detector for a given Batch account. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync(String resourceGroupName, String accountName, - String detectorId) { - return getDetectorWithResponseAsync(resourceGroupName, accountName, detectorId) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public DetectorResponseInner getDetector(String resourceGroupName, String accountName, String detectorId) { + return getDetectorWithResponse(resourceGroupName, accountName, detectorId, Context.NONE).getValue(); } /** - * Gets information about the given detector for a given Batch account. + * 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 detectorId The name of the detector. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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) - public Response getDetectorWithResponse(String resourceGroupName, String accountName, - String detectorId, Context context) { - return getDetectorWithResponseAsync(resourceGroupName, accountName, detectorId, context).block(); + 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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDetectors(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Gets information about the given detector for a given Batch account. + * 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 detectorId The name of the detector. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. + * @return information about the detectors available for a given Batch account as paginated response with + * {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DetectorResponseInner getDetector(String resourceGroupName, String accountName, String detectorId) { - return getDetectorWithResponse(resourceGroupName, accountName, detectorId, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDetectorsAsync(String resourceGroupName, String accountName) { + return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, accountName), + nextLink -> listDetectorsNextSinglePageAsync(nextLink)); } /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return information about the detectors available for a given Batch account along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String accountName) { + private PagedResponse listDetectorsSinglePage(String resourceGroupName, String accountName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), - resourceGroupName, accountName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listDetectorsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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}. + * @return information about the detectors available for a given Batch account along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String accountName, - Context context) { + private PagedResponse listDetectorsSinglePage(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesEndpoints(this.client.getEndpoint(), resourceGroupName, accountName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listDetectorsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 as paginated response with {@link PagedFlux}. + * @return information about the detectors available for a given Batch account as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux - listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String accountName) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, accountName), - nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + public PagedIterable listDetectors(String resourceGroupName, String accountName) { + return new PagedIterable<>(() -> listDetectorsSinglePage(resourceGroupName, accountName), + nextLink -> listDetectorsNextSinglePage(nextLink)); } /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 as paginated response with {@link PagedFlux}. + * @return information about the detectors available for a given Batch account as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux - listOutboundNetworkDependenciesEndpointsAsync(String resourceGroupName, String accountName, Context context) { - return new PagedFlux<>( - () -> listOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, accountName, context), - nextLink -> listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + public PagedIterable listDetectors(String resourceGroupName, String accountName, + Context context) { + return new PagedIterable<>(() -> listDetectorsSinglePage(resourceGroupName, accountName, context), + nextLink -> listDetectorsNextSinglePage(nextLink, 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * Get the next page of items. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation as paginated response with {@link PagedIterable}. + * @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.COLLECTION) - public PagedIterable - listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String accountName) { - return new PagedIterable<>(listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, accountName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(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())); } /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the Batch accounts associated with the specified resource group along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param nextLink The URL to get the next list of items. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the Batch accounts associated with the specified resource group along with + * {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable - listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String accountName, Context context) { - return new PagedIterable<>( - listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, accountName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2074,8 +2420,8 @@ public DetectorResponseInner getDetector(String resourceGroupName, String accoun * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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> listNextSinglePageAsync(String nextLink) { @@ -2097,62 +2443,61 @@ private Mono> listNextSinglePageAsync(String ne * Get the next page of items. * * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return information about the Batch accounts associated with the subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return information about the Batch accounts associated with the subscription along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(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())); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Get the next page of items. * * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -2160,8 +2505,8 @@ private Mono> listByResourceGroupNextSinglePage * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { + private Mono> + listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2170,10 +2515,12 @@ private Mono> listByResourceGroupNextSinglePage new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.listOutboundNetworkDependenciesEndpointsNext(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())); } /** @@ -2183,24 +2530,25 @@ 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(String nextLink) { + private PagedResponse + listOutboundNetworkDependenciesEndpointsNextSinglePage(String nextLink) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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())); + Response res = service.listOutboundNetworkDependenciesEndpointsNextSync( + nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2211,24 +2559,25 @@ private Mono> listDetectorsNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse + listOutboundNetworkDependenciesEndpointsNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(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)); + Response res = service + .listOutboundNetworkDependenciesEndpointsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -2238,12 +2587,11 @@ private Mono> listDetectorsNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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> - listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink) { + private Mono> listDetectorsNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } @@ -2253,13 +2601,39 @@ private Mono> listDetectorsNextSinglePageAs } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listOutboundNetworkDependenciesEndpointsNext(nextLink, - this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), + .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 URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the detectors available for a given Batch account along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listDetectorsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listDetectorsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -2268,24 +2642,25 @@ private Mono> listDetectorsNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return information about the detectors available for a given Batch account along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listOutboundNetworkDependenciesEndpointsNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listDetectorsNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listDetectorsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(BatchAccountsClientImpl.class); } 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 d232d5474369..88a084390d87 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -34,14 +34,6 @@ public BatchAccountsImpl(BatchAccountsClient innerClient, this.serviceManager = serviceManager; } - public void deleteByResourceGroup(String resourceGroupName, String accountName) { - this.serviceClient().delete(resourceGroupName, accountName); - } - - public void delete(String resourceGroupName, String accountName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, context); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName, Context context) { Response inner @@ -63,14 +55,12 @@ public BatchAccount getByResourceGroup(String resourceGroupName, String accountN } } - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager())); + public void deleteByResourceGroup(String resourceGroupName, String accountName) { + this.serviceClient().delete(resourceGroupName, accountName); } - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager())); + public void delete(String resourceGroupName, String accountName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, context); } public PagedIterable listByResourceGroup(String resourceGroupName) { @@ -83,6 +73,16 @@ public PagedIterable listByResourceGroup(String resourceGroupName, return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager())); } + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BatchAccountImpl(inner1, this.manager())); + } + public Response synchronizeAutoStorageKeysWithResponse(String resourceGroupName, String accountName, Context context) { return this.serviceClient().synchronizeAutoStorageKeysWithResponse(resourceGroupName, accountName, context); @@ -135,16 +135,20 @@ public BatchAccountKeys getKeys(String resourceGroupName, String accountName) { } } - public PagedIterable listDetectors(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String accountName) { + PagedIterable inner + = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); } - public PagedIterable listDetectors(String resourceGroupName, String accountName, - Context context) { - PagedIterable inner - = this.serviceClient().listDetectors(resourceGroupName, accountName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String accountName, Context context) { + PagedIterable inner + = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); } public Response getDetectorWithResponse(String resourceGroupName, String accountName, @@ -168,20 +172,16 @@ public DetectorResponse getDetector(String resourceGroupName, String accountName } } - public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String accountName) { - PagedIterable inner - = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + public PagedIterable listDetectors(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); } - public PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String accountName, Context context) { - PagedIterable inner - = this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, accountName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + public PagedIterable listDetectors(String resourceGroupName, String accountName, + Context context) { + PagedIterable inner + = this.serviceClient().listDetectors(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); } public BatchAccount getById(String id) { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchLocationQuotaImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchLocationQuotaImpl.java index e6e048c55c77..849ed2649481 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchLocationQuotaImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchLocationQuotaImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java index 7e6c80cb53e5..b6661c9ecc55 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -20,34 +20,34 @@ @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) + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Sets Service host. * - * @param subscriptionId the subscriptionId value. + * @param endpoint the endpoint value. * @return the BatchManagementClientBuilder. */ - public BatchManagementClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public BatchManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. + * @param subscriptionId the subscriptionId value. * @return the BatchManagementClientBuilder. */ - public BatchManagementClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public BatchManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -132,7 +132,7 @@ public BatchManagementClientImpl buildClient() { ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); BatchManagementClientImpl client = new BatchManagementClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java index 4b2cb51be64e..5fbee3cf5133 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -13,21 +13,23 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollerFactory; import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; 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.BatchManagementClient; -import com.azure.resourcemanager.batch.fluent.CertificatesClient; import com.azure.resourcemanager.batch.fluent.LocationsClient; import com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient; import com.azure.resourcemanager.batch.fluent.OperationsClient; @@ -49,26 +51,12 @@ @ServiceClient(builder = BatchManagementClientBuilder.class) public final class BatchManagementClientImpl implements BatchManagementClient { /** - * The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). - */ - private final String subscriptionId; - - /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -77,12 +65,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -90,6 +78,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -132,6 +134,20 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** * The BatchAccountsClient object to access its operations. */ @@ -174,48 +190,6 @@ public ApplicationsClient getApplications() { return this.applications; } - /** - * The LocationsClient object to access its operations. - */ - private final LocationsClient locations; - - /** - * Gets the LocationsClient object to access its operations. - * - * @return the LocationsClient object. - */ - public LocationsClient getLocations() { - return this.locations; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The CertificatesClient object to access its operations. - */ - private final CertificatesClient certificates; - - /** - * Gets the CertificatesClient object to access its operations. - * - * @return the CertificatesClient object. - */ - public CertificatesClient getCertificates() { - return this.certificates; - } - /** * The PrivateLinkResourcesClient object to access its operations. */ @@ -272,6 +246,20 @@ public NetworkSecurityPerimetersClient getNetworkSecurityPerimeters() { return this.networkSecurityPerimeters; } + /** + * The LocationsClient object to access its operations. + */ + private final LocationsClient locations; + + /** + * Gets the LocationsClient object to access its operations. + * + * @return the LocationsClient object. + */ + public LocationsClient getLocations() { + return this.locations; + } + /** * Initializes an instance of BatchManagementClient client. * @@ -279,28 +267,26 @@ public NetworkSecurityPerimetersClient getNetworkSecurityPerimeters() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000). - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ BatchManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2024-07-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2025-06-01"; + this.operations = new OperationsClientImpl(this); this.batchAccounts = new BatchAccountsClientImpl(this); this.applicationPackages = new ApplicationPackagesClientImpl(this); this.applications = new ApplicationsClientImpl(this); - this.locations = new LocationsClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.certificates = new CertificatesClientImpl(this); this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); this.pools = new PoolsClientImpl(this); this.networkSecurityPerimeters = new NetworkSecurityPerimetersClientImpl(this); + this.locations = new LocationsClientImpl(this); } /** @@ -340,6 +326,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java deleted file mode 100644 index 412de5801c50..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificateImpl.java +++ /dev/null @@ -1,276 +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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; -import com.azure.resourcemanager.batch.models.Certificate; -import com.azure.resourcemanager.batch.models.CertificateCreateOrUpdateParameters; -import com.azure.resourcemanager.batch.models.CertificateFormat; -import com.azure.resourcemanager.batch.models.CertificateProvisioningState; -import com.azure.resourcemanager.batch.models.DeleteCertificateError; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class CertificateImpl implements Certificate, Certificate.Definition, Certificate.Update { - private CertificateInner innerObject; - - private final com.azure.resourcemanager.batch.BatchManager 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 Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public CertificateProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public OffsetDateTime provisioningStateTransitionTime() { - return this.innerModel().provisioningStateTransitionTime(); - } - - public CertificateProvisioningState previousProvisioningState() { - return this.innerModel().previousProvisioningState(); - } - - public OffsetDateTime previousProvisioningStateTransitionTime() { - return this.innerModel().previousProvisioningStateTransitionTime(); - } - - public String publicData() { - return this.innerModel().publicData(); - } - - public DeleteCertificateError deleteCertificateError() { - return this.innerModel().deleteCertificateError(); - } - - public String thumbprintAlgorithm() { - return this.innerModel().thumbprintAlgorithm(); - } - - public String thumbprint() { - return this.innerModel().thumbprint(); - } - - public CertificateFormat format() { - return this.innerModel().format(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CertificateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.batch.BatchManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String accountName; - - private String certificateName; - - private String createIfMatch; - - private String createIfNoneMatch; - - private CertificateCreateOrUpdateParameters createParameters; - - private String updateIfMatch; - - private CertificateCreateOrUpdateParameters updateParameters; - - public CertificateImpl withExistingBatchAccount(String resourceGroupName, String accountName) { - this.resourceGroupName = resourceGroupName; - this.accountName = accountName; - return this; - } - - public Certificate create() { - this.innerObject = serviceManager.serviceClient() - .getCertificates() - .createWithResponse(resourceGroupName, accountName, certificateName, createParameters, createIfMatch, - createIfNoneMatch, Context.NONE) - .getValue(); - return this; - } - - public Certificate create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCertificates() - .createWithResponse(resourceGroupName, accountName, certificateName, createParameters, createIfMatch, - createIfNoneMatch, context) - .getValue(); - return this; - } - - CertificateImpl(String name, com.azure.resourcemanager.batch.BatchManager serviceManager) { - this.innerObject = new CertificateInner(); - this.serviceManager = serviceManager; - this.certificateName = name; - this.createIfMatch = null; - this.createIfNoneMatch = null; - this.createParameters = new CertificateCreateOrUpdateParameters(); - } - - public CertificateImpl update() { - this.updateIfMatch = null; - this.updateParameters = new CertificateCreateOrUpdateParameters(); - return this; - } - - public Certificate apply() { - this.innerObject = serviceManager.serviceClient() - .getCertificates() - .updateWithResponse(resourceGroupName, accountName, certificateName, updateParameters, updateIfMatch, - Context.NONE) - .getValue(); - return this; - } - - public Certificate apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCertificates() - .updateWithResponse(resourceGroupName, accountName, certificateName, updateParameters, updateIfMatch, - context) - .getValue(); - return this; - } - - CertificateImpl(CertificateInner innerObject, com.azure.resourcemanager.batch.BatchManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "batchAccounts"); - this.certificateName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "certificates"); - } - - public Certificate refresh() { - this.innerObject = serviceManager.serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, accountName, certificateName, Context.NONE) - .getValue(); - return this; - } - - public Certificate refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, accountName, certificateName, context) - .getValue(); - return this; - } - - public Response cancelDeletionWithResponse(Context context) { - return serviceManager.certificates() - .cancelDeletionWithResponse(resourceGroupName, accountName, certificateName, context); - } - - public Certificate cancelDeletion() { - return serviceManager.certificates().cancelDeletion(resourceGroupName, accountName, certificateName); - } - - public CertificateImpl withTags(Map tags) { - if (isInCreateMode()) { - this.createParameters.withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public CertificateImpl withPassword(String password) { - if (isInCreateMode()) { - this.createParameters.withPassword(password); - return this; - } else { - this.updateParameters.withPassword(password); - return this; - } - } - - public CertificateImpl withThumbprintAlgorithm(String thumbprintAlgorithm) { - if (isInCreateMode()) { - this.createParameters.withThumbprintAlgorithm(thumbprintAlgorithm); - return this; - } else { - this.updateParameters.withThumbprintAlgorithm(thumbprintAlgorithm); - return this; - } - } - - public CertificateImpl withThumbprint(String thumbprint) { - if (isInCreateMode()) { - this.createParameters.withThumbprint(thumbprint); - return this; - } else { - this.updateParameters.withThumbprint(thumbprint); - return this; - } - } - - public CertificateImpl withFormat(CertificateFormat format) { - if (isInCreateMode()) { - this.createParameters.withFormat(format); - return this; - } else { - this.updateParameters.withFormat(format); - return this; - } - } - - public CertificateImpl withIfMatch(String ifMatch) { - if (isInCreateMode()) { - this.createIfMatch = ifMatch; - return this; - } else { - this.updateIfMatch = ifMatch; - return this; - } - } - - public CertificateImpl withIfNoneMatch(String ifNoneMatch) { - this.createIfNoneMatch = ifNoneMatch; - return this; - } - - public CertificateImpl withData(String data) { - this.updateParameters.withData(data); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} 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 deleted file mode 100644 index 070ee753c2ac..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java +++ /dev/null @@ -1,1385 +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.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.batch.fluent.CertificatesClient; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; -import com.azure.resourcemanager.batch.models.CertificateCreateOrUpdateParameters; -import com.azure.resourcemanager.batch.models.CertificatesCancelDeletionResponse; -import com.azure.resourcemanager.batch.models.CertificatesCreateResponse; -import com.azure.resourcemanager.batch.models.CertificatesGetResponse; -import com.azure.resourcemanager.batch.models.CertificatesUpdateResponse; -import com.azure.resourcemanager.batch.models.ListCertificatesResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in CertificatesClient. - */ -public final class CertificatesClientImpl implements CertificatesClient { - /** - * The proxy service used to perform REST calls. - */ - private final CertificatesService service; - - /** - * The service client containing this operation class. - */ - private final BatchManagementClientImpl client; - - /** - * Initializes an instance of CertificatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CertificatesClientImpl(BatchManagementClientImpl client) { - this.service - = RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for BatchManagementClientCertificates to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") - public interface CertificatesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBatchAccount(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("maxresults") Integer maxresults, @QueryParam("$select") String select, - @QueryParam("$filter") String filter, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono create(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("certificateName") String certificateName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CertificateCreateOrUpdateParameters parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono update(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("certificateName") String certificateName, @HeaderParam("If-Match") String ifMatch, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CertificateCreateOrUpdateParameters parameters, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono cancelDeletion(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBatchAccountNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", - * "properties/provisioningStateTransitionTime", "name". - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> listByBatchAccountSinglePageAsync(String resourceGroupName, - String accountName, Integer maxresults, String select, String filter) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByBatchAccount(this.client.getEndpoint(), resourceGroupName, - accountName, maxresults, select, filter, this.client.getApiVersion(), this.client.getSubscriptionId(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", - * "properties/provisioningStateTransitionTime", "name". - * @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> listByBatchAccountSinglePageAsync(String resourceGroupName, - String accountName, Integer maxresults, String select, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByBatchAccount(this.client.getEndpoint(), resourceGroupName, accountName, maxresults, select, filter, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", - * "properties/provisioningStateTransitionTime", "name". - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName, - Integer maxresults, String select, String filter) { - return new PagedFlux<>( - () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @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 values returned by the List operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName) { - final Integer maxresults = null; - final String select = null; - final String filter = null; - return new PagedFlux<>( - () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", - * "properties/provisioningStateTransitionTime", "name". - * @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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName, - Integer maxresults, String select, String filter, Context context) { - return new PagedFlux<>(() -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, - select, filter, context), nextLink -> listByBatchAccountNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { - final Integer maxresults = null; - final String select = null; - final String filter = null; - return new PagedIterable<>(listByBatchAccountAsync(resourceGroupName, accountName, maxresults, select, filter)); - } - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", - * "properties/provisioningStateTransitionTime", "name". - * @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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, String select, String filter, Context context) { - return new PagedIterable<>( - listByBatchAccountAsync(resourceGroupName, accountName, maxresults, select, filter, context)); - } - - /** - * Creates a new certificate inside the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply - * the operation only if the certificate already exists. If omitted, this operation will always be applied. - * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing - * certificate. Other values will be ignored. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createWithResponseAsync(String resourceGroupName, String accountName, - String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, accountName, - certificateName, ifMatch, ifNoneMatch, this.client.getApiVersion(), this.client.getSubscriptionId(), - parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a new certificate inside the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply - * the operation only if the certificate already exists. If omitted, this operation will always be applied. - * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing - * certificate. Other values will be ignored. - * @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 contains information about a certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createWithResponseAsync(String resourceGroupName, String accountName, - String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, accountName, certificateName, ifMatch, - ifNoneMatch, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Creates a new certificate inside the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createWithResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, - ifNoneMatch).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates a new certificate inside the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used to apply - * the operation only if the certificate already exists. If omitted, this operation will always be applied. - * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an existing - * certificate. Other values will be ignored. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificatesCreateResponse createWithResponse(String resourceGroupName, String accountName, - String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, String ifNoneMatch, - Context context) { - return createWithResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, - ifNoneMatch, context).block(); - } - - /** - * Creates a new certificate inside the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Additional parameters for certificate creation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner create(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters) { - final String ifMatch = null; - final String ifNoneMatch = null; - return createWithResponse(resourceGroupName, accountName, certificateName, parameters, ifMatch, ifNoneMatch, - Context.NONE).getValue(); - } - - /** - * Updates the properties of an existing certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Certificate entity to update. - * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to - * "*" to apply the operation unconditionally. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String accountName, - String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), resourceGroupName, accountName, certificateName, - ifMatch, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the properties of an existing certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Certificate entity to update. - * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to - * "*" to apply the operation unconditionally. - * @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 contains information about a certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String accountName, - String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, accountName, certificateName, ifMatch, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates the properties of an existing certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Certificate entity to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters) { - final String ifMatch = null; - return updateWithResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Updates the properties of an existing certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Certificate entity to update. - * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or set to - * "*" to apply the operation unconditionally. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificatesUpdateResponse updateWithResponse(String resourceGroupName, String accountName, - String certificateName, CertificateCreateOrUpdateParameters parameters, String ifMatch, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, certificateName, parameters, ifMatch, context) - .block(); - } - - /** - * Updates the properties of an existing certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param parameters Certificate entity to update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update(String resourceGroupName, String accountName, String certificateName, - CertificateCreateOrUpdateParameters parameters) { - final String ifMatch = null; - return updateWithResponse(resourceGroupName, accountName, certificateName, parameters, ifMatch, Context.NONE) - .getValue(); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String certificateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, accountName, - certificateName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String certificateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, accountName, certificateName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String certificateName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, certificateName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String certificateName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, certificateName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String certificateName) { - return this.beginDeleteAsync(resourceGroupName, accountName, certificateName).getSyncPoller(); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, - String certificateName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, certificateName, context).getSyncPoller(); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String certificateName) { - return beginDeleteAsync(resourceGroupName, accountName, certificateName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String certificateName, - Context context) { - return beginDeleteAsync(resourceGroupName, accountName, certificateName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String certificateName) { - deleteAsync(resourceGroupName, accountName, certificateName).block(); - } - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String certificateName, Context context) { - deleteAsync(resourceGroupName, accountName, certificateName, context).block(); - } - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, - String certificateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, accountName, - certificateName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, - String certificateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, accountName, certificateName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String certificateName) { - return getWithResponseAsync(resourceGroupName, accountName, certificateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificatesGetResponse getWithResponse(String resourceGroupName, String accountName, String certificateName, - Context context) { - return getWithResponseAsync(resourceGroupName, accountName, certificateName, context).block(); - } - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner get(String resourceGroupName, String accountName, String certificateName) { - return getWithResponse(resourceGroupName, accountName, certificateName, Context.NONE).getValue(); - } - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelDeletionWithResponseAsync(String resourceGroupName, - String accountName, String certificateName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.cancelDeletion(this.client.getEndpoint(), resourceGroupName, accountName, - certificateName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelDeletionWithResponseAsync(String resourceGroupName, - String accountName, String certificateName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.cancelDeletion(this.client.getEndpoint(), resourceGroupName, accountName, certificateName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelDeletionAsync(String resourceGroupName, String accountName, - String certificateName) { - return cancelDeletionWithResponseAsync(resourceGroupName, accountName, certificateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificatesCancelDeletionResponse cancelDeletionWithResponse(String resourceGroupName, String accountName, - String certificateName, Context context) { - return cancelDeletionWithResponseAsync(resourceGroupName, accountName, certificateName, context).block(); - } - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner cancelDeletion(String resourceGroupName, String accountName, String certificateName) { - return cancelDeletionWithResponse(resourceGroupName, accountName, certificateName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) { - 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.listByBatchAccountNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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> listByBatchAccountNextSinglePageAsync(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.listByBatchAccountNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesImpl.java deleted file mode 100644 index 0b10bd0b46f3..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesImpl.java +++ /dev/null @@ -1,181 +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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.batch.fluent.CertificatesClient; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; -import com.azure.resourcemanager.batch.models.Certificate; -import com.azure.resourcemanager.batch.models.Certificates; -import com.azure.resourcemanager.batch.models.CertificatesCancelDeletionResponse; -import com.azure.resourcemanager.batch.models.CertificatesGetResponse; - -public final class CertificatesImpl implements Certificates { - private static final ClientLogger LOGGER = new ClientLogger(CertificatesImpl.class); - - private final CertificatesClient innerClient; - - private final com.azure.resourcemanager.batch.BatchManager serviceManager; - - public CertificatesImpl(CertificatesClient innerClient, - com.azure.resourcemanager.batch.BatchManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().listByBatchAccount(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, String select, String filter, Context context) { - PagedIterable inner = this.serviceClient() - .listByBatchAccount(resourceGroupName, accountName, maxresults, select, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String accountName, String certificateName) { - this.serviceClient().delete(resourceGroupName, accountName, certificateName); - } - - public void delete(String resourceGroupName, String accountName, String certificateName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, certificateName, context); - } - - public Response getWithResponse(String resourceGroupName, String accountName, String certificateName, - Context context) { - CertificatesGetResponse inner - = this.serviceClient().getWithResponse(resourceGroupName, accountName, certificateName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate get(String resourceGroupName, String accountName, String certificateName) { - CertificateInner inner = this.serviceClient().get(resourceGroupName, accountName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response cancelDeletionWithResponse(String resourceGroupName, String accountName, - String certificateName, Context context) { - CertificatesCancelDeletionResponse inner - = this.serviceClient().cancelDeletionWithResponse(resourceGroupName, accountName, certificateName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate cancelDeletion(String resourceGroupName, String accountName, String certificateName) { - CertificateInner inner = this.serviceClient().cancelDeletion(resourceGroupName, accountName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Certificate getById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, certificateName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, accountName, certificateName, context); - } - - public void deleteById(String id) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - this.delete(resourceGroupName, accountName, certificateName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String accountName = ResourceManagerUtils.getValueFromIdByName(id, "batchAccounts"); - if (accountName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'batchAccounts'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - this.delete(resourceGroupName, accountName, certificateName, context); - } - - private CertificatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.batch.BatchManager manager() { - return this.serviceManager; - } - - public CertificateImpl define(String name) { - return new CertificateImpl(name, this.manager()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CheckNameAvailabilityResultImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CheckNameAvailabilityResultImpl.java index 539229c0dc57..4e06e5719f5d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CheckNameAvailabilityResultImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CheckNameAvailabilityResultImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; 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 index f68f381da4ba..71cd3b76af66 100644 --- 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; import com.azure.resourcemanager.batch.models.DetectorResponse; import java.util.Collections; @@ -45,6 +46,10 @@ public Map tags() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String value() { return this.innerModel().value(); } 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 704411e9f6ad..b8dfe8fea176 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -27,12 +27,13 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.fluent.LocationsClient; import com.azure.resourcemanager.batch.fluent.models.BatchLocationQuotaInner; import com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner; import com.azure.resourcemanager.batch.fluent.models.SupportedSkuInner; +import com.azure.resourcemanager.batch.implementation.models.SupportedSkusResult; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.batch.models.SupportedSkusResult; import reactor.core.publisher.Mono; /** @@ -64,42 +65,75 @@ public final class LocationsClientImpl implements LocationsClient { * The interface defining all the services for BatchManagementClientLocations to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientLocations") public interface LocationsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getQuotas(@HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + Mono> getQuotas(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/quotas") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getQuotasSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/virtualMachineSkus") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSupportedVirtualMachineSkus(@HostParam("$host") String endpoint, + Mono> listSupportedVirtualMachineSkus(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("locationName") String locationName, @QueryParam("maxresults") Integer maxresults, - @QueryParam("$filter") String filter, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/virtualMachineSkus") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSupportedVirtualMachineSkusSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @QueryParam("maxresults") Integer maxresults, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, - @PathParam("locationName") String locationName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") CheckNameAvailabilityParameters parameters, - @HeaderParam("Accept") String accept, Context context); + Mono> checkNameAvailability(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityParameters parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Batch/locations/{locationName}/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response checkNameAvailabilitySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("locationName") String locationName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityParameters parameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSupportedVirtualMachineSkusNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSupportedVirtualMachineSkusNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } @@ -119,48 +153,18 @@ private Mono> getQuotasWithResponseAsync(Strin return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getQuotas(this.client.getEndpoint(), locationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the Batch service quotas for the specified subscription at the given location. - * - * @param locationName The region for which to retrieve Batch service quotas. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the 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) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getQuotas(this.client.getEndpoint(), locationName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.getQuotas(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -191,7 +195,23 @@ private Mono getQuotasAsync(String locationName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getQuotasWithResponse(String locationName, Context context) { - return getQuotasWithResponseAsync(locationName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getQuotasSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, accept, context); } /** @@ -227,58 +247,23 @@ private Mono> listSupportedVirtualMachineSkusSi return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName 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 (locationName == null) { + return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listSupportedVirtualMachineSkus(this.client.getEndpoint(), locationName, - maxresults, filter, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listSupportedVirtualMachineSkus(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), locationName, maxresults, filter, accept, + context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Gets the list of Batch supported Virtual Machine VM sizes available at the given location. - * - * @param locationName The region for which to retrieve Batch service supported SKUs. - * @param maxresults The maximum number of items to return in the response. - * @param filter OData filter expression. Valid properties for filtering are "familyName". - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of 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(String locationName, - Integer maxresults, String filter, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSupportedVirtualMachineSkus(this.client.getEndpoint(), locationName, maxresults, filter, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - /** * Gets the list of Batch supported Virtual Machine VM sizes available at the given location. * @@ -316,6 +301,43 @@ private PagedFlux listSupportedVirtualMachineSkusAsync(String nextLink -> listSupportedVirtualMachineSkusNextSinglePageAsync(nextLink)); } + /** + * Gets the list of Batch supported Virtual Machine VM sizes available at the given location. + * + * @param locationName The region for which to retrieve Batch service supported SKUs. + * @param maxresults The maximum number of items to return in the response. + * @param filter OData filter expression. Valid properties for filtering are "familyName". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSupportedVirtualMachineSkusSinglePage(String locationName, + Integer maxresults, String filter) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSupportedVirtualMachineSkusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, maxresults, filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Gets the list of Batch supported Virtual Machine VM sizes available at the given location. * @@ -326,15 +348,32 @@ 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 as paginated - * response with {@link PagedFlux}. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location along with + * {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSupportedVirtualMachineSkusAsync(String locationName, Integer maxresults, - String filter, Context context) { - return new PagedFlux<>( - () -> listSupportedVirtualMachineSkusSinglePageAsync(locationName, maxresults, filter, context), - nextLink -> listSupportedVirtualMachineSkusNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSupportedVirtualMachineSkusSinglePage(String locationName, + Integer maxresults, String filter, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSupportedVirtualMachineSkusSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, maxresults, filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -351,7 +390,8 @@ private PagedFlux listSupportedVirtualMachineSkusAsync(String public PagedIterable listSupportedVirtualMachineSkus(String locationName) { final Integer maxresults = null; final String filter = null; - return new PagedIterable<>(listSupportedVirtualMachineSkusAsync(locationName, maxresults, filter)); + return new PagedIterable<>(() -> listSupportedVirtualMachineSkusSinglePage(locationName, maxresults, filter), + nextLink -> listSupportedVirtualMachineSkusNextSinglePage(nextLink)); } /** @@ -370,7 +410,9 @@ public PagedIterable listSupportedVirtualMachineSkus(String l @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listSupportedVirtualMachineSkus(String locationName, Integer maxresults, String filter, Context context) { - return new PagedIterable<>(listSupportedVirtualMachineSkusAsync(locationName, maxresults, filter, context)); + return new PagedIterable<>( + () -> listSupportedVirtualMachineSkusSinglePage(locationName, maxresults, filter, context), + nextLink -> listSupportedVirtualMachineSkusNextSinglePage(nextLink, context)); } /** @@ -391,60 +433,25 @@ private Mono> checkNameAvailabilityWi return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (locationName == null) { - return Mono.error(new IllegalArgumentException("Parameter locationName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), locationName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks whether the Batch account name is available in the specified region. - * - * @param locationName The desired region for the name check. - * @param parameters Properties needed to check the availability of a name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the CheckNameAvailability operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync(String locationName, - CheckNameAvailabilityParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } if (locationName == null) { return Mono.error(new IllegalArgumentException("Parameter locationName 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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), locationName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil + .withContext( + context -> service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -478,7 +485,30 @@ private Mono checkNameAvailabilityAsync(String @ServiceMethod(returns = ReturnType.SINGLE) public Response checkNameAvailabilityWithResponse(String locationName, CheckNameAvailabilityParameters parameters, Context context) { - return checkNameAvailabilityWithResponseAsync(locationName, parameters, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (locationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter locationName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.checkNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), locationName, contentType, accept, parameters, context); } /** @@ -504,8 +534,8 @@ public CheckNameAvailabilityResultInner checkNameAvailability(String locationNam * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @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> listSupportedVirtualMachineSkusNextSinglePageAsync(String nextLink) { @@ -525,6 +555,34 @@ private Mono> listSupportedVirtualMachineSkusNe .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSupportedVirtualMachineSkusNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res = service.listSupportedVirtualMachineSkusNextSync(nextLink, + this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -533,23 +591,27 @@ 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the list of Batch supported Virtual Machine VM sizes available at the given location along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSupportedVirtualMachineSkusNextSinglePageAsync(String nextLink, + private PagedResponse listSupportedVirtualMachineSkusNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSupportedVirtualMachineSkusNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listSupportedVirtualMachineSkusNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(LocationsClientImpl.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java index 12df995b67bc..df0bfb4e4bd7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimeterConfigurationImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimeterConfigurationImpl.java index b5d1ed9399f9..c128551f1585 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimeterConfigurationImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimeterConfigurationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersClientImpl.java index d31ea431de81..d25451cc1da6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -25,13 +25,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient; import com.azure.resourcemanager.batch.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationListResult; +import com.azure.resourcemanager.batch.implementation.models.NetworkSecurityPerimeterConfigurationListResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -65,61 +67,106 @@ public final class NetworkSecurityPerimetersClientImpl implements NetworkSecurit * The interface defining all the services for BatchManagementClientNetworkSecurityPerimeters to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientNetworkSecurityPerimeters") public interface NetworkSecurityPerimetersService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listConfigurations( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, + Mono> getConfiguration( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getConfiguration(@HostParam("$host") String endpoint, + Response getConfigurationSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listConfigurations( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listConfigurationsSync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> reconcileConfiguration(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> reconcileConfiguration(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response reconcileConfigurationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listConfigurationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listConfigurationsNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the NSP configurations in the specified account. + * Gets information about the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 a list NSP (network security perimeter) configurations request along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return information about the specified NSP configuration along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listConfigurationsSinglePageAsync(String resourceGroupName, String accountName) { + private Mono> getConfigurationWithResponseAsync( + String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -135,273 +182,309 @@ Mono> listConfiguratio if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + if (networkSecurityPerimeterConfigurationName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); + } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.listConfigurations(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), accept, context)) - .>map( - res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)) + .withContext(context -> service.getConfiguration(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, + networkSecurityPerimeterConfigurationName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the NSP configurations in the specified account. + * Gets information about the specified NSP configuration. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 NSP configuration on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getConfigurationAsync(String resourceGroupName, + String accountName, String networkSecurityPerimeterConfigurationName) { + return getConfigurationWithResponseAsync(resourceGroupName, accountName, + networkSecurityPerimeterConfigurationName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @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 result of a list NSP (network security perimeter) configurations request along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return information about the specified NSP configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listConfigurationsSinglePageAsync(String resourceGroupName, String accountName, Context context) { + public Response getConfigurationWithResponse(String resourceGroupName, + String accountName, String networkSecurityPerimeterConfigurationName, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (networkSecurityPerimeterConfigurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listConfigurations(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.getConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, + accept, context); } /** - * Lists all of the NSP configurations in the specified account. + * Gets information about the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedFlux}. + * @return information about the specified NSP configuration. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listConfigurationsAsync(String resourceGroupName, - String accountName) { - return new PagedFlux<>(() -> listConfigurationsSinglePageAsync(resourceGroupName, accountName), - nextLink -> listConfigurationsNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkSecurityPerimeterConfigurationInner getConfiguration(String resourceGroupName, String accountName, + String networkSecurityPerimeterConfigurationName) { + return getConfigurationWithResponse(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, + Context.NONE).getValue(); } /** * Lists all of the NSP configurations in the specified 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedFlux}. + * @return result of a list NSP (network security perimeter) configurations request along with {@link PagedResponse} + * on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listConfigurationsAsync(String resourceGroupName, - String accountName, Context context) { - return new PagedFlux<>(() -> listConfigurationsSinglePageAsync(resourceGroupName, accountName, context), - nextLink -> listConfigurationsNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listConfigurationsSinglePageAsync(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 (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listConfigurations(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedIterable}. + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listConfigurations(String resourceGroupName, + private PagedFlux listConfigurationsAsync(String resourceGroupName, String accountName) { - return new PagedIterable<>(listConfigurationsAsync(resourceGroupName, accountName)); + return new PagedFlux<>(() -> listConfigurationsSinglePageAsync(resourceGroupName, accountName), + nextLink -> listConfigurationsNextSinglePageAsync(nextLink)); } /** * Lists all of the NSP configurations in the specified 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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listConfigurations(String resourceGroupName, - String accountName, Context context) { - return new PagedIterable<>(listConfigurationsAsync(resourceGroupName, accountName, context)); - } - - /** - * Gets information about the specified NSP configuration. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NSP configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return result of a list NSP (network security perimeter) configurations request along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getConfigurationWithResponseAsync( - String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName) { + private PagedResponse + listConfigurationsSinglePage(String resourceGroupName, String accountName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (networkSecurityPerimeterConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, this.client.getApiVersion(), - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listConfigurationsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified NSP configuration. + * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 specified NSP configuration along with {@link Response} on successful completion of - * {@link Mono}. + * @return result of a list NSP (network security perimeter) configurations request along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getConfigurationWithResponseAsync( - String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName, - Context context) { + private PagedResponse + listConfigurationsSinglePage(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (networkSecurityPerimeterConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, networkSecurityPerimeterConfigurationName, this.client.getApiVersion(), accept, context); + Response res + = service.listConfigurationsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified NSP configuration. + * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 NSP configuration on successful completion of {@link Mono}. + * @return result of a list NSP (network security perimeter) configurations request as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getConfigurationAsync(String resourceGroupName, - String accountName, String networkSecurityPerimeterConfigurationName) { - return getConfigurationWithResponseAsync(resourceGroupName, accountName, - networkSecurityPerimeterConfigurationName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurations(String resourceGroupName, + String accountName) { + return new PagedIterable<>(() -> listConfigurationsSinglePage(resourceGroupName, accountName), + nextLink -> listConfigurationsNextSinglePage(nextLink)); } /** - * Gets information about the specified NSP configuration. + * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 specified NSP configuration along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getConfigurationWithResponse(String resourceGroupName, - String accountName, String networkSecurityPerimeterConfigurationName, Context context) { - return getConfigurationWithResponseAsync(resourceGroupName, accountName, - networkSecurityPerimeterConfigurationName, context).block(); - } - - /** - * Gets information about the specified NSP configuration. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 NSP configuration. + * @return result of a list NSP (network security perimeter) configurations request as paginated response with + * {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NetworkSecurityPerimeterConfigurationInner getConfiguration(String resourceGroupName, String accountName, - String networkSecurityPerimeterConfigurationName) { - return getConfigurationWithResponse(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, - Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurations(String resourceGroupName, + String accountName, Context context) { + return new PagedIterable<>(() -> listConfigurationsSinglePage(resourceGroupName, accountName, context), + nextLink -> listConfigurationsNextSinglePage(nextLink, context)); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -429,82 +512,113 @@ private Mono>> reconcileConfigurationWithResponseAsync return Mono.error(new IllegalArgumentException( "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); } - final String accept = "application/json"; return FluxUtil .withContext(context -> service.reconcileConfiguration(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, accountName, - networkSecurityPerimeterConfigurationName, this.client.getApiVersion(), accept, context)) + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, + networkSecurityPerimeterConfigurationName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> reconcileConfigurationWithResponseAsync(String resourceGroupName, - String accountName, String networkSecurityPerimeterConfigurationName, Context context) { + private Response reconcileConfigurationWithResponse(String resourceGroupName, String accountName, + String networkSecurityPerimeterConfigurationName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (networkSecurityPerimeterConfigurationName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.reconcileConfiguration(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, this.client.getApiVersion(), - accept, context); + return service.reconcileConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, + Context.NONE); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginReconcileConfigurationAsync(String resourceGroupName, - String accountName, String networkSecurityPerimeterConfigurationName) { - Mono>> mono = reconcileConfigurationWithResponseAsync(resourceGroupName, accountName, - networkSecurityPerimeterConfigurationName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response reconcileConfigurationWithResponse(String resourceGroupName, String accountName, + String networkSecurityPerimeterConfigurationName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (networkSecurityPerimeterConfigurationName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter networkSecurityPerimeterConfigurationName is required and cannot be null.")); + } + return service.reconcileConfigurationSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, + context); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -512,20 +626,22 @@ private PollerFlux, Void> beginReconcileConfigurationAsync(Stri */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginReconcileConfigurationAsync(String resourceGroupName, - String accountName, String networkSecurityPerimeterConfigurationName, Context context) { - context = this.client.mergeContext(context); + String accountName, String networkSecurityPerimeterConfigurationName) { Mono>> mono = reconcileConfigurationWithResponseAsync(resourceGroupName, accountName, - networkSecurityPerimeterConfigurationName, context); + networkSecurityPerimeterConfigurationName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -534,17 +650,20 @@ private PollerFlux, Void> beginReconcileConfigurationAsync(Stri @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginReconcileConfiguration(String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName) { - return this - .beginReconcileConfigurationAsync(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName) - .getSyncPoller(); + Response response = reconcileConfigurationWithResponse(resourceGroupName, accountName, + networkSecurityPerimeterConfigurationName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @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. @@ -554,18 +673,20 @@ public SyncPoller, Void> beginReconcileConfiguration(String res @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginReconcileConfiguration(String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName, Context context) { - return this - .beginReconcileConfigurationAsync(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, - context) - .getSyncPoller(); + Response response = reconcileConfigurationWithResponse(resourceGroupName, accountName, + networkSecurityPerimeterConfigurationName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -581,28 +702,12 @@ private Mono reconcileConfigurationAsync(String resourceGroupName, String /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono reconcileConfigurationAsync(String resourceGroupName, String accountName, - String networkSecurityPerimeterConfigurationName, Context context) { - return beginReconcileConfigurationAsync(resourceGroupName, accountName, - networkSecurityPerimeterConfigurationName, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Reconciles the specified NSP configuration. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -610,15 +715,19 @@ private Mono reconcileConfigurationAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) public void reconcileConfiguration(String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName) { - reconcileConfigurationAsync(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName).block(); + beginReconcileConfiguration(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName) + .getFinalResult(); } /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @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. @@ -627,8 +736,8 @@ public void reconcileConfiguration(String resourceGroupName, String accountName, @ServiceMethod(returns = ReturnType.SINGLE) public void reconcileConfiguration(String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName, Context context) { - reconcileConfigurationAsync(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, context) - .block(); + beginReconcileConfiguration(resourceGroupName, accountName, networkSecurityPerimeterConfigurationName, context) + .getFinalResult(); } /** @@ -661,6 +770,35 @@ public void reconcileConfiguration(String resourceGroupName, String accountName, .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of a list NSP (network security perimeter) configurations request along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse + listConfigurationsNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listConfigurationsNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -669,23 +807,27 @@ public void reconcileConfiguration(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 result of a list NSP (network security perimeter) configurations request along with {@link PagedResponse} - * on successful completion of {@link Mono}. + * @return result of a list NSP (network security perimeter) configurations request along with + * {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listConfigurationsNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listConfigurationsNextSinglePage(String nextLink, + Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listConfigurationsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listConfigurationsNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(NetworkSecurityPerimetersClientImpl.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersImpl.java index c42de6cba651..a3c55cd2b500 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -27,22 +27,6 @@ public NetworkSecurityPerimetersImpl(NetworkSecurityPerimetersClient innerClient this.serviceManager = serviceManager; } - public PagedIterable listConfigurations(String resourceGroupName, - String accountName) { - PagedIterable inner - = this.serviceClient().listConfigurations(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); - } - - public PagedIterable listConfigurations(String resourceGroupName, - String accountName, Context context) { - PagedIterable inner - = this.serviceClient().listConfigurations(resourceGroupName, accountName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); - } - public Response getConfigurationWithResponse(String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName, Context context) { Response inner = this.serviceClient() @@ -67,6 +51,22 @@ public NetworkSecurityPerimeterConfiguration getConfiguration(String resourceGro } } + public PagedIterable listConfigurations(String resourceGroupName, + String accountName) { + PagedIterable inner + = this.serviceClient().listConfigurations(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable listConfigurations(String resourceGroupName, + String accountName, Context context) { + PagedIterable inner + = this.serviceClient().listConfigurations(resourceGroupName, accountName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); + } + public void reconcileConfiguration(String resourceGroupName, String accountName, String networkSecurityPerimeterConfigurationName) { this.serviceClient() diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationImpl.java index 0981ea7e1388..c65303b26faf 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; 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 ae698e15e07b..d8b8feb49861 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -25,9 +25,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.fluent.OperationsClient; import com.azure.resourcemanager.batch.fluent.models.OperationInner; -import com.azure.resourcemanager.batch.models.OperationListResult; +import com.azure.resourcemanager.batch.implementation.models.OperationListResult; import reactor.core.publisher.Mono; /** @@ -59,14 +60,21 @@ public final class OperationsClientImpl implements OperationsClient { * The interface defining all the services for BatchManagementClientOperations to be used by the proxy service to * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.Batch/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.Batch/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,7 +82,14 @@ Mono> list(@HostParam("$host") String endpoint, @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** @@ -103,24 +118,13 @@ private Mono> listSinglePageAsync() { /** * Lists available operations for the Microsoft.Batch provider. * - * @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 result of the request to list REST API operations along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return result of the request to list REST API operations as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - 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.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -128,11 +132,20 @@ 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 as paginated response with {@link PagedFlux}. + * @return result of the request to list REST API operations along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -142,12 +155,20 @@ 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 as paginated response with {@link PagedFlux}. + * @return result of the request to list REST API operations along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -159,7 +180,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -173,7 +194,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -202,6 +223,33 @@ private Mono> listNextSinglePageAsync(String nextL .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list REST API operations along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -210,22 +258,24 @@ 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 along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return result of the request to list REST API operations along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java index 09bc2618980a..38ca68043517 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OutboundEnvironmentEndpointImpl.java index a9e0d10b1ef8..102b200c4ffa 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OutboundEnvironmentEndpointImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/OutboundEnvironmentEndpointImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java index df7035c21d21..0b3acec92fd6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java @@ -1,23 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.PoolInner; import com.azure.resourcemanager.batch.models.AllocationState; import com.azure.resourcemanager.batch.models.ApplicationPackageReference; import com.azure.resourcemanager.batch.models.AutoScaleRun; import com.azure.resourcemanager.batch.models.BatchPoolIdentity; -import com.azure.resourcemanager.batch.models.CertificateReference; import com.azure.resourcemanager.batch.models.DeploymentConfiguration; import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; import com.azure.resourcemanager.batch.models.MetadataItem; import com.azure.resourcemanager.batch.models.MountConfiguration; import com.azure.resourcemanager.batch.models.NetworkConfiguration; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; import com.azure.resourcemanager.batch.models.Pool; import com.azure.resourcemanager.batch.models.PoolProvisioningState; import com.azure.resourcemanager.batch.models.ResizeOperationStatus; @@ -48,6 +47,10 @@ public String type() { return this.innerModel().type(); } + public BatchPoolIdentity identity() { + return this.innerModel().identity(); + } + public String etag() { return this.innerModel().etag(); } @@ -61,8 +64,8 @@ public Map tags() { } } - public BatchPoolIdentity identity() { - return this.innerModel().identity(); + public SystemData systemData() { + return this.innerModel().systemData(); } public String displayName() { @@ -155,15 +158,6 @@ public StartTask startTask() { return this.innerModel().startTask(); } - public List certificates() { - List inner = this.innerModel().certificates(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - public List applicationPackages() { List inner = this.innerModel().applicationPackages(); if (inner != null) { @@ -173,15 +167,6 @@ public List applicationPackages() { } } - public List applicationLicenses() { - List inner = this.innerModel().applicationLicenses(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - public ResizeOperationStatus resizeOperationStatus() { return this.innerModel().resizeOperationStatus(); } @@ -195,27 +180,10 @@ public List mountConfiguration() { } } - public NodeCommunicationMode targetNodeCommunicationMode() { - return this.innerModel().targetNodeCommunicationMode(); - } - - public NodeCommunicationMode currentNodeCommunicationMode() { - return this.innerModel().currentNodeCommunicationMode(); - } - public UpgradePolicy upgradePolicy() { return this.innerModel().upgradePolicy(); } - public Map resourceTags() { - Map inner = this.innerModel().resourceTags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - public String resourceGroupName() { return resourceGroupName; } @@ -399,41 +367,21 @@ public PoolImpl withStartTask(StartTask startTask) { return this; } - public PoolImpl withCertificates(List certificates) { - this.innerModel().withCertificates(certificates); - return this; - } - public PoolImpl withApplicationPackages(List applicationPackages) { this.innerModel().withApplicationPackages(applicationPackages); return this; } - public PoolImpl withApplicationLicenses(List applicationLicenses) { - this.innerModel().withApplicationLicenses(applicationLicenses); - return this; - } - public PoolImpl withMountConfiguration(List mountConfiguration) { this.innerModel().withMountConfiguration(mountConfiguration); return this; } - public PoolImpl withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode) { - this.innerModel().withTargetNodeCommunicationMode(targetNodeCommunicationMode); - return this; - } - public PoolImpl withUpgradePolicy(UpgradePolicy upgradePolicy) { this.innerModel().withUpgradePolicy(upgradePolicy); return this; } - public PoolImpl withResourceTags(Map resourceTags) { - this.innerModel().withResourceTags(resourceTags); - return this; - } - public PoolImpl withIfMatch(String ifMatch) { if (isInCreateMode()) { this.createIfMatch = ifMatch; @@ -450,6 +398,6 @@ public PoolImpl withIfNoneMatch(String ifNoneMatch) { } private boolean isInCreateMode() { - return this.innerModel().id() == null; + return this.innerModel() == null || this.innerModel().id() == null; } } 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 2229c2ed3e03..5c9e512d0179 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -29,13 +29,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.batch.fluent.PoolsClient; import com.azure.resourcemanager.batch.fluent.models.PoolInner; -import com.azure.resourcemanager.batch.models.ListPoolsResult; +import com.azure.resourcemanager.batch.implementation.models.ListPoolsResult; import com.azure.resourcemanager.batch.models.PoolsCreateResponse; import com.azure.resourcemanager.batch.models.PoolsDisableAutoScaleResponse; import com.azure.resourcemanager.batch.models.PoolsGetResponse; @@ -73,175 +75,182 @@ public final class PoolsClientImpl implements PoolsClient { * The interface defining all the services for BatchManagementClientPools to be used by the proxy service to perform * REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientPools") public interface PoolsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBatchAccount(@HostParam("$host") String endpoint, + Mono get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("maxresults") Integer maxresults, @QueryParam("$select") String select, - @QueryParam("$filter") String filter, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + PoolsGetResponse getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono create(@HostParam("$host") String endpoint, + Mono create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @HeaderParam("If-Match") String ifMatch, - @HeaderParam("If-None-Match") String ifNoneMatch, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") PoolInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PoolInner parameters, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + PoolsCreateResponse createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("If-None-Match") String ifNoneMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") PoolInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PoolInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono update(@HostParam("$host") String endpoint, + PoolsUpdateResponse updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("poolName") String poolName, @HeaderParam("If-Match") String ifMatch, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PoolInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + @ExpectedResponses({ 200, 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") PoolInner parameters, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("poolName") String poolName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByBatchAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("maxresults") Integer maxresults, @QueryParam("$select") String select, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono get(@HostParam("$host") String endpoint, + Response listByBatchAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @QueryParam("maxresults") Integer maxresults, @QueryParam("$select") String select, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono disableAutoScale(@HostParam("$host") String endpoint, + Mono disableAutoScale(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + PoolsDisableAutoScaleResponse disableAutoScaleSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono stopResize(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono stopResize(@HostParam("$host") String endpoint, + PoolsStopResizeResponse stopResizeSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("poolName") String poolName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("poolName") String poolName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByBatchAccountNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByBatchAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the pools in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are: + * Gets information about the specified pool. * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param poolName The pool name. This must be unique within the 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 values returned by the List operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return information about the specified pool on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBatchAccountSinglePageAsync(String resourceGroupName, - String accountName, Integer maxresults, String select, String filter) { + private Mono getWithResponseAsync(String resourceGroupName, String accountName, String poolName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByBatchAccount(this.client.getEndpoint(), resourceGroupName, - accountName, maxresults, select, filter, this.client.getApiVersion(), this.client.getSubscriptionId(), - accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the pools in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are: - * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale. - * @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> listByBatchAccountSinglePageAsync(String resourceGroupName, - String accountName, Integer maxresults, String select, String filter, 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.")); @@ -249,221 +258,114 @@ private Mono> listByBatchAccountSinglePageAsync(String if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + if (poolName == null) { + return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByBatchAccount(this.client.getEndpoint(), resourceGroupName, accountName, maxresults, select, filter, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the pools in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are: - * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName, - Integer maxresults, String select, String filter) { - return new PagedFlux<>( - () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the pools in the specified 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 values returned by the List operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName) { - final Integer maxresults = null; - final String select = null; - final String filter = null; - return new PagedFlux<>( - () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the pools in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are: - * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale. - * @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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName, - Integer maxresults, String select, String filter, Context context) { - return new PagedFlux<>(() -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, - select, filter, context), nextLink -> listByBatchAccountNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the pools in the specified 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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { - final Integer maxresults = null; - final String select = null; - final String filter = null; - return new PagedIterable<>(listByBatchAccountAsync(resourceGroupName, accountName, maxresults, select, filter)); + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Lists all of the pools in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are: + * Gets information about the specified pool. * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param poolName The pool name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified pool on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, - String select, String filter, Context context) { - return new PagedIterable<>( - listByBatchAccountAsync(resourceGroupName, accountName, maxresults, select, filter, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, String poolName) { + return getWithResponseAsync(resourceGroupName, accountName, poolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Creates a new pool inside the specified account. + * Gets information about the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. - * @param parameters Additional parameters for pool creation. - * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the - * operation only if the pool already exists. If omitted, this operation will always be applied. - * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other - * values will be ignored. + * @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 contains information about a pool on successful completion of {@link Mono}. + * @return information about the specified pool. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createWithResponseAsync(String resourceGroupName, String accountName, - String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { + public PoolsGetResponse getWithResponse(String resourceGroupName, String accountName, String poolName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - ifMatch, ifNoneMatch, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, poolName, accept, context); + } + + /** + * Gets information about the specified pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param poolName The pool name. This must be unique within the 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 specified pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PoolInner get(String resourceGroupName, String accountName, String poolName) { + return getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); } /** * Creates a new pool inside the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Additional parameters for pool creation. * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the * operation only if the pool already exists. If omitted, this operation will always be applied. * @param ifNoneMatch Set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other * values will be ignored. - * @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. @@ -471,11 +373,15 @@ private Mono createWithResponseAsync(String resourceGroupNa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createWithResponseAsync(String resourceGroupName, String accountName, - String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch, Context context) { + String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -486,26 +392,28 @@ private Mono createWithResponseAsync(String resourceGroupNa if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName 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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, accountName, poolName, ifMatch, ifNoneMatch, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a new pool inside the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Additional parameters for pool creation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -525,8 +433,11 @@ private Mono createAsync(String resourceGroupName, String accountName /** * Creates a new pool inside the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Additional parameters for pool creation. * @param ifMatch The entity state (ETag) version of the pool to update. A value of "*" can be used to apply the @@ -542,15 +453,49 @@ private Mono createAsync(String resourceGroupName, String accountName @ServiceMethod(returns = ReturnType.SINGLE) public PoolsCreateResponse createWithResponse(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, String ifNoneMatch, Context context) { - return createWithResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, ifNoneMatch, - context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, ifMatch, ifNoneMatch, + contentType, accept, parameters, context); } /** * Creates a new pool inside the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Additional parameters for pool creation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -569,8 +514,11 @@ public PoolInner create(String resourceGroupName, String accountName, String poo /** * Updates the properties of an existing pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any * property not supplied will be unchanged. @@ -588,55 +536,10 @@ private Mono updateWithResponseAsync(String resourceGroupNa return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName 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 (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - ifMatch, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates the properties of an existing pool. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. - * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any - * property not supplied will be unchanged. - * @param ifMatch The entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to - * apply the operation unconditionally. - * @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 contains information about a pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateWithResponseAsync(String resourceGroupName, String accountName, - String poolName, PoolInner parameters, String ifMatch, 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.")); @@ -647,26 +550,28 @@ private Mono updateWithResponseAsync(String resourceGroupNa if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName 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 (parameters == null) { return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, accountName, poolName, ifMatch, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, ifMatch, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates the properties of an existing pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any * property not supplied will be unchanged. @@ -686,8 +591,11 @@ private Mono updateAsync(String resourceGroupName, String accountName /** * Updates the properties of an existing pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any * property not supplied will be unchanged. @@ -702,14 +610,49 @@ private Mono updateAsync(String resourceGroupName, String accountName @ServiceMethod(returns = ReturnType.SINGLE) public PoolsUpdateResponse updateWithResponse(String resourceGroupName, String accountName, String poolName, PoolInner parameters, String ifMatch, Context context) { - return updateWithResponseAsync(resourceGroupName, accountName, poolName, parameters, ifMatch, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, ifMatch, contentType, accept, + parameters, context); } /** * Updates the properties of an existing pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param parameters Pool properties that should be updated. Properties that are supplied will be updated, any * property not supplied will be unchanged. @@ -728,8 +671,11 @@ public PoolInner update(String resourceGroupName, String accountName, String poo /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -743,6 +689,10 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); @@ -753,82 +703,107 @@ private Mono>> deleteWithResponseAsync(String resource if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String poolName, Context context) { + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, Context.NONE); } /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @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, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, String poolName, + Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, context); } /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the 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. @@ -836,19 +811,20 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String poolName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, poolName, context); + String poolName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, poolName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -858,14 +834,18 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName) { - return this.beginDeleteAsync(resourceGroupName, accountName, poolName).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, accountName, poolName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -876,14 +856,18 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String poolName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, poolName, context).getSyncPoller(); + Response response = deleteWithResponse(resourceGroupName, accountName, poolName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -899,185 +883,344 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the 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 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) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String accountName, String poolName) { + beginDelete(resourceGroupName, accountName, poolName).getFinalResult(); } /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String poolName) { - deleteAsync(resourceGroupName, accountName, poolName).block(); + public void delete(String resourceGroupName, String accountName, String poolName, Context context) { + beginDelete(resourceGroupName, accountName, poolName, context).getFinalResult(); } /** - * Deletes the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". + * Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + * + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) - public void delete(String resourceGroupName, String accountName, String poolName, Context context) { - deleteAsync(resourceGroupName, accountName, poolName, context).block(); + private Mono> listByBatchAccountSinglePageAsync(String resourceGroupName, + String accountName, Integer maxresults, String select, String filter) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByBatchAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, select, filter, 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())); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". + * Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + * + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName, + Integer maxresults, String select, String filter) { + return new PagedFlux<>( + () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), + nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the pools in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName) { + final Integer maxresults = null; + final String select = null; + final String filter = null; + return new PagedFlux<>( + () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, select, filter), + nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); } /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". + * Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + * + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, String poolName) { + private PagedResponse listByBatchAccountSinglePage(String resourceGroupName, String accountName, + Integer maxresults, String select, String filter) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res = service.listByBatchAccountSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, + select, filter, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". + * Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + * + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale. * @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 specified pool on successful completion of {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWithResponseAsync(String resourceGroupName, String accountName, String poolName, - Context context) { + private PagedResponse listByBatchAccountSinglePage(String resourceGroupName, String accountName, + Integer maxresults, String select, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName 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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + Response res = service.listByBatchAccountSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, + select, filter, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, String poolName) { - return getWithResponseAsync(resourceGroupName, accountName, poolName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { + final Integer maxresults = null; + final String select = null; + final String filter = null; + return new PagedIterable<>( + () -> listByBatchAccountSinglePage(resourceGroupName, accountName, maxresults, select, filter), + nextLink -> listByBatchAccountNextSinglePage(nextLink)); } /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the 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 specified pool. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PoolsGetResponse getWithResponse(String resourceGroupName, String accountName, String poolName, - Context context) { - return getWithResponseAsync(resourceGroupName, accountName, poolName, context).block(); - } - - /** - * Gets information about the specified pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". + * Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale. + * @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 specified pool. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PoolInner get(String resourceGroupName, String accountName, String poolName) { - return getWithResponse(resourceGroupName, accountName, poolName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, + String select, String filter, Context context) { + return new PagedIterable<>( + () -> listByBatchAccountSinglePage(resourceGroupName, accountName, maxresults, select, filter, context), + nextLink -> listByBatchAccountNextSinglePage(nextLink, context)); } /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1091,46 +1234,10 @@ private Mono disableAutoScaleWithResponseAsync(St return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.disableAutoScale(this.client.getEndpoint(), resourceGroupName, accountName, - poolName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Disables automatic scaling for a pool. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the 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 contains information about a pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono disableAutoScaleWithResponseAsync(String resourceGroupName, - String accountName, String poolName, 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.")); @@ -1141,21 +1248,21 @@ private Mono disableAutoScaleWithResponseAsync(St if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.disableAutoScale(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.disableAutoScale(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1171,8 +1278,11 @@ private Mono disableAutoScaleAsync(String resourceGroupName, String a /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1183,14 +1293,41 @@ private Mono disableAutoScaleAsync(String resourceGroupName, String a @ServiceMethod(returns = ReturnType.SINGLE) public PoolsDisableAutoScaleResponse disableAutoScaleWithResponse(String resourceGroupName, String accountName, String poolName, Context context) { - return disableAutoScaleWithResponseAsync(resourceGroupName, accountName, poolName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.disableAutoScaleSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context); } /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1211,8 +1348,11 @@ public PoolInner disableAutoScale(String resourceGroupName, String accountName, * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1226,52 +1366,10 @@ private Mono stopResizeWithResponseAsync(String resourc return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (poolName == null) { - return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); - } if (this.client.getSubscriptionId() == null) { return Mono.error(new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stopResize(this.client.getEndpoint(), resourceGroupName, accountName, - poolName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Stops an ongoing resize operation on the pool. - * - * This does not restore the pool to its previous state before the resize operation: it only stops any further - * changes being made, and the pool maintains its current state. After stopping, the pool stabilizes at the number - * of nodes it was at when the stop operation was done. During the stop operation, the pool allocation state changes - * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API - * can also be used to halt the initial sizing of the pool when it is created. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the 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 contains information about a pool on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopResizeWithResponseAsync(String resourceGroupName, String accountName, - String poolName, 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.")); @@ -1282,14 +1380,11 @@ private Mono stopResizeWithResponseAsync(String resourc if (poolName == null) { return Mono.error(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.stopResize(this.client.getEndpoint(), resourceGroupName, accountName, poolName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.stopResize(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** @@ -1301,8 +1396,11 @@ private Mono stopResizeWithResponseAsync(String resourc * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1324,8 +1422,11 @@ private Mono stopResizeAsync(String resourceGroupName, String account * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1336,7 +1437,31 @@ private Mono stopResizeAsync(String resourceGroupName, String account @ServiceMethod(returns = ReturnType.SINGLE) public PoolsStopResizeResponse stopResizeWithResponse(String resourceGroupName, String accountName, String poolName, Context context) { - return stopResizeWithResponseAsync(resourceGroupName, accountName, poolName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (poolName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter poolName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.stopResizeSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, poolName, accept, context); } /** @@ -1348,8 +1473,11 @@ public PoolsStopResizeResponse stopResizeWithResponse(String resourceGroupName, * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1389,6 +1517,33 @@ private Mono> listByBatchAccountNextSinglePageAsync(Str .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByBatchAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByBatchAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1397,22 +1552,25 @@ 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBatchAccountNextSinglePageAsync(String nextLink, Context context) { + private PagedResponse listByBatchAccountNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByBatchAccountNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByBatchAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PoolsClientImpl.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java index d59c5e0827ae..5915d847d94c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -29,26 +29,6 @@ public PoolsImpl(PoolsClient innerClient, com.azure.resourcemanager.batch.BatchM this.serviceManager = serviceManager; } - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { - PagedIterable inner = this.serviceClient().listByBatchAccount(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager())); - } - - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, - String select, String filter, Context context) { - PagedIterable inner = this.serviceClient() - .listByBatchAccount(resourceGroupName, accountName, maxresults, select, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String accountName, String poolName) { - this.serviceClient().delete(resourceGroupName, accountName, poolName); - } - - public void delete(String resourceGroupName, String accountName, String poolName, Context context) { - this.serviceClient().delete(resourceGroupName, accountName, poolName, context); - } - public Response getWithResponse(String resourceGroupName, String accountName, String poolName, Context context) { PoolsGetResponse inner @@ -70,6 +50,26 @@ public Pool get(String resourceGroupName, String accountName, String poolName) { } } + public void delete(String resourceGroupName, String accountName, String poolName) { + this.serviceClient().delete(resourceGroupName, accountName, poolName); + } + + public void delete(String resourceGroupName, String accountName, String poolName, Context context) { + this.serviceClient().delete(resourceGroupName, accountName, poolName, context); + } + + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { + PagedIterable inner = this.serviceClient().listByBatchAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager())); + } + + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, + String select, String filter, Context context) { + PagedIterable inner = this.serviceClient() + .listByBatchAccount(resourceGroupName, accountName, maxresults, select, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PoolImpl(inner1, this.manager())); + } + public Response disableAutoScaleWithResponse(String resourceGroupName, String accountName, String poolName, Context context) { PoolsDisableAutoScaleResponse inner diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java index feaf1d48d4c2..904d4fcd87d9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.batch.models.PrivateEndpoint; import com.azure.resourcemanager.batch.models.PrivateEndpointConnection; @@ -49,6 +50,10 @@ public Map tags() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public PrivateEndpointConnectionProvisioningState provisioningState() { return this.innerModel().provisioningState(); } 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 fa2bbb547525..21a18df3b83b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -27,13 +27,15 @@ import com.azure.core.http.rest.RestProxy; import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.batch.models.ListPrivateEndpointConnectionsResult; +import com.azure.resourcemanager.batch.implementation.models.ListPrivateEndpointConnectionsResult; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -67,236 +69,112 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi * The interface defining all the services for BatchManagementClientPrivateEndpointConnections to be used by the * proxy service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientPrivateEndpointConnections") public interface PrivateEndpointConnectionsService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBatchAccount(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("maxresults") Integer maxresults, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("If-Match") String ifMatch, - @BodyParam("application/json") PrivateEndpointConnectionInner parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("If-Match") String ifMatch, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({ 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono>> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByBatchAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByBatchAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByBatchAccountNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the private endpoint connections in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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> - listByBatchAccountSinglePageAsync(String resourceGroupName, String accountName, Integer maxresults) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByBatchAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), maxresults, 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())); - } - - /** - * Lists all of the private endpoint connections in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @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> listByBatchAccountSinglePageAsync( - String resourceGroupName, String accountName, Integer maxresults, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByBatchAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), maxresults, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the private endpoint connections in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, - String accountName, Integer maxresults) { - return new PagedFlux<>(() -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the private endpoint connections in the specified 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 values returned by the List operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, - String accountName) { - final Integer maxresults = null; - return new PagedFlux<>(() -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the private endpoint connections in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, - String accountName, Integer maxresults, Context context) { - return new PagedFlux<>( - () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, context), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the private endpoint connections in the specified 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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, - String accountName) { - final Integer maxresults = null; - return new PagedIterable<>(listByBatchAccountAsync(resourceGroupName, accountName, maxresults)); - } - /** - * Lists all of the private endpoint connections in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, - String accountName, Integer maxresults, Context context) { - return new PagedIterable<>(listByBatchAccountAsync(resourceGroupName, accountName, maxresults, context)); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByBatchAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -329,59 +207,20 @@ private Mono> getWithResponseAsync(Stri } final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateEndpointConnectionName, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the - * 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 specified private endpoint connection along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String accountName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - privateEndpointConnectionName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets information about the specified private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -399,8 +238,11 @@ private Mono getAsync(String resourceGroupName, /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param context The context to associate with this operation. @@ -412,14 +254,42 @@ private Mono getAsync(String resourceGroupName, @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, context).block(); + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, privateEndpointConnectionName, accept, context); } /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -436,8 +306,11 @@ public PrivateEndpointConnectionInner get(String resourceGroupName, String accou /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -477,19 +350,81 @@ private Mono>> updateWithResponseAsync(String resource } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, privateEndpointConnectionName, this.client.getApiVersion(), ifMatch, - parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateEndpointConnectionName, ifMatch, + contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the + * account. + * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will + * be updated, any property not supplied will be unchanged. + * @param ifMatch The state (ETag) version of the private endpoint connection to update. This value can be omitted + * or set to "*" to apply the operation unconditionally. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response updateWithResponse(String resourceGroupName, String accountName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, String ifMatch) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (parameters == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateEndpointConnectionName, ifMatch, + contentType, accept, parameters, Context.NONE); + } + + /** + * Updates the properties of an existing private endpoint connection. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -500,49 +435,56 @@ private Mono>> updateWithResponseAsync(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 contains information about a private link resource along with {@link Response} on successful completion - * of {@link Mono}. + * @return contains information about a private link resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName, + private Response updateWithResponse(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, String ifMatch, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); } else { parameters.validate(); } + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, privateEndpointConnectionName, this.client.getApiVersion(), ifMatch, parameters, accept, - context); + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateEndpointConnectionName, ifMatch, + contentType, accept, parameters, context); } /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -568,8 +510,11 @@ private PollerFlux, PrivateEndpointCo /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -594,37 +539,40 @@ private PollerFlux, PrivateEndpointCo /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will * be updated, any property not supplied will be unchanged. * @param ifMatch The state (ETag) version of the private endpoint connection to update. This value can be omitted * or set to "*" to apply the operation unconditionally. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of contains information about a private link resource. + * @return the {@link SyncPoller} for polling of contains information about a private link resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, PrivateEndpointConnectionInner> beginUpdateAsync( + public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String accountName, String privateEndpointConnectionName, - PrivateEndpointConnectionInner parameters, String ifMatch, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, - privateEndpointConnectionName, parameters, ifMatch, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, - context); + PrivateEndpointConnectionInner parameters, String ifMatch) { + Response response + = updateWithResponse(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); } /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -639,15 +587,20 @@ public SyncPoller, PrivateEndpointCon String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { final String ifMatch = null; - return this.beginUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch) - .getSyncPoller(); + Response response + = updateWithResponse(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, Context.NONE); } /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -664,17 +617,20 @@ public SyncPoller, PrivateEndpointCon public SyncPoller, PrivateEndpointConnectionInner> beginUpdate( String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, String ifMatch, Context context) { - return this - .beginUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch, - context) - .getSyncPoller(); + Response response = updateWithResponse(resourceGroupName, accountName, + privateEndpointConnectionName, parameters, ifMatch, context); + return this.client.getLroResult(response, + PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, context); } /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -697,8 +653,11 @@ private Mono updateAsync(String resourceGroupNam /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -720,33 +679,11 @@ private Mono updateAsync(String resourceGroupNam /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the - * account. - * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will - * be updated, any property not supplied will be unchanged. - * @param ifMatch The state (ETag) version of the private endpoint connection to update. This value can be omitted - * or set to "*" to apply the operation unconditionally. - * @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 contains information about a private link resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String accountName, - String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, String ifMatch, - Context context) { - return beginUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch, - context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates the properties of an existing private endpoint connection. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -760,14 +697,18 @@ private Mono updateAsync(String resourceGroupNam public PrivateEndpointConnectionInner update(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { final String ifMatch = null; - return updateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch).block(); + return beginUpdate(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch) + .getFinalResult(); } /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -784,15 +725,18 @@ public PrivateEndpointConnectionInner update(String resourceGroupName, String ac public PrivateEndpointConnectionInner update(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters, String ifMatch, Context context) { - return updateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch, context) - .block(); + return beginUpdate(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch, context) + .getFinalResult(); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -822,84 +766,113 @@ private Mono>> deleteWithResponseAsync(String resource return Mono.error(new IllegalArgumentException( "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateEndpointConnectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName, - String privateEndpointConnectionName, Context context) { + private Response deleteWithResponse(String resourceGroupName, String accountName, + String privateEndpointConnectionName) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } if (privateEndpointConnectionName == null) { - return Mono.error(new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateEndpointConnectionName, + Context.NONE); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the response body along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String privateEndpointConnectionName) { - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); + @ServiceMethod(returns = ReturnType.SINGLE) + private Response deleteWithResponse(String resourceGroupName, String accountName, + String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateEndpointConnectionName, context); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * 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. @@ -907,19 +880,21 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName, - String privateEndpointConnectionName, Context context) { - context = this.client.mergeContext(context); + String privateEndpointConnectionName) { Mono>> mono - = deleteWithResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, context); + = deleteWithResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName); return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); + this.client.getContext()); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -930,14 +905,19 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String privateEndpointConnectionName) { - return this.beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName).getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, accountName, privateEndpointConnectionName); + return this.client.getLroResult(response, Void.class, Void.class, Context.NONE); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param context The context to associate with this operation. @@ -949,15 +929,19 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context) { - return this.beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName, context) - .getSyncPoller(); + Response response + = deleteWithResponse(resourceGroupName, accountName, privateEndpointConnectionName, context); + return this.client.getLroResult(response, Void.class, Void.class, context); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -974,55 +958,256 @@ private Mono deleteAsync(String resourceGroupName, String accountName, Str /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * 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 A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, - Context context) { - return beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); + public void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName) { + beginDelete(resourceGroupName, accountName, privateEndpointConnectionName).getFinalResult(); } /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName) { - deleteAsync(resourceGroupName, accountName, privateEndpointConnectionName).block(); + public void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName, + Context context) { + beginDelete(resourceGroupName, accountName, privateEndpointConnectionName, context).getFinalResult(); } /** - * Deletes the specified private endpoint connection. + * Lists all of the private endpoint connections in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the - * account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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> + listByBatchAccountSinglePageAsync(String resourceGroupName, String accountName, Integer maxresults) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByBatchAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, 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())); + } + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBatchAccountAsync(String resourceGroupName, + String accountName, Integer maxresults) { + return new PagedFlux<>(() -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults), + nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBatchAccountAsync(String resourceGroupName, + String accountName) { + final Integer maxresults = null; + return new PagedFlux<>(() -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults), + nextLink -> listByBatchAccountNextSinglePageAsync(nextLink)); + } + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByBatchAccountSinglePage(String resourceGroupName, + String accountName, Integer maxresults) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByBatchAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. * @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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName, - Context context) { - deleteAsync(resourceGroupName, accountName, privateEndpointConnectionName, context).block(); + private PagedResponse listByBatchAccountSinglePage(String resourceGroupName, + String accountName, Integer maxresults, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByBatchAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBatchAccount(String resourceGroupName, + String accountName) { + final Integer maxresults = null; + return new PagedIterable<>(() -> listByBatchAccountSinglePage(resourceGroupName, accountName, maxresults), + nextLink -> listByBatchAccountNextSinglePage(nextLink)); + } + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBatchAccount(String resourceGroupName, + String accountName, Integer maxresults, Context context) { + return new PagedIterable<>( + () -> listByBatchAccountSinglePage(resourceGroupName, accountName, maxresults, context), + nextLink -> listByBatchAccountNextSinglePage(nextLink, context)); } /** @@ -1053,6 +1238,33 @@ private Mono> listByBatchAccountNe .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByBatchAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByBatchAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1061,23 +1273,26 @@ 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBatchAccountNextSinglePageAsync(String nextLink, + private PagedResponse listByBatchAccountNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByBatchAccountNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByBatchAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java index 1601df219718..0f6a7b819ea0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -27,19 +27,6 @@ public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClie this.serviceManager = serviceManager; } - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { - PagedIterable inner - = this.serviceClient().listByBatchAccount(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, Context context) { - PagedIterable inner - = this.serviceClient().listByBatchAccount(resourceGroupName, accountName, maxresults, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context) { Response inner = this.serviceClient() @@ -95,6 +82,19 @@ public void delete(String resourceGroupName, String accountName, String privateE this.serviceClient().delete(resourceGroupName, accountName, privateEndpointConnectionName, context); } + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByBatchAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, + Integer maxresults, Context context) { + PagedIterable inner + = this.serviceClient().listByBatchAccount(resourceGroupName, accountName, maxresults, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + private PrivateEndpointConnectionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java index 5ee9bfcc486f..c5f07f1d5e8c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.batch.models.PrivateLinkResource; import java.util.Collections; @@ -46,6 +47,10 @@ public Map tags() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String groupId() { return this.innerModel().groupId(); } 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 4d79431d8d64..64253b75e3f1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -25,9 +25,10 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.batch.models.ListPrivateLinkResourcesResult; +import com.azure.resourcemanager.batch.implementation.models.ListPrivateLinkResourcesResult; import reactor.core.publisher.Mono; /** @@ -59,53 +60,82 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource * The interface defining all the services for BatchManagementClientPrivateLinkResources to be used by the proxy * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "BatchManagementClien") + @Host("{endpoint}") + @ServiceInterface(name = "BatchManagementClientPrivateLinkResources") public interface PrivateLinkResourcesService { @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBatchAccount(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @QueryParam("api-version") String apiVersion, @QueryParam("maxresults") Integer maxresults, - @HeaderParam("Accept") String accept, Context context); + @PathParam("privateLinkResourceName") String privateLinkResourceName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @PathParam("privateLinkResourceName") String privateLinkResourceName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByBatchAccount(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByBatchAccountSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName, - @PathParam("privateLinkResourceName") String privateLinkResourceName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + @QueryParam("maxresults") Integer maxresults, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByBatchAccountNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByBatchAccountNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all of the private link resources in the specified account. + * Gets information about the specified private link resource. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 values returned by the List operation along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return information about the specified private link resource along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBatchAccountSinglePageAsync(String resourceGroupName, - String accountName, Integer maxresults) { + private Mono> getWithResponseAsync(String resourceGroupName, String accountName, + String privateLinkResourceName) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -121,23 +151,110 @@ private Mono> listByBatchAccountSinglePa if (accountName == null) { return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } + if (privateLinkResourceName == null) { + return Mono.error( + new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + } final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByBatchAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, this.client.getApiVersion(), maxresults, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + return FluxUtil.withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, privateLinkResourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Gets information about the specified private link resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 specified private link resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String accountName, + String privateLinkResourceName) { + return getWithResponseAsync(resourceGroupName, accountName, privateLinkResourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets information about the specified private link resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 specified private link resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String accountName, + String privateLinkResourceName, Context context) { + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (accountName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); + } + if (privateLinkResourceName == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + } + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, accountName, privateLinkResourceName, accept, context); + } + + /** + * Gets information about the specified private link resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 specified private link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceInner get(String resourceGroupName, String accountName, String privateLinkResourceName) { + return getWithResponse(resourceGroupName, accountName, privateLinkResourceName, Context.NONE).getValue(); + } + /** * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. - * @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. @@ -146,7 +263,7 @@ private Mono> listByBatchAccountSinglePa */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBatchAccountSinglePageAsync(String resourceGroupName, - String accountName, Integer maxresults, Context context) { + String accountName, Integer maxresults) { if (this.client.getEndpoint() == null) { return Mono.error( new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); @@ -163,19 +280,22 @@ private Mono> listByBatchAccountSinglePa 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 - .listByBatchAccount(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - accountName, this.client.getApiVersion(), maxresults, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return FluxUtil + .withContext(context -> service.listByBatchAccount(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, 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())); } /** * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -192,8 +312,11 @@ private PagedFlux listByBatchAccountAsync(String resou /** * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -209,189 +332,131 @@ private PagedFlux listByBatchAccountAsync(String resou /** * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @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 as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBatchAccountAsync(String resourceGroupName, String accountName, - Integer maxresults, Context context) { - return new PagedFlux<>( - () -> listByBatchAccountSinglePageAsync(resourceGroupName, accountName, maxresults, context), - nextLink -> listByBatchAccountNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the private link resources in the specified 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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { - final Integer maxresults = null; - return new PagedIterable<>(listByBatchAccountAsync(resourceGroupName, accountName, maxresults)); - } - - /** - * Lists all of the private link resources in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. - * @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 as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, Context context) { - return new PagedIterable<>(listByBatchAccountAsync(resourceGroupName, accountName, maxresults, context)); - } - - /** - * Gets information about the specified private link resource. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the 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 specified private link resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String privateLinkResourceName) { + private PagedResponse listByBatchAccountSinglePage(String resourceGroupName, + String accountName, Integer maxresults) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (privateLinkResourceName == null) { - return Mono.error( - new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, accountName, privateLinkResourceName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByBatchAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified private link resource. + * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. * @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 specified private link resource along with {@link Response} on successful - * completion of {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String accountName, - String privateLinkResourceName, Context context) { + private PagedResponse listByBatchAccountSinglePage(String resourceGroupName, + String accountName, Integer maxresults, Context context) { if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (accountName == null) { - return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); - } - if (privateLinkResourceName == null) { - return Mono.error( - new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null.")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, accountName, - privateLinkResourceName, this.client.getApiVersion(), accept, context); + Response res + = service.listByBatchAccountSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accountName, maxresults, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Gets information about the specified private link resource. + * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 on successful completion of {@link Mono}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String accountName, - String privateLinkResourceName) { - return getWithResponseAsync(resourceGroupName, accountName, privateLinkResourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { + final Integer maxresults = null; + return new PagedIterable<>(() -> listByBatchAccountSinglePage(resourceGroupName, accountName, maxresults), + nextLink -> listByBatchAccountNextSinglePage(nextLink)); } /** - * Gets information about the specified private link resource. + * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. * @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 specified private link resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String accountName, - String privateLinkResourceName, Context context) { - return getWithResponseAsync(resourceGroupName, accountName, privateLinkResourceName, context).block(); - } - - /** - * Gets information about the specified private link resource. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the 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 specified private link resource. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceInner get(String resourceGroupName, String accountName, String privateLinkResourceName) { - return getWithResponse(resourceGroupName, accountName, privateLinkResourceName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, + Integer maxresults, Context context) { + return new PagedIterable<>( + () -> listByBatchAccountSinglePage(resourceGroupName, accountName, maxresults, context), + nextLink -> listByBatchAccountNextSinglePage(nextLink, context)); } /** @@ -422,6 +487,33 @@ private Mono> listByBatchAccountNextSing .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return values returned by the List operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByBatchAccountNextSinglePage(String nextLink) { + if (nextLink == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + Response res + = service.listByBatchAccountNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -430,23 +522,25 @@ 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 along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return values returned by the List operation along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBatchAccountNextSinglePageAsync(String nextLink, - Context context) { + private PagedResponse listByBatchAccountNextSinglePage(String nextLink, Context context) { if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + throw LOGGER.atError() + .log(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.")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByBatchAccountNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByBatchAccountNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesClientImpl.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java index 7e2a729b812e..6772ceef8d56 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; @@ -27,19 +27,6 @@ public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, this.serviceManager = serviceManager; } - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { - PagedIterable inner - = this.serviceClient().listByBatchAccount(resourceGroupName, accountName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, Context context) { - PagedIterable inner - = this.serviceClient().listByBatchAccount(resourceGroupName, accountName, maxresults, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); - } - public Response getWithResponse(String resourceGroupName, String accountName, String privateLinkResourceName, Context context) { Response inner @@ -62,6 +49,19 @@ public PrivateLinkResource get(String resourceGroupName, String accountName, Str } } + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName) { + PagedIterable inner + = this.serviceClient().listByBatchAccount(resourceGroupName, accountName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByBatchAccount(String resourceGroupName, String accountName, + Integer maxresults, Context context) { + PagedIterable inner + = this.serviceClient().listByBatchAccount(resourceGroupName, accountName, maxresults, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + private PrivateLinkResourcesClient serviceClient() { return this.innerClient; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java index d554e138f297..37693b2a3a6c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java index bf6aa5f40b17..01edf473040f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountListResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/BatchAccountListResult.java similarity index 70% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountListResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/BatchAccountListResult.java index ba4cd17bc167..c1211245a974 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountListResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/BatchAccountListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +15,28 @@ import java.util.List; /** - * Values returned by the List operation. + * Paged collection of BatchAccount items. */ -@Fluent +@Immutable public final class BatchAccountListResult implements JsonSerializable { /* - * The collection of Batch accounts returned by the listing operation. + * The BatchAccount items on this page */ private List value; /* - * The continuation token. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of BatchAccountListResult class. */ - public BatchAccountListResult() { + private BatchAccountListResult() { } /** - * Get the value property: The collection of Batch accounts returned by the listing operation. + * Get the value property: The BatchAccount items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The collection of Batch accounts returned by the listing operation. - * - * @param value the value value to set. - * @return the BatchAccountListResult object itself. - */ - public BatchAccountListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The continuation token. - * - * @param nextLink the nextLink value to set. - * @return the BatchAccountListResult object itself. - */ - public BatchAccountListResult 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model BatchAccountListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(BatchAccountListResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BatchAccountListResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the BatchAccountListResult. */ public static BatchAccountListResult fromJson(JsonReader jsonReader) throws IOException { 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/implementation/models/DetectorListResult.java similarity index 69% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DetectorListResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/DetectorListResult.java index 0f7eb0fb712b..045990de34c7 100644 --- 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/implementation/models/DetectorListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,28 +15,28 @@ import java.util.List; /** - * Values returned by the List operation. + * Paged collection of DetectorResponse items. */ -@Fluent +@Immutable public final class DetectorListResult implements JsonSerializable { /* - * The collection of Batch account detectors returned by the listing operation. + * The DetectorResponse items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of DetectorListResult class. */ - public DetectorListResult() { + private DetectorListResult() { } /** - * Get the value property: The collection of Batch account detectors returned by the listing operation. + * Get the value property: The DetectorResponse items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List 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. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model DetectorListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(DetectorListResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of DetectorListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the DetectorListResult. */ public static DetectorListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListApplicationPackagesResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationPackagesResult.java similarity index 72% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListApplicationPackagesResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationPackagesResult.java index c9e12ae6b49a..da09cc3e66cc 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListApplicationPackagesResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationPackagesResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * The result of performing list application packages. */ -@Fluent +@Immutable public final class ListApplicationPackagesResult implements JsonSerializable { /* - * The list of application packages. + * The ApplicationPackage items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListApplicationPackagesResult class. */ - public ListApplicationPackagesResult() { + private ListApplicationPackagesResult() { } /** - * Get the value property: The list of application packages. + * Get the value property: The ApplicationPackage items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The list of application packages. - * - * @param value the value value to set. - * @return the ListApplicationPackagesResult object itself. - */ - public ListApplicationPackagesResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,23 @@ 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 ListApplicationPackagesResult object itself. - */ - public ListApplicationPackagesResult 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ListApplicationPackagesResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ListApplicationPackagesResult.class); + /** * {@inheritDoc} */ @@ -102,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListApplicationPackagesResult if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ListApplicationPackagesResult. */ public static ListApplicationPackagesResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListApplicationsResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationsResult.java similarity index 72% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListApplicationsResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationsResult.java index c0140c918587..78177022c8fa 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListApplicationsResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationsResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * The result of performing list applications. */ -@Fluent +@Immutable public final class ListApplicationsResult implements JsonSerializable { /* - * The list of applications. + * The Application items on this page */ private List value; /* - * The URL to get the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListApplicationsResult class. */ - public ListApplicationsResult() { + private ListApplicationsResult() { } /** - * Get the value property: The list of applications. + * Get the value property: The Application items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The list of applications. - * - * @param value the value value to set. - * @return the ListApplicationsResult object itself. - */ - public ListApplicationsResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to get the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ 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 ListApplicationsResult object itself. - */ - public ListApplicationsResult 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ListApplicationsResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ListApplicationsResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListApplicationsResult if the JsonReader was pointing to an instance of it, or null if it * was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ListApplicationsResult. */ public static ListApplicationsResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPoolsResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPoolsResult.java similarity index 73% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPoolsResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPoolsResult.java index e8bb1ec0f808..34e6e7578487 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPoolsResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPoolsResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * Values returned by the List operation. */ -@Fluent +@Immutable public final class ListPoolsResult implements JsonSerializable { /* - * The collection of returned pools. + * The Pool items on this page */ private List value; /* - * The continuation token. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListPoolsResult class. */ - public ListPoolsResult() { + private ListPoolsResult() { } /** - * Get the value property: The collection of returned pools. + * Get the value property: The Pool items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The collection of returned pools. - * - * @param value the value value to set. - * @return the ListPoolsResult object itself. - */ - public ListPoolsResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,22 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The continuation token. - * - * @param nextLink the nextLink value to set. - * @return the ListPoolsResult object itself. - */ - public ListPoolsResult 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ListPoolsResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ListPoolsResult.class); + /** * {@inheritDoc} */ @@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListPoolsResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ListPoolsResult. */ public static ListPoolsResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPrivateEndpointConnectionsResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateEndpointConnectionsResult.java similarity index 72% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPrivateEndpointConnectionsResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateEndpointConnectionsResult.java index 31564836a41b..b406eca14c56 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPrivateEndpointConnectionsResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateEndpointConnectionsResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,27 +17,27 @@ /** * Values returned by the List operation. */ -@Fluent +@Immutable public final class ListPrivateEndpointConnectionsResult implements JsonSerializable { /* - * The collection of returned private endpoint connection. + * The PrivateEndpointConnection items on this page */ private List value; /* - * The continuation token. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListPrivateEndpointConnectionsResult class. */ - public ListPrivateEndpointConnectionsResult() { + private ListPrivateEndpointConnectionsResult() { } /** - * Get the value property: The collection of returned private endpoint connection. + * Get the value property: The PrivateEndpointConnection items on this page. * * @return the value value. */ @@ -45,18 +46,7 @@ public List value() { } /** - * Set the value property: The collection of returned private endpoint connection. - * - * @param value the value value to set. - * @return the ListPrivateEndpointConnectionsResult object itself. - */ - public ListPrivateEndpointConnectionsResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -64,28 +54,23 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The continuation token. - * - * @param nextLink the nextLink value to set. - * @return the ListPrivateEndpointConnectionsResult object itself. - */ - public ListPrivateEndpointConnectionsResult 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ListPrivateEndpointConnectionsResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ListPrivateEndpointConnectionsResult.class); + /** * {@inheritDoc} */ @@ -103,6 +88,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListPrivateEndpointConnectionsResult if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ListPrivateEndpointConnectionsResult. */ public static ListPrivateEndpointConnectionsResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPrivateLinkResourcesResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateLinkResourcesResult.java similarity index 72% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPrivateLinkResourcesResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateLinkResourcesResult.java index 92ad60a0f6dc..be0b84caf7fe 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListPrivateLinkResourcesResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateLinkResourcesResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,26 +17,26 @@ /** * Values returned by the List operation. */ -@Fluent +@Immutable public final class ListPrivateLinkResourcesResult implements JsonSerializable { /* - * The collection of returned private link resources. + * The PrivateLinkResource items on this page */ private List value; /* - * The continuation token. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of ListPrivateLinkResourcesResult class. */ - public ListPrivateLinkResourcesResult() { + private ListPrivateLinkResourcesResult() { } /** - * Get the value property: The collection of returned private link resources. + * Get the value property: The PrivateLinkResource items on this page. * * @return the value value. */ @@ -44,18 +45,7 @@ public List value() { } /** - * Set the value property: The collection of returned private link resources. - * - * @param value the value value to set. - * @return the ListPrivateLinkResourcesResult object itself. - */ - public ListPrivateLinkResourcesResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -63,28 +53,23 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The continuation token. - * - * @param nextLink the nextLink value to set. - * @return the ListPrivateLinkResourcesResult object itself. - */ - public ListPrivateLinkResourcesResult 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ListPrivateLinkResourcesResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(ListPrivateLinkResourcesResult.class); + /** * {@inheritDoc} */ @@ -102,6 +87,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ListPrivateLinkResourcesResult if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ListPrivateLinkResourcesResult. */ public static ListPrivateLinkResourcesResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationListResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java similarity index 78% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationListResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java index a6a97346bdc2..5672d3a61e9b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationListResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * Result of a list NSP (network security perimeter) configurations request. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationListResult implements JsonSerializable { /* @@ -32,7 +32,7 @@ public final class NetworkSecurityPerimeterConfigurationListResult /** * Creates an instance of NetworkSecurityPerimeterConfigurationListResult class. */ - public NetworkSecurityPerimeterConfigurationListResult() { + private NetworkSecurityPerimeterConfigurationListResult() { } /** @@ -44,18 +44,6 @@ public List value() { return this.value; } - /** - * Set the value property: Array of network security perimeter results. - * - * @param value the value value to set. - * @return the NetworkSecurityPerimeterConfigurationListResult object itself. - */ - public NetworkSecurityPerimeterConfigurationListResult - withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The link used to get the next page of results. * @@ -65,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link used to get the next page of results. - * - * @param nextLink the nextLink value to set. - * @return the NetworkSecurityPerimeterConfigurationListResult object itself. - */ - public NetworkSecurityPerimeterConfigurationListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OperationListResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/OperationListResult.java similarity index 78% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OperationListResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/OperationListResult.java index 68803fc0553a..0158f71770db 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OperationListResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/OperationListResult.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,76 +17,69 @@ /** * Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the * next set of results. + * + * Paged collection of Operation items. */ -@Fluent +@Immutable public final class OperationListResult implements JsonSerializable { /* * The list of operations supported by the resource provider. + * + * The Operation items on this page */ private List value; /* * The URL to get the next set of operation list results if there are any. + * + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OperationListResult class. */ - public OperationListResult() { + private OperationListResult() { } /** * Get the value property: The list of operations supported by the resource provider. * + * The Operation items on this page. + * * @return the value value. */ public List value() { return this.value; } - /** - * Set the value property: The list of operations supported by the resource provider. - * - * @param value the value value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult withValue(List value) { - this.value = value; - return this; - } - /** * Get the nextLink property: The URL to get the next set of operation list results if there are any. * + * The link to the next page of items. + * * @return the nextLink value. */ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The URL to get the next set of operation list results if there are any. - * - * @param nextLink the nextLink value to set. - * @return the OperationListResult object itself. - */ - public OperationListResult 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) { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model OperationListResult")); + } else { value().forEach(e -> e.validate()); } } + private static final ClientLogger LOGGER = new ClientLogger(OperationListResult.class); + /** * {@inheritDoc} */ @@ -103,6 +97,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationListResult if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationListResult. */ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OutboundEnvironmentEndpointCollection.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/OutboundEnvironmentEndpointCollection.java similarity index 78% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OutboundEnvironmentEndpointCollection.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/OutboundEnvironmentEndpointCollection.java index 0761b71f7564..c63931ff80c8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OutboundEnvironmentEndpointCollection.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/OutboundEnvironmentEndpointCollection.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,28 +16,27 @@ /** * Values returned by the List operation. */ -@Fluent +@Immutable public final class OutboundEnvironmentEndpointCollection implements JsonSerializable { /* - * The collection of outbound network dependency endpoints returned by the listing operation. + * The OutboundEnvironmentEndpoint items on this page */ private List value; /* - * The continuation token. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of OutboundEnvironmentEndpointCollection class. */ - public OutboundEnvironmentEndpointCollection() { + private OutboundEnvironmentEndpointCollection() { } /** - * Get the value property: The collection of outbound network dependency endpoints returned by the listing - * operation. + * Get the value property: The OutboundEnvironmentEndpoint items on this page. * * @return the value value. */ @@ -46,7 +45,7 @@ public List value() { } /** - * Get the nextLink property: The continuation token. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -54,17 +53,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The continuation token. - * - * @param nextLink the nextLink value to set. - * @return the OutboundEnvironmentEndpointCollection object itself. - */ - public OutboundEnvironmentEndpointCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Validates the instance. * @@ -92,6 +80,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OutboundEnvironmentEndpointCollection if the JsonReader was pointing to an instance of it, * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OutboundEnvironmentEndpointCollection. */ public static OutboundEnvironmentEndpointCollection fromJson(JsonReader jsonReader) throws IOException { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSkusResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/SupportedSkusResult.java similarity index 79% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSkusResult.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/SupportedSkusResult.java index 42a58b6ef87a..9e2aaba549e1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSkusResult.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/models/SupportedSkusResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.batch.models; +package com.azure.resourcemanager.batch.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -17,26 +17,26 @@ /** * The Batch List supported SKUs operation response. */ -@Fluent +@Immutable public final class SupportedSkusResult implements JsonSerializable { /* - * The list of SKUs available for the Batch service in the location. + * The SupportedSku items on this page */ private List value; /* - * The URL to use for getting the next set of results. + * The link to the next page of items */ private String nextLink; /** * Creates an instance of SupportedSkusResult class. */ - public SupportedSkusResult() { + private SupportedSkusResult() { } /** - * Get the value property: The list of SKUs available for the Batch service in the location. + * Get the value property: The SupportedSku items on this page. * * @return the value value. */ @@ -45,18 +45,7 @@ public List value() { } /** - * Set the value property: The list of SKUs available for the Batch service in the location. - * - * @param value the value value to set. - * @return the SupportedSkusResult object itself. - */ - public SupportedSkusResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URL to use for getting the next set of results. + * Get the nextLink property: The link to the next page of items. * * @return the nextLink value. */ @@ -87,6 +76,7 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } 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 14dc29b13100..53b65ad29544 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 @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for BatchManagementClient. - * Batch Client. + * Package containing the implementations for Batch. + * The Batch Management Client. */ package com.azure.resourcemanager.batch.implementation; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRule.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRule.java index 2ef2bffb87bb..0a11ebca2289 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRule.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRule.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Access rule in a network security perimeter configuration profile. */ -@Fluent +@Immutable public final class AccessRule implements JsonSerializable { /* * Name of the access rule @@ -22,14 +22,14 @@ public final class AccessRule implements JsonSerializable { private String name; /* - * Properties of Access Rule + * The properties property. */ private AccessRuleProperties properties; /** * Creates an instance of AccessRule class. */ - public AccessRule() { + private AccessRule() { } /** @@ -42,18 +42,7 @@ public String name() { } /** - * Set the name property: Name of the access rule. - * - * @param name the name value to set. - * @return the AccessRule object itself. - */ - public AccessRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the properties property: Properties of Access Rule. + * Get the properties property: The properties property. * * @return the properties value. */ @@ -61,17 +50,6 @@ public AccessRuleProperties properties() { return this.properties; } - /** - * Set the properties property: Properties of Access Rule. - * - * @param properties the properties value to set. - * @return the AccessRule object itself. - */ - public AccessRule withProperties(AccessRuleProperties properties) { - this.properties = properties; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleDirection.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleDirection.java index 57f882f503bc..3beb356edecd 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleDirection.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleDirection.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -12,12 +12,12 @@ */ public final class AccessRuleDirection extends ExpandableStringEnum { /** - * Static value Inbound for AccessRuleDirection. + * Applies to inbound network traffic to the secured resources. */ public static final AccessRuleDirection INBOUND = fromString("Inbound"); /** - * Static value Outbound for AccessRuleDirection. + * Applies to outbound network traffic from the secured resources. */ public static final AccessRuleDirection OUTBOUND = fromString("Outbound"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleProperties.java index 46b8faf3c702..60eebaa8d634 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRuleProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,10 +15,10 @@ /** * Properties of Access Rule. */ -@Fluent +@Immutable public final class AccessRuleProperties implements JsonSerializable { /* - * Direction of Access Rule + * The direction property. */ private AccessRuleDirection direction; @@ -30,7 +30,7 @@ public final class AccessRuleProperties implements JsonSerializable subscriptions; + private List subscriptions; /* * Network security perimeters for inbound rules @@ -55,11 +55,11 @@ public final class AccessRuleProperties implements JsonSerializable addressPrefixes() { return this.addressPrefixes; } - /** - * Set the addressPrefixes property: Address prefixes in the CIDR format for inbound rules. - * - * @param addressPrefixes the addressPrefixes value to set. - * @return the AccessRuleProperties object itself. - */ - public AccessRuleProperties withAddressPrefixes(List addressPrefixes) { - this.addressPrefixes = addressPrefixes; - return this; - } - /** * Get the subscriptions property: Subscriptions for inbound rules. * * @return the subscriptions value. */ - public List subscriptions() { + public List subscriptions() { return this.subscriptions; } - /** - * Set the subscriptions property: Subscriptions for inbound rules. - * - * @param subscriptions the subscriptions value to set. - * @return the AccessRuleProperties object itself. - */ - public AccessRuleProperties withSubscriptions(List subscriptions) { - this.subscriptions = subscriptions; - return this; - } - /** * Get the networkSecurityPerimeters property: Network security perimeters for inbound rules. * @@ -127,18 +94,6 @@ public List networkSecurityPerimeters() { return this.networkSecurityPerimeters; } - /** - * Set the networkSecurityPerimeters property: Network security perimeters for inbound rules. - * - * @param networkSecurityPerimeters the networkSecurityPerimeters value to set. - * @return the AccessRuleProperties object itself. - */ - public AccessRuleProperties - withNetworkSecurityPerimeters(List networkSecurityPerimeters) { - this.networkSecurityPerimeters = networkSecurityPerimeters; - return this; - } - /** * Get the fullyQualifiedDomainNames property: Fully qualified domain names (FQDN) for outbound rules. * @@ -148,17 +103,6 @@ public List fullyQualifiedDomainNames() { return this.fullyQualifiedDomainNames; } - /** - * Set the fullyQualifiedDomainNames property: Fully qualified domain names (FQDN) for outbound rules. - * - * @param fullyQualifiedDomainNames the fullyQualifiedDomainNames value to set. - * @return the AccessRuleProperties object itself. - */ - public AccessRuleProperties withFullyQualifiedDomainNames(List fullyQualifiedDomainNames) { - this.fullyQualifiedDomainNames = fullyQualifiedDomainNames; - return this; - } - /** * Get the emailAddresses property: Email addresses for outbound rules. * @@ -168,17 +112,6 @@ public List emailAddresses() { return this.emailAddresses; } - /** - * Set the emailAddresses property: Email addresses for outbound rules. - * - * @param emailAddresses the emailAddresses value to set. - * @return the AccessRuleProperties object itself. - */ - public AccessRuleProperties withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; - return this; - } - /** * Get the phoneNumbers property: Phone numbers for outbound rules. * @@ -188,17 +121,6 @@ public List phoneNumbers() { return this.phoneNumbers; } - /** - * Set the phoneNumbers property: Phone numbers for outbound rules. - * - * @param phoneNumbers the phoneNumbers value to set. - * @return the AccessRuleProperties object itself. - */ - public AccessRuleProperties withPhoneNumbers(List phoneNumbers) { - this.phoneNumbers = phoneNumbers; - return this; - } - /** * Validates the instance. * @@ -254,8 +176,8 @@ public static AccessRuleProperties fromJson(JsonReader jsonReader) throws IOExce List addressPrefixes = reader.readArray(reader1 -> reader1.getString()); deserializedAccessRuleProperties.addressPrefixes = addressPrefixes; } else if ("subscriptions".equals(fieldName)) { - List subscriptions - = reader.readArray(reader1 -> AccessRulePropertiesSubscriptionsItem.fromJson(reader1)); + List subscriptions + = reader.readArray(reader1 -> AccessRulePropertiesSubscription.fromJson(reader1)); deserializedAccessRuleProperties.subscriptions = subscriptions; } else if ("networkSecurityPerimeters".equals(fieldName)) { List networkSecurityPerimeters diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRulePropertiesSubscriptionsItem.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRulePropertiesSubscription.java similarity index 55% rename from sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRulePropertiesSubscriptionsItem.java rename to sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRulePropertiesSubscription.java index 9f3eecbcdee2..bd4aac94ef38 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRulePropertiesSubscriptionsItem.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccessRulePropertiesSubscription.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -12,11 +12,10 @@ import java.io.IOException; /** - * Subscription identifiers. + * The AccessRulePropertiesSubscription model. */ -@Fluent -public final class AccessRulePropertiesSubscriptionsItem - implements JsonSerializable { +@Immutable +public final class AccessRulePropertiesSubscription implements JsonSerializable { /* * The fully qualified Azure resource ID of the subscription e.g. * ('/subscriptions/00000000-0000-0000-0000-000000000000') @@ -24,9 +23,9 @@ public final class AccessRulePropertiesSubscriptionsItem private String id; /** - * Creates an instance of AccessRulePropertiesSubscriptionsItem class. + * Creates an instance of AccessRulePropertiesSubscription class. */ - public AccessRulePropertiesSubscriptionsItem() { + private AccessRulePropertiesSubscription() { } /** @@ -39,18 +38,6 @@ public String id() { return this.id; } - /** - * Set the id property: The fully qualified Azure resource ID of the subscription e.g. - * ('/subscriptions/00000000-0000-0000-0000-000000000000'). - * - * @param id the id value to set. - * @return the AccessRulePropertiesSubscriptionsItem object itself. - */ - public AccessRulePropertiesSubscriptionsItem withId(String id) { - this.id = id; - return this; - } - /** * Validates the instance. * @@ -70,29 +57,29 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of AccessRulePropertiesSubscriptionsItem from the JsonReader. + * Reads an instance of AccessRulePropertiesSubscription from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of AccessRulePropertiesSubscriptionsItem if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AccessRulePropertiesSubscriptionsItem. + * @return An instance of AccessRulePropertiesSubscription if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the AccessRulePropertiesSubscription. */ - public static AccessRulePropertiesSubscriptionsItem fromJson(JsonReader jsonReader) throws IOException { + public static AccessRulePropertiesSubscription fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - AccessRulePropertiesSubscriptionsItem deserializedAccessRulePropertiesSubscriptionsItem - = new AccessRulePropertiesSubscriptionsItem(); + AccessRulePropertiesSubscription deserializedAccessRulePropertiesSubscription + = new AccessRulePropertiesSubscription(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("id".equals(fieldName)) { - deserializedAccessRulePropertiesSubscriptionsItem.id = reader.getString(); + deserializedAccessRulePropertiesSubscription.id = reader.getString(); } else { reader.skipChildren(); } } - return deserializedAccessRulePropertiesSubscriptionsItem; + return deserializedAccessRulePropertiesSubscription; }); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccountKeyType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccountKeyType.java index 4ca0b72884f4..05f5fb6dd650 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccountKeyType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AccountKeyType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,12 @@ */ public enum AccountKeyType { /** - * Enum value Primary. + * The primary account key. */ PRIMARY("Primary"), /** - * Enum value Secondary. + * The secondary account key. */ SECONDARY("Secondary"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ActivateApplicationPackageParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ActivateApplicationPackageParameters.java index a4c40ad0ba20..e31161613c2b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ActivateApplicationPackageParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ActivateApplicationPackageParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AllocationState.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AllocationState.java index b6a7ce14be74..e1853b154c13 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AllocationState.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AllocationState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,17 +9,19 @@ */ public enum AllocationState { /** - * Enum value Steady. + * The pool is not resizing. There are no changes to the number of nodes in the pool in progress. A pool enters this + * state when it is created and when no operations are being performed on the pool to change the number of nodes. */ STEADY("Steady"), /** - * Enum value Resizing. + * The pool is resizing; that is, compute nodes are being added to or removed from the pool. */ RESIZING("Resizing"), /** - * Enum value Stopping. + * The pool was resizing, but the user has requested that the resize be stopped, but the stop request has not yet + * been completed. */ STOPPING("Stopping"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java index 5e5d3e075536..1b7d2d761931 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Application.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.ApplicationInner; import java.util.Map; @@ -47,6 +48,13 @@ public interface Application { */ Map tags(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the displayName property: The display name for the application. * @@ -108,8 +116,11 @@ interface WithParentResource { /** * Specifies resourceGroupName, accountName. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account + * names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This + * name is used as part of the DNS name that is used to access the Batch service in the region in which the + * account is created. For example: http://accountname.region.batch.azure.com/. * @return the next definition stage. */ WithCreate withExistingBatchAccount(String resourceGroupName, String accountName); 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 367a43dcdc53..8a6f0c56e2c7 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 @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner; import java.time.OffsetDateTime; @@ -49,6 +50,13 @@ public interface ApplicationPackage { */ Map tags(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the state property: The current state of the application package. * @@ -115,8 +123,11 @@ interface WithParentResource { /** * Specifies resourceGroupName, accountName, applicationName. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account + * names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This + * name is used as part of the DNS name that is used to access the Batch service in the region in which the + * account is created. For example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @return the next definition stage. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackageReference.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackageReference.java index 22e7e65113f7..c9b3fd0edd87 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackageReference.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackageReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -18,12 +18,17 @@ @Fluent public final class ApplicationPackageReference implements JsonSerializable { /* + * The ID of the application package to install. This must be inside the same Batch account as the pool. This can + * either be a reference to a specific version or the default version if one exists. + * * The ID of the application package to install. This must be inside the same batch account as the pool. This can * either be a reference to a specific version or the default version if one exists. */ private String id; /* + * The version of the application to deploy. If omitted, the default version is deployed. + * * If this is omitted, and no default version is specified for this application, the request fails with the error * code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409. */ @@ -36,9 +41,12 @@ public ApplicationPackageReference() { } /** - * Get the id property: The ID of the application package to install. This must be inside the same batch account as + * Get the id property: The ID of the application package to install. This must be inside the same Batch account as * the pool. This can either be a reference to a specific version or the default version if one exists. * + * The ID of the application package to install. This must be inside the same batch account as the pool. This can + * either be a reference to a specific version or the default version if one exists. + * * @return the id value. */ public String id() { @@ -46,9 +54,12 @@ public String id() { } /** - * Set the id property: The ID of the application package to install. This must be inside the same batch account as + * Set the id property: The ID of the application package to install. This must be inside the same Batch account as * the pool. This can either be a reference to a specific version or the default version if one exists. * + * The ID of the application package to install. This must be inside the same batch account as the pool. This can + * either be a reference to a specific version or the default version if one exists. + * * @param id the id value to set. * @return the ApplicationPackageReference object itself. */ @@ -58,9 +69,10 @@ public ApplicationPackageReference withId(String id) { } /** - * Get the version property: If this is omitted, and no default version is specified for this application, the - * request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, - * the HTTP status code is 409. + * Get the version property: The version of the application to deploy. If omitted, the default version is deployed. + * + * If this is omitted, and no default version is specified for this application, the request fails with the error + * code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409. * * @return the version value. */ @@ -69,9 +81,10 @@ public String version() { } /** - * Set the version property: If this is omitted, and no default version is specified for this application, the - * request fails with the error code InvalidApplicationPackageReferences. If you are calling the REST API directly, - * the HTTP status code is 409. + * Set the version property: The version of the application to deploy. If omitted, the default version is deployed. + * + * If this is omitted, and no default version is specified for this application, the request fails with the error + * code InvalidApplicationPackageReferences. If you are calling the REST API directly, the HTTP status code is 409. * * @param version the version value to set. * @return the ApplicationPackageReference object itself. 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 f2f13f733677..2fb088a345cd 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -13,46 +13,49 @@ */ public interface ApplicationPackages { /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application along with - * {@link Response}. + * @return information about the specified application package along with {@link Response}. */ - Response activateWithResponse(String resourceGroupName, String accountName, - String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context); + Response getWithResponse(String resourceGroupName, String accountName, String applicationName, + String versionName, Context context); /** - * Activates the specified application package. This should be done after the `ApplicationPackage` was created and - * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. + * Gets information about the specified application package. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. - * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an application package which represents a particular version of an application. + * @return information about the specified application package. */ - ApplicationPackage activate(String resourceGroupName, String accountName, String applicationName, - String versionName, ActivateApplicationPackageParameters parameters); + ApplicationPackage get(String resourceGroupName, String accountName, String applicationName, String versionName); /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @param context The context to associate with this operation. @@ -67,8 +70,11 @@ Response deleteWithResponse(String resourceGroupName, String accountName, /** * Deletes an application package record and its associated binary file. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param versionName The version of the application. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -78,63 +84,81 @@ Response deleteWithResponse(String resourceGroupName, String accountName, void delete(String resourceGroupName, String accountName, String applicationName, String versionName); /** - * Gets information about the specified application package. + * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. - * @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 specified application package along with {@link Response}. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String accountName, String applicationName, - String versionName, Context context); + PagedIterable list(String resourceGroupName, String accountName, String applicationName); /** - * Gets information about the specified application package. + * Lists all of the application packages in the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param versionName The version of the application. + * @param maxresults The maximum number of items to return in the response. + * @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 specified application package. + * @return the result of performing list application packages as paginated response with {@link PagedIterable}. */ - ApplicationPackage get(String resourceGroupName, String accountName, String applicationName, String versionName); + PagedIterable list(String resourceGroupName, String accountName, String applicationName, + Integer maxresults, Context context); /** - * Lists all of the application packages in the specified application. + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. + * @param versionName The version of the application. + * @param parameters The parameters for the request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedIterable}. + * @return an application package which represents a particular version of an application along with + * {@link Response}. */ - PagedIterable list(String resourceGroupName, String accountName, String applicationName); + Response activateWithResponse(String resourceGroupName, String accountName, + String applicationName, String versionName, ActivateApplicationPackageParameters parameters, Context context); /** - * Lists all of the application packages in the specified application. + * Activates the specified application package. This should be done after the `ApplicationPackage` was created and + * uploaded. This needs to be done before an `ApplicationPackage` can be used on Pools or Tasks. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. - * @param maxresults The maximum number of items to return in the response. - * @param context The context to associate with this operation. + * @param versionName The version of the application. + * @param parameters The parameters for the request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of performing list application packages as paginated response with {@link PagedIterable}. + * @return an application package which represents a particular version of an application. */ - PagedIterable list(String resourceGroupName, String accountName, String applicationName, - Integer maxresults, Context context); + ApplicationPackage activate(String resourceGroupName, String accountName, String applicationName, + String versionName, ActivateApplicationPackageParameters parameters); /** * Gets information about the specified application package. 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 a4bec238d2b6..3fccdafa99e1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -13,65 +13,80 @@ */ public interface Applications { /** - * Deletes an application. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return information about the specified application along with {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, + Response getWithResponse(String resourceGroupName, String accountName, String applicationName, Context context); /** - * Deletes an application. + * Gets information about the specified application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 specified application. */ - void delete(String resourceGroupName, String accountName, String applicationName); + Application get(String resourceGroupName, String accountName, String applicationName); /** - * Gets information about the specified application. + * Deletes an application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 specified application along with {@link Response}. + * @return the {@link Response}. */ - Response getWithResponse(String resourceGroupName, String accountName, String applicationName, + Response deleteWithResponse(String resourceGroupName, String accountName, String applicationName, Context context); /** - * Gets information about the specified application. + * Deletes an application. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param applicationName The name of the application. This must be unique within the 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 specified application. */ - Application get(String resourceGroupName, String accountName, String applicationName); + void delete(String resourceGroupName, String accountName, String applicationName); /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -82,8 +97,11 @@ Response getWithResponse(String resourceGroupName, String accountNa /** * Lists all of the applications in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param maxresults The maximum number of items to return in the response. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AuthenticationMode.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AuthenticationMode.java index d5af6eb1b580..fbaf25a5bb24 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AuthenticationMode.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AuthenticationMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,17 +9,17 @@ */ public enum AuthenticationMode { /** - * Enum value SharedKey. + * The authentication mode using shared keys. */ SHARED_KEY("SharedKey"), /** - * Enum value AAD. + * The authentication mode using Microsoft Entra ID. */ AAD("AAD"), /** - * Enum value TaskAuthenticationToken. + * The authentication mode using task authentication tokens. */ TASK_AUTHENTICATION_TOKEN("TaskAuthenticationToken"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRun.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRun.java index 6feeaa2b3744..782a243b9eb6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRun.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRun.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; @@ -18,7 +18,7 @@ /** * The results and errors from an execution of a pool autoscale formula. */ -@Fluent +@Immutable public final class AutoScaleRun implements JsonSerializable { /* * The time at which the autoscale formula was last evaluated. @@ -26,11 +26,16 @@ public final class AutoScaleRun implements JsonSerializable { private OffsetDateTime evaluationTime; /* + * The final values of all variables used in the evaluation of the autoscale formula. + * * Each variable value is returned in the form $variable=value, and variables are separated by semicolons. */ private String results; /* + * Details of the error encountered evaluating the autoscale formula on the pool, if the evaluation was + * unsuccessful. + * * An error that occurred when autoscaling a pool. */ private AutoScaleRunError error; @@ -38,7 +43,7 @@ public final class AutoScaleRun implements JsonSerializable { /** * Creates an instance of AutoScaleRun class. */ - public AutoScaleRun() { + private AutoScaleRun() { } /** @@ -51,19 +56,9 @@ public OffsetDateTime evaluationTime() { } /** - * Set the evaluationTime property: The time at which the autoscale formula was last evaluated. + * Get the results property: The final values of all variables used in the evaluation of the autoscale formula. * - * @param evaluationTime the evaluationTime value to set. - * @return the AutoScaleRun object itself. - */ - public AutoScaleRun withEvaluationTime(OffsetDateTime evaluationTime) { - this.evaluationTime = evaluationTime; - return this; - } - - /** - * Get the results property: Each variable value is returned in the form $variable=value, and variables are - * separated by semicolons. + * Each variable value is returned in the form $variable=value, and variables are separated by semicolons. * * @return the results value. */ @@ -72,19 +67,10 @@ public String results() { } /** - * Set the results property: Each variable value is returned in the form $variable=value, and variables are - * separated by semicolons. + * Get the error property: Details of the error encountered evaluating the autoscale formula on the pool, if the + * evaluation was unsuccessful. * - * @param results the results value to set. - * @return the AutoScaleRun object itself. - */ - public AutoScaleRun withResults(String results) { - this.results = results; - return this; - } - - /** - * Get the error property: An error that occurred when autoscaling a pool. + * An error that occurred when autoscaling a pool. * * @return the error value. */ @@ -92,17 +78,6 @@ public AutoScaleRunError error() { return this.error; } - /** - * Set the error property: An error that occurred when autoscaling a pool. - * - * @param error the error value to set. - * @return the AutoScaleRun object itself. - */ - public AutoScaleRun withError(AutoScaleRunError error) { - this.error = error; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRunError.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRunError.java index 578ff2ff7b6b..d22573e77725 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRunError.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRunError.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,7 +16,7 @@ /** * An error that occurred when autoscaling a pool. */ -@Fluent +@Immutable public final class AutoScaleRunError implements JsonSerializable { /* * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -36,7 +36,7 @@ public final class AutoScaleRunError implements JsonSerializable details() { return this.details; } - /** - * Set the details property: Additional details about the error. - * - * @param details the details value to set. - * @return the AutoScaleRunError object itself. - */ - public AutoScaleRunError withDetails(List details) { - this.details = details; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleSettings.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleSettings.java index 2bc277eb50fc..f7bea2d3a7c4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleSettings.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AutoScaleSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -25,6 +25,8 @@ public final class AutoScaleSettings implements JsonSerializable { /* + * The scope for the auto user + * * The default value is Pool. If the pool is running Windows a value of Task should be specified if stricter * isolation between tasks is required. For example, if the task mutates the registry in a way which could impact * other tasks, or if certificates have been specified on the pool which should not be accessible by normal tasks @@ -25,6 +27,8 @@ public final class AutoUserSpecification implements JsonSerializable
If this is set to true for Windows based pools, - * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/ - * create?tabs=HTTP#windowsconfiguration) cannot be set to true. + * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchmanagement/pool/create? + * tabs=HTTP#windowsconfiguration) cannot be set to true. */ private Boolean enableAutomaticOSUpgrade; @@ -70,7 +70,7 @@ public AutomaticOSUpgradePolicy withDisableAutomaticRollback(Boolean disableAuto * Get the enableAutomaticOSUpgrade property: Indicates whether OS upgrades should automatically be applied to scale * set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br * /> If this is set to true for Windows based pools, - * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration) + * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration) * cannot be set to true. * * @return the enableAutomaticOSUpgrade value. @@ -83,7 +83,7 @@ public Boolean enableAutomaticOSUpgrade() { * Set the enableAutomaticOSUpgrade property: Indicates whether OS upgrades should automatically be applied to scale * set instances in a rolling fashion when a newer version of the OS image becomes available. <br /><br * /> If this is set to true for Windows based pools, - * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration) + * [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration) * cannot be set to true. * * @param enableAutomaticOSUpgrade the enableAutomaticOSUpgrade value to set. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureBlobFileSystemConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureBlobFileSystemConfiguration.java index 5d38c6cfc15e..3831108a45d9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureBlobFileSystemConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureBlobFileSystemConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -28,27 +28,37 @@ public final class AzureBlobFileSystemConfiguration implements JsonSerializable< private String containerName; /* + * The Azure Storage Account key. + * * This property is mutually exclusive with both sasKey and identity; exactly one must be specified. */ private String accountKey; /* + * The Azure Storage SAS token. + * * This property is mutually exclusive with both accountKey and identity; exactly one must be specified. */ private String sasKey; /* + * Additional command line options to pass to the mount command. + * * These are 'net use' options in Windows and 'mount' options in Linux. */ private String blobfuseOptions; /* + * The relative path on the compute node where the file system will be mounted + * * All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR * environment variable. */ private String relativeMountPath; /* + * The reference to the user assigned identity to use to access containerName + * * This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified. */ private ComputeNodeIdentityReference identityReference; @@ -100,8 +110,9 @@ public AzureBlobFileSystemConfiguration withContainerName(String containerName) } /** - * Get the accountKey property: This property is mutually exclusive with both sasKey and identity; exactly one must - * be specified. + * Get the accountKey property: The Azure Storage Account key. + * + * This property is mutually exclusive with both sasKey and identity; exactly one must be specified. * * @return the accountKey value. */ @@ -110,8 +121,9 @@ public String accountKey() { } /** - * Set the accountKey property: This property is mutually exclusive with both sasKey and identity; exactly one must - * be specified. + * Set the accountKey property: The Azure Storage Account key. + * + * This property is mutually exclusive with both sasKey and identity; exactly one must be specified. * * @param accountKey the accountKey value to set. * @return the AzureBlobFileSystemConfiguration object itself. @@ -122,8 +134,9 @@ public AzureBlobFileSystemConfiguration withAccountKey(String accountKey) { } /** - * Get the sasKey property: This property is mutually exclusive with both accountKey and identity; exactly one must - * be specified. + * Get the sasKey property: The Azure Storage SAS token. + * + * This property is mutually exclusive with both accountKey and identity; exactly one must be specified. * * @return the sasKey value. */ @@ -132,8 +145,9 @@ public String sasKey() { } /** - * Set the sasKey property: This property is mutually exclusive with both accountKey and identity; exactly one must - * be specified. + * Set the sasKey property: The Azure Storage SAS token. + * + * This property is mutually exclusive with both accountKey and identity; exactly one must be specified. * * @param sasKey the sasKey value to set. * @return the AzureBlobFileSystemConfiguration object itself. @@ -144,7 +158,9 @@ public AzureBlobFileSystemConfiguration withSasKey(String sasKey) { } /** - * Get the blobfuseOptions property: These are 'net use' options in Windows and 'mount' options in Linux. + * Get the blobfuseOptions property: Additional command line options to pass to the mount command. + * + * These are 'net use' options in Windows and 'mount' options in Linux. * * @return the blobfuseOptions value. */ @@ -153,7 +169,9 @@ public String blobfuseOptions() { } /** - * Set the blobfuseOptions property: These are 'net use' options in Windows and 'mount' options in Linux. + * Set the blobfuseOptions property: Additional command line options to pass to the mount command. + * + * These are 'net use' options in Windows and 'mount' options in Linux. * * @param blobfuseOptions the blobfuseOptions value to set. * @return the AzureBlobFileSystemConfiguration object itself. @@ -164,8 +182,10 @@ public AzureBlobFileSystemConfiguration withBlobfuseOptions(String blobfuseOptio } /** - * Get the relativeMountPath property: All file systems are mounted relative to the Batch mounts directory, - * accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + * Get the relativeMountPath property: The relative path on the compute node where the file system will be mounted + * + * All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR + * environment variable. * * @return the relativeMountPath value. */ @@ -174,8 +194,10 @@ public String relativeMountPath() { } /** - * Set the relativeMountPath property: All file systems are mounted relative to the Batch mounts directory, - * accessible via the AZ_BATCH_NODE_MOUNTS_DIR environment variable. + * Set the relativeMountPath property: The relative path on the compute node where the file system will be mounted + * + * All file systems are mounted relative to the Batch mounts directory, accessible via the AZ_BATCH_NODE_MOUNTS_DIR + * environment variable. * * @param relativeMountPath the relativeMountPath value to set. * @return the AzureBlobFileSystemConfiguration object itself. @@ -186,8 +208,9 @@ public AzureBlobFileSystemConfiguration withRelativeMountPath(String relativeMou } /** - * Get the identityReference property: This property is mutually exclusive with both accountKey and sasKey; exactly - * one must be specified. + * Get the identityReference property: The reference to the user assigned identity to use to access containerName + * + * This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified. * * @return the identityReference value. */ @@ -196,8 +219,9 @@ public ComputeNodeIdentityReference identityReference() { } /** - * Set the identityReference property: This property is mutually exclusive with both accountKey and sasKey; exactly - * one must be specified. + * Set the identityReference property: The reference to the user assigned identity to use to access containerName + * + * This property is mutually exclusive with both accountKey and sasKey; exactly one must be specified. * * @param identityReference the identityReference value to set. * @return the AzureBlobFileSystemConfiguration object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureFileShareConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureFileShareConfiguration.java index 58cd832729d5..6ea6e229e299 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureFileShareConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/AzureFileShareConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -23,6 +23,8 @@ public final class AzureFileShareConfiguration implements JsonSerializable tags; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of AzureProxyResource class. - */ - public AzureProxyResource() { - } - - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: The ETag of the resource, used for concurrency statements. - * - * @param etag the etag value to set. - * @return the AzureProxyResource object itself. - */ - AzureProxyResource withEtag(String etag) { - this.etag = etag; - return this; - } - - /** - * Get the tags property: The tags of the resource. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The tags of the resource. - * - * @param tags the tags value to set. - * @return the AzureProxyResource object itself. - */ - public AzureProxyResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureProxyResource from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureProxyResource if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AzureProxyResource. - */ - public static AzureProxyResource fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureProxyResource deserializedAzureProxyResource = new AzureProxyResource(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAzureProxyResource.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAzureProxyResource.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAzureProxyResource.type = reader.getString(); - } else if ("etag".equals(fieldName)) { - deserializedAzureProxyResource.etag = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedAzureProxyResource.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedAzureProxyResource; - }); - } -} 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 78c0adaeab6d..6116ed9925e8 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 @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.BatchAccountInner; import java.util.List; @@ -57,6 +58,13 @@ public interface BatchAccount { */ BatchAccountIdentity identity(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the accountEndpoint property: The account endpoint used to interact with the Batch service. * @@ -80,28 +88,38 @@ public interface BatchAccount { ProvisioningState provisioningState(); /** - * Gets the poolAllocationMode property: The allocation mode for creating pools in the Batch account. + * Gets the poolAllocationMode property: The allocation mode to use for creating pools in the Batch account. + * + * The allocation mode for creating pools in the Batch account. * * @return the poolAllocationMode value. */ PoolAllocationMode poolAllocationMode(); /** - * Gets the keyVaultReference property: Identifies the Azure key vault associated with a Batch account. + * Gets the keyVaultReference property: A reference to the Azure key vault associated with the Batch account. + * + * Identifies the Azure key vault associated with a Batch account. * * @return the keyVaultReference value. */ KeyVaultReference keyVaultReference(); /** - * Gets the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Gets the publicNetworkAccess property: The network interface type for accessing Azure Batch service and Batch + * account operations. + * + * The network access type for operating on the resources in the Batch account. * * @return the publicNetworkAccess value. */ PublicNetworkAccessType publicNetworkAccess(); /** - * Gets the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * Gets the networkProfile property: Network profile for Batch account, which contains network rule settings for + * each endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled. * * @return the networkProfile value. */ @@ -116,33 +134,40 @@ public interface BatchAccount { List privateEndpointConnections(); /** - * Gets the autoStorage property: Contains information about the auto-storage account associated with a Batch + * Gets the autoStorage property: The properties and status of any auto-storage account associated with the Batch * account. * + * Contains information about the auto-storage account associated with a Batch account. + * * @return the autoStorage value. */ AutoStorageProperties autoStorage(); /** - * Gets the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Gets the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @return the encryption value. */ EncryptionProperties encryption(); /** - * Gets the dedicatedCoreQuota property: For accounts with PoolAllocationMode set to UserSubscription, quota is - * managed on the subscription so this value is not returned. + * Gets the dedicatedCoreQuota property: The dedicated 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 dedicatedCoreQuota value. */ Integer dedicatedCoreQuota(); /** - * Gets the lowPriorityCoreQuota property: For accounts with PoolAllocationMode set to UserSubscription, quota is - * managed on the subscription so this value is not returned. + * 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. */ @@ -158,10 +183,12 @@ public interface BatchAccount { List dedicatedCoreQuotaPerVMFamily(); /** - * Gets the dedicatedCoreQuotaPerVMFamilyEnforced property: If this flag is true, dedicated core quota is enforced - * via both the dedicatedCoreQuotaPerVMFamily and dedicatedCoreQuota properties on the account. If this flag is - * false, dedicated core quota is enforced only via the dedicatedCoreQuota property on the account and does not - * consider Virtual Machine family. + * Gets the dedicatedCoreQuotaPerVMFamilyEnforced property: A value indicating whether core quotas per Virtual + * Machine family are enforced for this account + * + * If this flag is true, dedicated core quota is enforced via both the dedicatedCoreQuotaPerVMFamily and + * dedicatedCoreQuota properties on the account. If this flag is false, dedicated core quota is enforced only via + * the dedicatedCoreQuota property on the account and does not consider Virtual Machine family. * * @return the dedicatedCoreQuotaPerVMFamilyEnforced value. */ @@ -262,7 +289,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -337,14 +364,18 @@ interface WithAutoStorage { */ interface WithPoolAllocationMode { /** - * Specifies the poolAllocationMode property: The pool allocation mode also affects how clients may - * authenticate to the Batch Service API. If the mode is BatchService, clients may authenticate using access - * keys or Microsoft Entra ID. If the mode is UserSubscription, clients must use Microsoft Entra ID. The - * default is BatchService.. - * - * @param poolAllocationMode The pool allocation mode also affects how clients may authenticate to the Batch - * Service API. If the mode is BatchService, clients may authenticate using access keys or Microsoft Entra - * ID. If the mode is UserSubscription, clients must use Microsoft Entra ID. The default is BatchService. + * Specifies the poolAllocationMode property: The allocation mode to use for creating pools in the Batch + * account. + * + * The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode + * is BatchService, clients may authenticate using access keys or Microsoft Entra ID. If the mode is + * UserSubscription, clients must use Microsoft Entra ID. The default is BatchService.. + * + * @param poolAllocationMode The allocation mode to use for creating pools in the Batch account. + * + * The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode + * is BatchService, clients may authenticate using access keys or Microsoft Entra ID. If the mode is + * UserSubscription, clients must use Microsoft Entra ID. The default is BatchService. * @return the next definition stage. */ WithCreate withPoolAllocationMode(PoolAllocationMode poolAllocationMode); @@ -369,9 +400,13 @@ interface WithKeyVaultReference { */ interface WithPublicNetworkAccess { /** - * Specifies the publicNetworkAccess property: If not specified, the default value is 'enabled'.. + * Specifies the publicNetworkAccess property: The network access type for accessing Azure Batch account. * - * @param publicNetworkAccess If not specified, the default value is 'enabled'. + * The network access type for operating on the resources in the Batch account.. + * + * @param publicNetworkAccess The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * @return the next definition stage. */ WithCreate withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess); @@ -382,10 +417,15 @@ interface WithPublicNetworkAccess { */ interface WithNetworkProfile { /** - * Specifies the networkProfile property: The network profile only takes effect when publicNetworkAccess is - * enabled.. + * Specifies the networkProfile property: Network profile for Batch account, which contains network rule + * settings for each endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled.. + * + * @param networkProfile Network profile for Batch account, which contains network rule settings for each + * endpoint. * - * @param networkProfile The network profile only takes effect when publicNetworkAccess is enabled. + * The network profile only takes effect when publicNetworkAccess is enabled. * @return the next definition stage. */ WithCreate withNetworkProfile(NetworkProfile networkProfile); @@ -396,13 +436,15 @@ interface WithNetworkProfile { */ interface WithEncryption { /** - * Specifies the encryption property: Configures how customer data is encrypted inside the Batch account. By - * default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed - * key can be used instead.. + * Specifies the encryption property: The encryption configuration for the Batch account. * - * @param encryption Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can - * be used instead. + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted + * using a Microsoft managed key. For additional control, a customer-managed key can be used instead.. + * + * @param encryption The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted + * using a Microsoft managed key. For additional control, a customer-managed key can be used instead. * @return the next definition stage. */ WithCreate withEncryption(EncryptionProperties encryption); @@ -502,13 +544,15 @@ interface WithAutoStorage { */ interface WithEncryption { /** - * Specifies the encryption property: Configures how customer data is encrypted inside the Batch account. By - * default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed - * key can be used instead.. + * Specifies the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted + * using a Microsoft managed key. For additional control, a customer-managed key can be used instead.. + * + * @param encryption The encryption configuration for the Batch account. * - * @param encryption Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can - * be used instead. + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted + * using a Microsoft managed key. For additional control, a customer-managed key can be used instead. * @return the next definition stage. */ Update withEncryption(EncryptionProperties encryption); @@ -535,9 +579,13 @@ interface WithAllowedAuthenticationModes { */ interface WithPublicNetworkAccess { /** - * Specifies the publicNetworkAccess property: If not specified, the default value is 'enabled'.. + * Specifies the publicNetworkAccess property: The network access type for accessing Azure Batch account. * - * @param publicNetworkAccess If not specified, the default value is 'enabled'. + * The network access type for operating on the resources in the Batch account.. + * + * @param publicNetworkAccess The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * @return the next definition stage. */ Update withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess); @@ -548,10 +596,15 @@ interface WithPublicNetworkAccess { */ interface WithNetworkProfile { /** - * Specifies the networkProfile property: The network profile only takes effect when publicNetworkAccess is - * enabled.. + * Specifies the networkProfile property: Network profile for Batch account, which contains network rule + * settings for each endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled.. + * + * @param networkProfile Network profile for Batch account, which contains network rule settings for each + * endpoint. * - * @param networkProfile The network profile only takes effect when publicNetworkAccess is enabled. + * The network profile only takes effect when publicNetworkAccess is enabled. * @return the next definition stage. */ Update withNetworkProfile(NetworkProfile networkProfile); @@ -639,7 +692,10 @@ Response regenerateKeyWithResponse(BatchAccountRegenerateKeyPa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 along with {@link Response}. + * @return the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey' along with + * {@link Response}. */ Response getKeysWithResponse(Context context); @@ -652,7 +708,9 @@ Response regenerateKeyWithResponse(BatchAccountRegenerateKeyPa * * @throws com.azure.core.management.exception.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 the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. */ BatchAccountKeys getKeys(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java index 09f60a70cab5..500b1ccf75d5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -139,9 +139,11 @@ public BatchAccountCreateParameters withAutoStorage(AutoStorageBaseProperties au } /** - * Get the poolAllocationMode property: The pool allocation mode also affects how clients may authenticate to the - * Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Microsoft Entra ID. - * If the mode is UserSubscription, clients must use Microsoft Entra ID. The default is BatchService. + * Get the poolAllocationMode property: The allocation mode to use for creating pools in the Batch account. + * + * The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is + * BatchService, clients may authenticate using access keys or Microsoft Entra ID. If the mode is UserSubscription, + * clients must use Microsoft Entra ID. The default is BatchService. * * @return the poolAllocationMode value. */ @@ -150,9 +152,11 @@ public PoolAllocationMode poolAllocationMode() { } /** - * Set the poolAllocationMode property: The pool allocation mode also affects how clients may authenticate to the - * Batch Service API. If the mode is BatchService, clients may authenticate using access keys or Microsoft Entra ID. - * If the mode is UserSubscription, clients must use Microsoft Entra ID. The default is BatchService. + * Set the poolAllocationMode property: The allocation mode to use for creating pools in the Batch account. + * + * The pool allocation mode also affects how clients may authenticate to the Batch Service API. If the mode is + * BatchService, clients may authenticate using access keys or Microsoft Entra ID. If the mode is UserSubscription, + * clients must use Microsoft Entra ID. The default is BatchService. * * @param poolAllocationMode the poolAllocationMode value to set. * @return the BatchAccountCreateParameters object itself. @@ -189,7 +193,9 @@ public BatchAccountCreateParameters withKeyVaultReference(KeyVaultReference keyV } /** - * Get the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Get the publicNetworkAccess property: The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * * @return the publicNetworkAccess value. */ @@ -198,7 +204,9 @@ public PublicNetworkAccessType publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Set the publicNetworkAccess property: The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the BatchAccountCreateParameters object itself. @@ -212,7 +220,10 @@ public BatchAccountCreateParameters withPublicNetworkAccess(PublicNetworkAccessT } /** - * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * Get the networkProfile property: Network profile for Batch account, which contains network rule settings for each + * endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled. * * @return the networkProfile value. */ @@ -221,7 +232,10 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * Set the networkProfile property: Network profile for Batch account, which contains network rule settings for each + * endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled. * * @param networkProfile the networkProfile value to set. * @return the BatchAccountCreateParameters object itself. @@ -235,9 +249,10 @@ public BatchAccountCreateParameters withNetworkProfile(NetworkProfile networkPro } /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Get the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @return the encryption value. */ @@ -246,9 +261,10 @@ public EncryptionProperties encryption() { } /** - * Set the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Set the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @param encryption the encryption value to set. * @return the BatchAccountCreateParameters object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountIdentity.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountIdentity.java index c4c82e799156..a1bb19d80c10 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountIdentity.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountKeys.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountKeys.java index 9f4244364896..d27a790a75a8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountKeys.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountKeys.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountRegenerateKeyParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountRegenerateKeyParameters.java index b0bd9f1546b8..26c84d72a230 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountRegenerateKeyParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountRegenerateKeyParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java index 1e7943190fdf..650758d61783 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -113,9 +113,10 @@ public BatchAccountUpdateParameters withAutoStorage(AutoStorageBaseProperties au } /** - * Get the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Get the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @return the encryption value. */ @@ -124,9 +125,10 @@ public EncryptionProperties encryption() { } /** - * Set the encryption property: Configures how customer data is encrypted inside the Batch account. By default, - * accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used - * instead. + * Set the encryption property: The encryption configuration for the Batch account. + * + * Configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a + * Microsoft managed key. For additional control, a customer-managed key can be used instead. * * @param encryption the encryption value to set. * @return the BatchAccountUpdateParameters object itself. @@ -166,7 +168,9 @@ public List allowedAuthenticationModes() { } /** - * Get the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Get the publicNetworkAccess property: The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * * @return the publicNetworkAccess value. */ @@ -175,7 +179,9 @@ public PublicNetworkAccessType publicNetworkAccess() { } /** - * Set the publicNetworkAccess property: If not specified, the default value is 'enabled'. + * Set the publicNetworkAccess property: The network access type for accessing Azure Batch account. + * + * The network access type for operating on the resources in the Batch account. * * @param publicNetworkAccess the publicNetworkAccess value to set. * @return the BatchAccountUpdateParameters object itself. @@ -189,7 +195,10 @@ public BatchAccountUpdateParameters withPublicNetworkAccess(PublicNetworkAccessT } /** - * Get the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * Get the networkProfile property: Network profile for Batch account, which contains network rule settings for each + * endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled. * * @return the networkProfile value. */ @@ -198,7 +207,10 @@ public NetworkProfile networkProfile() { } /** - * Set the networkProfile property: The network profile only takes effect when publicNetworkAccess is enabled. + * Set the networkProfile property: Network profile for Batch account, which contains network rule settings for each + * endpoint. + * + * The network profile only takes effect when publicNetworkAccess is enabled. * * @param networkProfile the networkProfile value to set. * @return the BatchAccountUpdateParameters object itself. 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 b0ddf2582136..ff1a2c3511ff 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -12,34 +12,14 @@ * Resource collection API of BatchAccounts. */ public interface BatchAccounts { - /** - * Deletes the specified 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. - */ - void deleteByResourceGroup(String resourceGroupName, String accountName); - - /** - * Deletes the specified 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. - */ - void delete(String resourceGroupName, String accountName, Context context); - /** * Gets information about the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -52,8 +32,11 @@ Response getByResourceGroupWithResponse(String resourceGroupName, /** * Gets information about the specified Batch account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -62,31 +45,38 @@ Response getByResourceGroupWithResponse(String resourceGroupName, BatchAccount getByResourceGroup(String resourceGroupName, String accountName); /** - * Gets information about the Batch accounts associated with the subscription. + * Deletes the specified Batch account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 as paginated response with - * {@link PagedIterable}. */ - PagedIterable list(); + void deleteByResourceGroup(String resourceGroupName, String accountName); /** - * Gets information about the Batch accounts associated with the subscription. + * Deletes the specified Batch account. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 Batch accounts associated with the subscription as paginated response with - * {@link PagedIterable}. */ - PagedIterable list(Context context); + void delete(String resourceGroupName, String accountName, Context context); /** * Gets information about the Batch accounts associated with the specified resource group. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -98,7 +88,7 @@ Response getByResourceGroupWithResponse(String resourceGroupName, /** * Gets information about the Batch accounts associated with the specified resource group. * - * @param resourceGroupName The name of the resource group that contains the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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. @@ -108,12 +98,37 @@ Response getByResourceGroupWithResponse(String resourceGroupName, */ PagedIterable listByResourceGroup(String resourceGroupName, Context context); + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @throws com.azure.core.management.exception.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 as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Gets information about the Batch accounts associated with the subscription. + * + * @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 Batch accounts associated with the subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(Context context); + /** * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -127,8 +142,11 @@ Response synchronizeAutoStorageKeysWithResponse(String resourceGroupName, * Synchronizes access keys for the auto-storage account configured for the specified Batch account, only if storage * key authentication is being used. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -143,8 +161,11 @@ Response synchronizeAutoStorageKeysWithResponse(String resourceGroupName, * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -163,8 +184,11 @@ Response regenerateKeyWithResponse(String resourceGroupName, S * authenticate, and must use another allowedAuthenticationModes instead. In this case, regenerating the keys will * fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param parameters The type of key to regenerate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -181,13 +205,19 @@ BatchAccountKeys regenerateKey(String resourceGroupName, String accountName, * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 a set of Azure Batch account keys along with {@link Response}. + * @return the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey' along with + * {@link Response}. */ Response getKeysWithResponse(String resourceGroupName, String accountName, Context context); @@ -198,47 +228,69 @@ BatchAccountKeys regenerateKey(String resourceGroupName, String accountName, * Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to * authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 the account keys for the specified Batch account. + * + * This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. */ BatchAccountKeys getKeys(String resourceGroupName, String accountName); /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDetectors(String resourceGroupName, String accountName); + PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, + String accountName); /** - * Gets information about the detectors available for a given Batch account. + * 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 + * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to + * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see + * https://learn.microsoft.com/azure/batch/batch-virtual-network. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - PagedIterable listDetectors(String resourceGroupName, String accountName, Context context); + PagedIterable listOutboundNetworkDependenciesEndpoints(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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param detectorId The name of the detector. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -252,8 +304,11 @@ Response getDetectorWithResponse(String resourceGroupName, Str /** * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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. @@ -263,39 +318,37 @@ Response getDetectorWithResponse(String resourceGroupName, Str DetectorResponse getDetector(String resourceGroupName, String accountName, String detectorId); /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + * @return information about the detectors available for a given Batch account as paginated response with + * {@link PagedIterable}. */ - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String accountName); + PagedIterable listDetectors(String resourceGroupName, String accountName); /** - * 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 - * network allows outbound access to these endpoints. Failure to allow access to these endpoints may cause Batch to - * mark the affected nodes as unusable. For more information about creating a pool inside of a virtual network, see - * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network. + * 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 resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the detectors available for a given Batch account as paginated response with + * {@link PagedIterable}. */ - PagedIterable listOutboundNetworkDependenciesEndpoints(String resourceGroupName, - String accountName, Context context); + PagedIterable listDetectors(String resourceGroupName, String accountName, Context context); /** * Gets information about the specified Batch account. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchLocationQuota.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchLocationQuota.java index 885abe08a8eb..52347225cb8f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchLocationQuota.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchLocationQuota.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchPoolIdentity.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchPoolIdentity.java index 8a271dedbce4..190076ed3958 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchPoolIdentity.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/BatchPoolIdentity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CachingType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CachingType.java index fb28e48ec946..83c135af093c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CachingType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CachingType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,17 +9,17 @@ */ public enum CachingType { /** - * Enum value None. + * The caching mode for the disk is not enabled. */ NONE("None"), /** - * Enum value ReadOnly. + * The caching mode for the disk is read only. */ READ_ONLY("ReadOnly"), /** - * Enum value ReadWrite. + * The caching mode for the disk is read and write. */ READ_WRITE("ReadWrite"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificate.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificate.java deleted file mode 100644 index 05b1fdc9f0a2..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificate.java +++ /dev/null @@ -1,469 +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.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * An immutable client-side representation of Certificate. - */ -public interface Certificate { - /** - * 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 tags property: The tags of the resource. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the provisioningState property: The provisioningState property. - * - * @return the provisioningState value. - */ - CertificateProvisioningState provisioningState(); - - /** - * Gets the provisioningStateTransitionTime property: The time at which the certificate entered its current state. - * - * @return the provisioningStateTransitionTime value. - */ - OffsetDateTime provisioningStateTransitionTime(); - - /** - * Gets the previousProvisioningState property: The previous provisioned state of the resource. - * - * @return the previousProvisioningState value. - */ - CertificateProvisioningState previousProvisioningState(); - - /** - * Gets the previousProvisioningStateTransitionTime property: The time at which the certificate entered its previous - * state. - * - * @return the previousProvisioningStateTransitionTime value. - */ - OffsetDateTime previousProvisioningStateTransitionTime(); - - /** - * Gets the publicData property: The public key of the certificate. - * - * @return the publicData value. - */ - String publicData(); - - /** - * Gets the deleteCertificateError property: This is only returned when the certificate provisioningState is - * 'Failed'. - * - * @return the deleteCertificateError value. - */ - DeleteCertificateError deleteCertificateError(); - - /** - * Gets the thumbprintAlgorithm property: This must match the first portion of the certificate name. Currently - * required to be 'SHA1'. - * - * @return the thumbprintAlgorithm value. - */ - String thumbprintAlgorithm(); - - /** - * Gets the thumbprint property: This must match the thumbprint from the name. - * - * @return the thumbprint value. - */ - String thumbprint(); - - /** - * Gets the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @return the format value. - */ - CertificateFormat format(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.batch.fluent.models.CertificateInner object. - * - * @return the inner object. - */ - CertificateInner innerModel(); - - /** - * The entirety of the Certificate definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Certificate definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Certificate definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the Certificate definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, accountName. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @return the next definition stage. - */ - WithCreate withExistingBatchAccount(String resourceGroupName, String accountName); - } - - /** - * The stage of the Certificate definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPassword, - DefinitionStages.WithThumbprintAlgorithm, DefinitionStages.WithThumbprint, DefinitionStages.WithFormat, - DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { - /** - * Executes the create request. - * - * @return the created resource. - */ - Certificate create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Certificate create(Context context); - } - - /** - * The stage of the Certificate definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: The tags of the resource.. - * - * @param tags The tags of the resource. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the Certificate definition allowing to specify password. - */ - interface WithPassword { - /** - * Specifies the password property: This must not be specified if the certificate format is Cer.. - * - * @param password This must not be specified if the certificate format is Cer. - * @return the next definition stage. - */ - WithCreate withPassword(String password); - } - - /** - * The stage of the Certificate definition allowing to specify thumbprintAlgorithm. - */ - interface WithThumbprintAlgorithm { - /** - * Specifies the thumbprintAlgorithm property: This must match the first portion of the certificate name. - * Currently required to be 'SHA1'.. - * - * @param thumbprintAlgorithm This must match the first portion of the certificate name. Currently required - * to be 'SHA1'. - * @return the next definition stage. - */ - WithCreate withThumbprintAlgorithm(String thumbprintAlgorithm); - } - - /** - * The stage of the Certificate definition allowing to specify thumbprint. - */ - interface WithThumbprint { - /** - * Specifies the thumbprint property: This must match the thumbprint from the name.. - * - * @param thumbprint This must match the thumbprint from the name. - * @return the next definition stage. - */ - WithCreate withThumbprint(String thumbprint); - } - - /** - * The stage of the Certificate definition allowing to specify format. - */ - interface WithFormat { - /** - * Specifies the format property: The format of the certificate - either Pfx or Cer. If omitted, the default - * is Pfx.. - * - * @param format The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * @return the next definition stage. - */ - WithCreate withFormat(CertificateFormat format); - } - - /** - * The stage of the Certificate definition allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: The entity state (ETag) version of the certificate to update. A value of - * "*" can be used to apply the operation only if the certificate already exists. If omitted, this operation - * will always be applied.. - * - * @param ifMatch The entity state (ETag) version of the certificate to update. A value of "*" can be used - * to apply the operation only if the certificate already exists. If omitted, this operation will always be - * applied. - * @return the next definition stage. - */ - WithCreate withIfMatch(String ifMatch); - } - - /** - * The stage of the Certificate definition allowing to specify ifNoneMatch. - */ - interface WithIfNoneMatch { - /** - * Specifies the ifNoneMatch property: Set to '*' to allow a new certificate to be created, but to prevent - * updating an existing certificate. Other values will be ignored.. - * - * @param ifNoneMatch Set to '*' to allow a new certificate to be created, but to prevent updating an - * existing certificate. Other values will be ignored. - * @return the next definition stage. - */ - WithCreate withIfNoneMatch(String ifNoneMatch); - } - } - - /** - * Begins update for the Certificate resource. - * - * @return the stage of resource update. - */ - Certificate.Update update(); - - /** - * The template for Certificate update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithData, UpdateStages.WithPassword, - UpdateStages.WithThumbprintAlgorithm, UpdateStages.WithThumbprint, UpdateStages.WithFormat, - UpdateStages.WithIfMatch { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Certificate apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Certificate apply(Context context); - } - - /** - * The Certificate update stages. - */ - interface UpdateStages { - /** - * The stage of the Certificate update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: The tags of the resource.. - * - * @param tags The tags of the resource. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Certificate update allowing to specify data. - */ - interface WithData { - /** - * Specifies the data property: The maximum size is 10KB.. - * - * @param data The maximum size is 10KB. - * @return the next definition stage. - */ - Update withData(String data); - } - - /** - * The stage of the Certificate update allowing to specify password. - */ - interface WithPassword { - /** - * Specifies the password property: This must not be specified if the certificate format is Cer.. - * - * @param password This must not be specified if the certificate format is Cer. - * @return the next definition stage. - */ - Update withPassword(String password); - } - - /** - * The stage of the Certificate update allowing to specify thumbprintAlgorithm. - */ - interface WithThumbprintAlgorithm { - /** - * Specifies the thumbprintAlgorithm property: This must match the first portion of the certificate name. - * Currently required to be 'SHA1'.. - * - * @param thumbprintAlgorithm This must match the first portion of the certificate name. Currently required - * to be 'SHA1'. - * @return the next definition stage. - */ - Update withThumbprintAlgorithm(String thumbprintAlgorithm); - } - - /** - * The stage of the Certificate update allowing to specify thumbprint. - */ - interface WithThumbprint { - /** - * Specifies the thumbprint property: This must match the thumbprint from the name.. - * - * @param thumbprint This must match the thumbprint from the name. - * @return the next definition stage. - */ - Update withThumbprint(String thumbprint); - } - - /** - * The stage of the Certificate update allowing to specify format. - */ - interface WithFormat { - /** - * Specifies the format property: The format of the certificate - either Pfx or Cer. If omitted, the default - * is Pfx.. - * - * @param format The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * @return the next definition stage. - */ - Update withFormat(CertificateFormat format); - } - - /** - * The stage of the Certificate update allowing to specify ifMatch. - */ - interface WithIfMatch { - /** - * Specifies the ifMatch property: The entity state (ETag) version of the certificate to update. This value - * can be omitted or set to "*" to apply the operation unconditionally.. - * - * @param ifMatch The entity state (ETag) version of the certificate to update. This value can be omitted or - * set to "*" to apply the operation unconditionally. - * @return the next definition stage. - */ - Update withIfMatch(String ifMatch); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Certificate refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Certificate refresh(Context context); - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @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 contains information about a certificate. - */ - Response cancelDeletionWithResponse(Context context); - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @throws com.azure.core.management.exception.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. - */ - Certificate cancelDeletion(); -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateBaseProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateBaseProperties.java deleted file mode 100644 index b00ce92b934d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateBaseProperties.java +++ /dev/null @@ -1,151 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Base certificate properties. - */ -@Fluent -public class CertificateBaseProperties implements JsonSerializable { - /* - * This must match the first portion of the certificate name. Currently required to be 'SHA1'. - */ - private String thumbprintAlgorithm; - - /* - * This must match the thumbprint from the name. - */ - private String thumbprint; - - /* - * The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - */ - private CertificateFormat format; - - /** - * Creates an instance of CertificateBaseProperties class. - */ - public CertificateBaseProperties() { - } - - /** - * Get the thumbprintAlgorithm property: This must match the first portion of the certificate name. Currently - * required to be 'SHA1'. - * - * @return the thumbprintAlgorithm value. - */ - public String thumbprintAlgorithm() { - return this.thumbprintAlgorithm; - } - - /** - * Set the thumbprintAlgorithm property: This must match the first portion of the certificate name. Currently - * required to be 'SHA1'. - * - * @param thumbprintAlgorithm the thumbprintAlgorithm value to set. - * @return the CertificateBaseProperties object itself. - */ - public CertificateBaseProperties withThumbprintAlgorithm(String thumbprintAlgorithm) { - this.thumbprintAlgorithm = thumbprintAlgorithm; - return this; - } - - /** - * Get the thumbprint property: This must match the thumbprint from the name. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Set the thumbprint property: This must match the thumbprint from the name. - * - * @param thumbprint the thumbprint value to set. - * @return the CertificateBaseProperties object itself. - */ - public CertificateBaseProperties withThumbprint(String thumbprint) { - this.thumbprint = thumbprint; - return this; - } - - /** - * Get the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @return the format value. - */ - public CertificateFormat format() { - return this.format; - } - - /** - * Set the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @param format the format value to set. - * @return the CertificateBaseProperties object itself. - */ - public CertificateBaseProperties withFormat(CertificateFormat format) { - this.format = format; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("thumbprintAlgorithm", this.thumbprintAlgorithm); - jsonWriter.writeStringField("thumbprint", this.thumbprint); - jsonWriter.writeStringField("format", this.format == null ? null : this.format.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateBaseProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateBaseProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CertificateBaseProperties. - */ - public static CertificateBaseProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateBaseProperties deserializedCertificateBaseProperties = new CertificateBaseProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("thumbprintAlgorithm".equals(fieldName)) { - deserializedCertificateBaseProperties.thumbprintAlgorithm = reader.getString(); - } else if ("thumbprint".equals(fieldName)) { - deserializedCertificateBaseProperties.thumbprint = reader.getString(); - } else if ("format".equals(fieldName)) { - deserializedCertificateBaseProperties.format = CertificateFormat.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateBaseProperties; - }); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateParameters.java deleted file mode 100644 index 59454a4580b6..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateCreateOrUpdateParameters.java +++ /dev/null @@ -1,288 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.fluent.models.CertificateCreateOrUpdateProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Contains information about a certificate. - */ -@Fluent -public final class CertificateCreateOrUpdateParameters extends AzureProxyResource { - /* - * The properties associated with the certificate. - */ - private CertificateCreateOrUpdateProperties innerProperties; - - /* - * The ETag of the resource, used for concurrency statements. - */ - private String etag; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of CertificateCreateOrUpdateParameters class. - */ - public CertificateCreateOrUpdateParameters() { - } - - /** - * Get the innerProperties property: The properties associated with the certificate. - * - * @return the innerProperties value. - */ - private CertificateCreateOrUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the etag property: The ETag of the resource, used for concurrency statements. - * - * @return the etag value. - */ - @Override - public String etag() { - return this.etag; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public CertificateCreateOrUpdateParameters withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the data property: The maximum size is 10KB. - * - * @return the data value. - */ - public String data() { - return this.innerProperties() == null ? null : this.innerProperties().data(); - } - - /** - * Set the data property: The maximum size is 10KB. - * - * @param data the data value to set. - * @return the CertificateCreateOrUpdateParameters object itself. - */ - public CertificateCreateOrUpdateParameters withData(String data) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withData(data); - return this; - } - - /** - * Get the password property: This must not be specified if the certificate format is Cer. - * - * @return the password value. - */ - public String password() { - return this.innerProperties() == null ? null : this.innerProperties().password(); - } - - /** - * Set the password property: This must not be specified if the certificate format is Cer. - * - * @param password the password value to set. - * @return the CertificateCreateOrUpdateParameters object itself. - */ - public CertificateCreateOrUpdateParameters withPassword(String password) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withPassword(password); - return this; - } - - /** - * Get the thumbprintAlgorithm property: This must match the first portion of the certificate name. Currently - * required to be 'SHA1'. - * - * @return the thumbprintAlgorithm value. - */ - public String thumbprintAlgorithm() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprintAlgorithm(); - } - - /** - * Set the thumbprintAlgorithm property: This must match the first portion of the certificate name. Currently - * required to be 'SHA1'. - * - * @param thumbprintAlgorithm the thumbprintAlgorithm value to set. - * @return the CertificateCreateOrUpdateParameters object itself. - */ - public CertificateCreateOrUpdateParameters withThumbprintAlgorithm(String thumbprintAlgorithm) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withThumbprintAlgorithm(thumbprintAlgorithm); - return this; - } - - /** - * Get the thumbprint property: This must match the thumbprint from the name. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); - } - - /** - * Set the thumbprint property: This must match the thumbprint from the name. - * - * @param thumbprint the thumbprint value to set. - * @return the CertificateCreateOrUpdateParameters object itself. - */ - public CertificateCreateOrUpdateParameters withThumbprint(String thumbprint) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withThumbprint(thumbprint); - return this; - } - - /** - * Get the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @return the format value. - */ - public CertificateFormat format() { - return this.innerProperties() == null ? null : this.innerProperties().format(); - } - - /** - * Set the format property: The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - * - * @param format the format value to set. - * @return the CertificateCreateOrUpdateParameters object itself. - */ - public CertificateCreateOrUpdateParameters withFormat(CertificateFormat format) { - if (this.innerProperties() == null) { - this.innerProperties = new CertificateCreateOrUpdateProperties(); - } - this.innerProperties().withFormat(format); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateCreateOrUpdateParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateCreateOrUpdateParameters if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CertificateCreateOrUpdateParameters. - */ - public static CertificateCreateOrUpdateParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateCreateOrUpdateParameters deserializedCertificateCreateOrUpdateParameters - = new CertificateCreateOrUpdateParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCertificateCreateOrUpdateParameters.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCertificateCreateOrUpdateParameters.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCertificateCreateOrUpdateParameters.type = reader.getString(); - } else if ("etag".equals(fieldName)) { - deserializedCertificateCreateOrUpdateParameters.etag = reader.getString(); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCertificateCreateOrUpdateParameters.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedCertificateCreateOrUpdateParameters.innerProperties - = CertificateCreateOrUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateCreateOrUpdateParameters; - }); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateFormat.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateFormat.java deleted file mode 100644 index 4deb7b466418..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateFormat.java +++ /dev/null @@ -1,56 +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.models; - -/** - * The format of the certificate - either Pfx or Cer. If omitted, the default is Pfx. - */ -public enum CertificateFormat { - /** - * Enum value Pfx. - */ - PFX("Pfx"), - - /** - * Enum value Cer. - */ - CER("Cer"); - - /** - * The actual serialized value for a CertificateFormat instance. - */ - private final String value; - - CertificateFormat(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CertificateFormat instance. - * - * @param value the serialized value to parse. - * @return the parsed CertificateFormat object, or null if unable to parse. - */ - public static CertificateFormat fromString(String value) { - if (value == null) { - return null; - } - CertificateFormat[] items = CertificateFormat.values(); - for (CertificateFormat item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateProvisioningState.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateProvisioningState.java deleted file mode 100644 index ae46f6c90314..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateProvisioningState.java +++ /dev/null @@ -1,61 +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.models; - -/** - * Defines values for CertificateProvisioningState. - */ -public enum CertificateProvisioningState { - /** - * Enum value Succeeded. - */ - SUCCEEDED("Succeeded"), - - /** - * Enum value Deleting. - */ - DELETING("Deleting"), - - /** - * Enum value Failed. - */ - FAILED("Failed"); - - /** - * The actual serialized value for a CertificateProvisioningState instance. - */ - private final String value; - - CertificateProvisioningState(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CertificateProvisioningState instance. - * - * @param value the serialized value to parse. - * @return the parsed CertificateProvisioningState object, or null if unable to parse. - */ - public static CertificateProvisioningState fromString(String value) { - if (value == null) { - return null; - } - CertificateProvisioningState[] items = CertificateProvisioningState.values(); - for (CertificateProvisioningState item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateReference.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateReference.java deleted file mode 100644 index 33017d8ce489..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateReference.java +++ /dev/null @@ -1,217 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A reference to a certificate to be installed on compute nodes in a pool. This must exist inside the same account as - * the pool. - * - * Warning: This object is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - */ -@Fluent -public final class CertificateReference implements JsonSerializable { - /* - * The fully qualified ID of the certificate to install on the pool. This must be inside the same batch account as - * the pool. - */ - private String id; - - /* - * The default value is currentUser. This property is applicable only for pools configured with Windows compute - * nodes. For Linux compute nodes, the certificates are stored in a directory inside the task working directory and - * an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For - * certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - */ - private CertificateStoreLocation storeLocation; - - /* - * This property is applicable only for pools configured with Windows compute nodes. Common store names include: My, - * Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, AddressBook, but any custom store name - * can also be used. The default value is My. - */ - private String storeName; - - /* - * Which user accounts on the compute node should have access to the private data of the certificate. - */ - private List visibility; - - /** - * Creates an instance of CertificateReference class. - */ - public CertificateReference() { - } - - /** - * Get the id property: The fully qualified ID of the certificate to install on the pool. This must be inside the - * same batch account as the pool. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The fully qualified ID of the certificate to install on the pool. This must be inside the - * same batch account as the pool. - * - * @param id the id value to set. - * @return the CertificateReference object itself. - */ - public CertificateReference withId(String id) { - this.id = id; - return this; - } - - /** - * Get the storeLocation property: The default value is currentUser. This property is applicable only for pools - * configured with Windows compute nodes. For Linux compute nodes, the certificates are stored in a directory inside - * the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query - * for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's - * home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * - * @return the storeLocation value. - */ - public CertificateStoreLocation storeLocation() { - return this.storeLocation; - } - - /** - * Set the storeLocation property: The default value is currentUser. This property is applicable only for pools - * configured with Windows compute nodes. For Linux compute nodes, the certificates are stored in a directory inside - * the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query - * for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in the user's - * home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * - * @param storeLocation the storeLocation value to set. - * @return the CertificateReference object itself. - */ - public CertificateReference withStoreLocation(CertificateStoreLocation storeLocation) { - this.storeLocation = storeLocation; - return this; - } - - /** - * Get the storeName property: This property is applicable only for pools configured with Windows compute nodes. - * Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, - * AddressBook, but any custom store name can also be used. The default value is My. - * - * @return the storeName value. - */ - public String storeName() { - return this.storeName; - } - - /** - * Set the storeName property: This property is applicable only for pools configured with Windows compute nodes. - * Common store names include: My, Root, CA, Trust, Disallowed, TrustedPeople, TrustedPublisher, AuthRoot, - * AddressBook, but any custom store name can also be used. The default value is My. - * - * @param storeName the storeName value to set. - * @return the CertificateReference object itself. - */ - public CertificateReference withStoreName(String storeName) { - this.storeName = storeName; - return this; - } - - /** - * Get the visibility property: Which user accounts on the compute node should have access to the private data of - * the certificate. - * - * @return the visibility value. - */ - public List visibility() { - return this.visibility; - } - - /** - * Set the visibility property: Which user accounts on the compute node should have access to the private data of - * the certificate. - * - * @param visibility the visibility value to set. - * @return the CertificateReference object itself. - */ - public CertificateReference withVisibility(List visibility) { - this.visibility = visibility; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model CertificateReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CertificateReference.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("storeLocation", this.storeLocation == null ? null : this.storeLocation.toString()); - jsonWriter.writeStringField("storeName", this.storeName); - jsonWriter.writeArrayField("visibility", this.visibility, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateReference from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateReference if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CertificateReference. - */ - public static CertificateReference fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateReference deserializedCertificateReference = new CertificateReference(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCertificateReference.id = reader.getString(); - } else if ("storeLocation".equals(fieldName)) { - deserializedCertificateReference.storeLocation - = CertificateStoreLocation.fromString(reader.getString()); - } else if ("storeName".equals(fieldName)) { - deserializedCertificateReference.storeName = reader.getString(); - } else if ("visibility".equals(fieldName)) { - List visibility - = reader.readArray(reader1 -> CertificateVisibility.fromString(reader1.getString())); - deserializedCertificateReference.visibility = visibility; - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateReference; - }); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateStoreLocation.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateStoreLocation.java deleted file mode 100644 index bf599befa4f9..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateStoreLocation.java +++ /dev/null @@ -1,62 +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.models; - -/** - * The location of the certificate store on the compute node into which to install the certificate. - * - * The default value is currentUser. This property is applicable only for pools configured with Windows compute nodes. - * For Linux compute nodes, the certificates are stored in a directory inside the task working directory and an - * environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates - * with visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - */ -public enum CertificateStoreLocation { - /** - * Enum value CurrentUser. - */ - CURRENT_USER("CurrentUser"), - - /** - * Enum value LocalMachine. - */ - LOCAL_MACHINE("LocalMachine"); - - /** - * The actual serialized value for a CertificateStoreLocation instance. - */ - private final String value; - - CertificateStoreLocation(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CertificateStoreLocation instance. - * - * @param value the serialized value to parse. - * @return the parsed CertificateStoreLocation object, or null if unable to parse. - */ - public static CertificateStoreLocation fromString(String value) { - if (value == null) { - return null; - } - CertificateStoreLocation[] items = CertificateStoreLocation.values(); - for (CertificateStoreLocation item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateVisibility.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateVisibility.java deleted file mode 100644 index 19c1a448f6db..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificateVisibility.java +++ /dev/null @@ -1,61 +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.models; - -/** - * Defines values for CertificateVisibility. - */ -public enum CertificateVisibility { - /** - * Enum value StartTask. - */ - START_TASK("StartTask"), - - /** - * Enum value Task. - */ - TASK("Task"), - - /** - * Enum value RemoteUser. - */ - REMOTE_USER("RemoteUser"); - - /** - * The actual serialized value for a CertificateVisibility instance. - */ - private final String value; - - CertificateVisibility(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CertificateVisibility instance. - * - * @param value the serialized value to parse. - * @return the parsed CertificateVisibility object, or null if unable to parse. - */ - public static CertificateVisibility fromString(String value) { - if (value == null) { - return null; - } - CertificateVisibility[] items = CertificateVisibility.values(); - for (CertificateVisibility item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 1b00b9415e4b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Certificates.java +++ /dev/null @@ -1,232 +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.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Certificates. - */ -public interface Certificates { - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); - - /** - * Lists all of the certificates in the specified account. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are "properties/provisioningState", - * "properties/provisioningStateTransitionTime", "name". - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return values returned by the List operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, - String select, String filter, Context context); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String accountName, String certificateName); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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. - */ - void delete(String resourceGroupName, String accountName, String certificateName, Context context); - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate. - */ - Response getWithResponse(String resourceGroupName, String accountName, String certificateName, - Context context); - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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. - */ - Certificate get(String resourceGroupName, String accountName, String certificateName); - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @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 contains information about a certificate. - */ - Response cancelDeletionWithResponse(String resourceGroupName, String accountName, - String certificateName, Context context); - - /** - * Cancels a failed deletion of a certificate from the specified account. - * - * If you try to delete a certificate that is being used by a pool or compute node, the status of the certificate - * changes to deleteFailed. If you decide that you want to continue using the certificate, you can use this - * operation to set the status of the certificate back to active. If you intend to delete the certificate, you do - * not need to run this operation after the deletion failed. You must make sure that the certificate is not being - * used by any resources, and then you can try again to delete the certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param certificateName The identifier for the certificate. This must be made up of algorithm and thumbprint - * separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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. - */ - Certificate cancelDeletion(String resourceGroupName, String accountName, String certificateName); - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. - */ - Certificate getById(String id); - - /** - * Gets information about the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return contains information about a certificate. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes the specified certificate. - * - * Warning: This operation is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Certificate resource. - * - * @param name resource name. - * @return the first stage of the new Certificate definition. - */ - Certificate.DefinitionStages.Blank define(String name); -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCancelDeletionHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCancelDeletionHeaders.java deleted file mode 100644 index 19253b17a367..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCancelDeletionHeaders.java +++ /dev/null @@ -1,58 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CertificatesCancelDeletionHeaders model. - */ -@Fluent -public final class CertificatesCancelDeletionHeaders { - /* - * The Etag property. - */ - private String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CertificatesCancelDeletionHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CertificatesCancelDeletionHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The Etag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the CertificatesCancelDeletionHeaders object itself. - */ - public CertificatesCancelDeletionHeaders withEtag(String etag) { - this.etag = etag; - 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/models/CertificatesCancelDeletionResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCancelDeletionResponse.java deleted file mode 100644 index b84c73ac9699..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCancelDeletionResponse.java +++ /dev/null @@ -1,40 +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.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; - -/** - * Contains all response data for the cancelDeletion operation. - */ -public final class CertificatesCancelDeletionResponse - extends ResponseBase { - /** - * Creates an instance of CertificatesCancelDeletionResponse. - * - * @param request the request which resulted in this CertificatesCancelDeletionResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CertificatesCancelDeletionResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - CertificateInner value, CertificatesCancelDeletionHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public CertificateInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCreateHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCreateHeaders.java deleted file mode 100644 index 2ebf424cb193..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCreateHeaders.java +++ /dev/null @@ -1,58 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CertificatesCreateHeaders model. - */ -@Fluent -public final class CertificatesCreateHeaders { - /* - * The Etag property. - */ - private String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CertificatesCreateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CertificatesCreateHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The Etag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the CertificatesCreateHeaders object itself. - */ - public CertificatesCreateHeaders withEtag(String etag) { - this.etag = etag; - 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/models/CertificatesCreateResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCreateResponse.java deleted file mode 100644 index f4ddd99d7325..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesCreateResponse.java +++ /dev/null @@ -1,39 +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.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; - -/** - * Contains all response data for the create operation. - */ -public final class CertificatesCreateResponse extends ResponseBase { - /** - * Creates an instance of CertificatesCreateResponse. - * - * @param request the request which resulted in this CertificatesCreateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CertificatesCreateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - CertificateInner value, CertificatesCreateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public CertificateInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesGetHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesGetHeaders.java deleted file mode 100644 index e94e38710781..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesGetHeaders.java +++ /dev/null @@ -1,58 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CertificatesGetHeaders model. - */ -@Fluent -public final class CertificatesGetHeaders { - /* - * The Etag property. - */ - private String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CertificatesGetHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CertificatesGetHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The Etag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the CertificatesGetHeaders object itself. - */ - public CertificatesGetHeaders withEtag(String etag) { - this.etag = etag; - 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/models/CertificatesGetResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesGetResponse.java deleted file mode 100644 index caf01553463f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesGetResponse.java +++ /dev/null @@ -1,39 +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.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; - -/** - * Contains all response data for the get operation. - */ -public final class CertificatesGetResponse extends ResponseBase { - /** - * Creates an instance of CertificatesGetResponse. - * - * @param request the request which resulted in this CertificatesGetResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CertificatesGetResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, CertificateInner value, - CertificatesGetHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public CertificateInner getValue() { - return super.getValue(); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesUpdateHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesUpdateHeaders.java deleted file mode 100644 index a3fb689605bd..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesUpdateHeaders.java +++ /dev/null @@ -1,58 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; - -/** - * The CertificatesUpdateHeaders model. - */ -@Fluent -public final class CertificatesUpdateHeaders { - /* - * The Etag property. - */ - private String etag; - - // HttpHeaders containing the raw property values. - /** - * Creates an instance of CertificatesUpdateHeaders class. - * - * @param rawHeaders The raw HttpHeaders that will be used to create the property values. - */ - public CertificatesUpdateHeaders(HttpHeaders rawHeaders) { - this.etag = rawHeaders.getValue(HttpHeaderName.ETAG); - } - - /** - * Get the etag property: The Etag property. - * - * @return the etag value. - */ - public String etag() { - return this.etag; - } - - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the CertificatesUpdateHeaders object itself. - */ - public CertificatesUpdateHeaders withEtag(String etag) { - this.etag = etag; - 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/models/CertificatesUpdateResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesUpdateResponse.java deleted file mode 100644 index 6e75c28ef33d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/CertificatesUpdateResponse.java +++ /dev/null @@ -1,39 +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.models; - -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.rest.ResponseBase; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; - -/** - * Contains all response data for the update operation. - */ -public final class CertificatesUpdateResponse extends ResponseBase { - /** - * Creates an instance of CertificatesUpdateResponse. - * - * @param request the request which resulted in this CertificatesUpdateResponse. - * @param statusCode the status code of the HTTP response. - * @param rawHeaders the raw headers of the HTTP response. - * @param value the deserialized value of the HTTP response. - * @param headers the deserialized headers of the HTTP response. - */ - public CertificatesUpdateResponse(HttpRequest request, int statusCode, HttpHeaders rawHeaders, - CertificateInner value, CertificatesUpdateHeaders headers) { - super(request, statusCode, rawHeaders, value, headers); - } - - /** - * Gets the deserialized response body. - * - * @return the deserialized response body. - */ - @Override - public CertificateInner getValue() { - return super.getValue(); - } -} 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 a85dae8f7d82..3048afcfdaa1 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -25,7 +25,7 @@ public final class CheckNameAvailabilityParameters implements JsonSerializable containerImageNames; /* + * Additional private registries from which containers can be pulled. + * * If any images must be downloaded from a private registry which requires credentials, then those credentials must * be provided here. */ @@ -62,9 +66,10 @@ public ContainerConfiguration withType(ContainerType type) { } /** - * Get the containerImageNames property: This is the full image reference, as would be specified to "docker pull". - * An image will be sourced from the default Docker registry unless the image is fully qualified with an alternative - * registry. + * Get the containerImageNames property: The collection of container image names. + * + * This is the full image reference, as would be specified to "docker pull". An image will be sourced from the + * default Docker registry unless the image is fully qualified with an alternative registry. * * @return the containerImageNames value. */ @@ -73,9 +78,10 @@ public List containerImageNames() { } /** - * Set the containerImageNames property: This is the full image reference, as would be specified to "docker pull". - * An image will be sourced from the default Docker registry unless the image is fully qualified with an alternative - * registry. + * Set the containerImageNames property: The collection of container image names. + * + * This is the full image reference, as would be specified to "docker pull". An image will be sourced from the + * default Docker registry unless the image is fully qualified with an alternative registry. * * @param containerImageNames the containerImageNames value to set. * @return the ContainerConfiguration object itself. @@ -86,8 +92,10 @@ public ContainerConfiguration withContainerImageNames(List containerImag } /** - * Get the containerRegistries property: If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. + * Get the containerRegistries property: Additional private registries from which containers can be pulled. + * + * If any images must be downloaded from a private registry which requires credentials, then those credentials must + * be provided here. * * @return the containerRegistries value. */ @@ -96,8 +104,10 @@ public List containerRegistries() { } /** - * Set the containerRegistries property: If any images must be downloaded from a private registry which requires - * credentials, then those credentials must be provided here. + * Set the containerRegistries property: Additional private registries from which containers can be pulled. + * + * If any images must be downloaded from a private registry which requires credentials, then those credentials must + * be provided here. * * @param containerRegistries the containerRegistries value to set. * @return the ContainerConfiguration object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostBatchBindMountEntry.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostBatchBindMountEntry.java index 23f3eba6c757..a8998311630f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostBatchBindMountEntry.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostBatchBindMountEntry.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -22,6 +22,8 @@ public final class ContainerHostBatchBindMountEntry implements JsonSerializable< private ContainerHostDataPath source; /* + * Mount this source path as read-only mode or not. Default value is false (read/write mode). + * * For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the * read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users * within the container will not be able to modify the path. @@ -55,9 +57,12 @@ public ContainerHostBatchBindMountEntry withSource(ContainerHostDataPath source) } /** - * Get the isReadOnly property: For Linux, if you mount this path as a read/write mode, this does not mean that all - * users in container have the read/write access for the path, it depends on the access in host VM. If this path is - * mounted read-only, all users within the container will not be able to modify the path. + * Get the isReadOnly property: Mount this source path as read-only mode or not. Default value is false (read/write + * mode). + * + * For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the + * read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users + * within the container will not be able to modify the path. * * @return the isReadOnly value. */ @@ -66,9 +71,12 @@ public Boolean isReadOnly() { } /** - * Set the isReadOnly property: For Linux, if you mount this path as a read/write mode, this does not mean that all - * users in container have the read/write access for the path, it depends on the access in host VM. If this path is - * mounted read-only, all users within the container will not be able to modify the path. + * Set the isReadOnly property: Mount this source path as read-only mode or not. Default value is false (read/write + * mode). + * + * For Linux, if you mount this path as a read/write mode, this does not mean that all users in container have the + * read/write access for the path, it depends on the access in host VM. If this path is mounted read-only, all users + * within the container will not be able to modify the path. * * @param isReadOnly the isReadOnly value to set. * @return the ContainerHostBatchBindMountEntry object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostDataPath.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostDataPath.java index c156ae19336e..82c0dda079e9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostDataPath.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerHostDataPath.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -12,32 +12,32 @@ */ public final class ContainerHostDataPath extends ExpandableStringEnum { /** - * Static value Shared for ContainerHostDataPath. + * The path for multi-instances task to shared their files. */ public static final ContainerHostDataPath SHARED = fromString("Shared"); /** - * Static value Startup for ContainerHostDataPath. + * The path for start task. */ public static final ContainerHostDataPath STARTUP = fromString("Startup"); /** - * Static value VfsMounts for ContainerHostDataPath. + * The path contains all virtual file systems are mounted on this node. */ public static final ContainerHostDataPath VFS_MOUNTS = fromString("VfsMounts"); /** - * Static value Task for ContainerHostDataPath. + * The task path. */ public static final ContainerHostDataPath TASK = fromString("Task"); /** - * Static value JobPrep for ContainerHostDataPath. + * The job-prep task path. */ public static final ContainerHostDataPath JOB_PREP = fromString("JobPrep"); /** - * Static value Applications for ContainerHostDataPath. + * The applications path. */ public static final ContainerHostDataPath APPLICATIONS = fromString("Applications"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerRegistry.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerRegistry.java index f80f16d4c397..24135d143ad7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerRegistry.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerRegistry.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -27,11 +27,16 @@ public final class ContainerRegistry implements JsonSerializable { /** - * Static value DockerCompatible for ContainerType. + * A Docker compatible container technology will be used to launch the containers. */ public static final ContainerType DOCKER_COMPATIBLE = fromString("DockerCompatible"); /** - * Static value CriCompatible for ContainerType. + * A CRI based technology will be used to launch the containers. */ public static final ContainerType CRI_COMPATIBLE = fromString("CriCompatible"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerWorkingDirectory.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerWorkingDirectory.java index b863ae37632d..b44b7412401e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerWorkingDirectory.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerWorkingDirectory.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,14 @@ */ public enum ContainerWorkingDirectory { /** - * Enum value TaskWorkingDirectory. + * Use the standard Batch service task working directory, which will contain the Task resource files populated by + * Batch. */ TASK_WORKING_DIRECTORY("TaskWorkingDirectory"), /** - * Enum value ContainerImageDefault. + * Using container image defined working directory. Beware that this directory will not contain the resource files + * downloaded by Batch. */ CONTAINER_IMAGE_DEFAULT("ContainerImageDefault"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DataDisk.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DataDisk.java index 50a714cd2556..17a23dc1e888 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DataDisk.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DataDisk.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -18,12 +18,16 @@ @Fluent public final class DataDisk implements JsonSerializable { /* + * The logical unit number. + * * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct * lun. The value must be between 0 and 63, inclusive. */ private int lun; /* + * The type of caching to enable for the disk. + * * Values are: * * none - The caching mode for the disk is not enabled. @@ -41,12 +45,9 @@ public final class DataDisk implements JsonSerializable { private int diskSizeGB; /* - * If omitted, the default is "Standard_LRS". Values are: - * - * Standard_LRS - The data disk should use standard locally redundant storage. - * Premium_LRS - The data disk should use premium locally redundant storage. + * The managed disk parameters. */ - private StorageAccountType storageAccountType; + private ManagedDisk managedDisk; /** * Creates an instance of DataDisk class. @@ -55,8 +56,10 @@ public DataDisk() { } /** - * Get the lun property: The lun is used to uniquely identify each data disk. If attaching multiple disks, each - * should have a distinct lun. The value must be between 0 and 63, inclusive. + * Get the lun property: The logical unit number. + * + * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct + * lun. The value must be between 0 and 63, inclusive. * * @return the lun value. */ @@ -65,8 +68,10 @@ public int lun() { } /** - * Set the lun property: The lun is used to uniquely identify each data disk. If attaching multiple disks, each - * should have a distinct lun. The value must be between 0 and 63, inclusive. + * Set the lun property: The logical unit number. + * + * The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct + * lun. The value must be between 0 and 63, inclusive. * * @param lun the lun value to set. * @return the DataDisk object itself. @@ -77,7 +82,9 @@ public DataDisk withLun(int lun) { } /** - * Get the caching property: Values are: + * Get the caching property: The type of caching to enable for the disk. + * + * Values are: * * none - The caching mode for the disk is not enabled. * readOnly - The caching mode for the disk is read only. @@ -93,7 +100,9 @@ public CachingType caching() { } /** - * Set the caching property: Values are: + * Set the caching property: The type of caching to enable for the disk. + * + * Values are: * * none - The caching mode for the disk is not enabled. * readOnly - The caching mode for the disk is read only. @@ -131,28 +140,22 @@ public DataDisk withDiskSizeGB(int diskSizeGB) { } /** - * Get the storageAccountType property: If omitted, the default is "Standard_LRS". Values are: - * - * Standard_LRS - The data disk should use standard locally redundant storage. - * Premium_LRS - The data disk should use premium locally redundant storage. + * Get the managedDisk property: The managed disk parameters. * - * @return the storageAccountType value. + * @return the managedDisk value. */ - public StorageAccountType storageAccountType() { - return this.storageAccountType; + public ManagedDisk managedDisk() { + return this.managedDisk; } /** - * Set the storageAccountType property: If omitted, the default is "Standard_LRS". Values are: - * - * Standard_LRS - The data disk should use standard locally redundant storage. - * Premium_LRS - The data disk should use premium locally redundant storage. + * Set the managedDisk property: The managed disk parameters. * - * @param storageAccountType the storageAccountType value to set. + * @param managedDisk the managedDisk value to set. * @return the DataDisk object itself. */ - public DataDisk withStorageAccountType(StorageAccountType storageAccountType) { - this.storageAccountType = storageAccountType; + public DataDisk withManagedDisk(ManagedDisk managedDisk) { + this.managedDisk = managedDisk; return this; } @@ -162,6 +165,9 @@ public DataDisk withStorageAccountType(StorageAccountType storageAccountType) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (managedDisk() != null) { + managedDisk().validate(); + } } /** @@ -173,8 +179,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeIntField("lun", this.lun); jsonWriter.writeIntField("diskSizeGB", this.diskSizeGB); jsonWriter.writeStringField("caching", this.caching == null ? null : this.caching.toString()); - jsonWriter.writeStringField("storageAccountType", - this.storageAccountType == null ? null : this.storageAccountType.toString()); + jsonWriter.writeJsonField("managedDisk", this.managedDisk); return jsonWriter.writeEndObject(); } @@ -200,8 +205,8 @@ public static DataDisk fromJson(JsonReader jsonReader) throws IOException { deserializedDataDisk.diskSizeGB = reader.getInt(); } else if ("caching".equals(fieldName)) { deserializedDataDisk.caching = CachingType.fromString(reader.getString()); - } else if ("storageAccountType".equals(fieldName)) { - deserializedDataDisk.storageAccountType = StorageAccountType.fromString(reader.getString()); + } else if ("managedDisk".equals(fieldName)) { + deserializedDataDisk.managedDisk = ManagedDisk.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DeleteCertificateError.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DeleteCertificateError.java deleted file mode 100644 index 8b3b3babe574..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DeleteCertificateError.java +++ /dev/null @@ -1,199 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * An error response from the Batch service. - */ -@Fluent -public final class DeleteCertificateError implements JsonSerializable { - /* - * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - */ - private String code; - - /* - * A message describing the error, intended to be suitable for display in a user interface. - */ - private String message; - - /* - * The target of the particular error. For example, the name of the property in error. - */ - private String target; - - /* - * A list of additional details about the error. - */ - private List details; - - /** - * Creates an instance of DeleteCertificateError class. - */ - public DeleteCertificateError() { - } - - /** - * Get the code property: An identifier for the error. Codes are invariant and are intended to be consumed - * programmatically. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: An identifier for the error. Codes are invariant and are intended to be consumed - * programmatically. - * - * @param code the code value to set. - * @return the DeleteCertificateError object itself. - */ - public DeleteCertificateError withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: A message describing the error, intended to be suitable for display in a user - * interface. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: A message describing the error, intended to be suitable for display in a user - * interface. - * - * @param message the message value to set. - * @return the DeleteCertificateError object itself. - */ - public DeleteCertificateError withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the target property: The target of the particular error. For example, the name of the property in error. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: The target of the particular error. For example, the name of the property in error. - * - * @param target the target value to set. - * @return the DeleteCertificateError object itself. - */ - public DeleteCertificateError withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the details property: A list of additional details about the error. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Set the details property: A list of additional details about the error. - * - * @param details the details value to set. - * @return the DeleteCertificateError object itself. - */ - public DeleteCertificateError withDetails(List details) { - this.details = details; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (code() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property code in model DeleteCertificateError")); - } - if (message() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property message in model DeleteCertificateError")); - } - if (details() != null) { - details().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DeleteCertificateError.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("code", this.code); - jsonWriter.writeStringField("message", this.message); - jsonWriter.writeStringField("target", this.target); - jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DeleteCertificateError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DeleteCertificateError if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DeleteCertificateError. - */ - public static DeleteCertificateError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DeleteCertificateError deserializedDeleteCertificateError = new DeleteCertificateError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedDeleteCertificateError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedDeleteCertificateError.message = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedDeleteCertificateError.target = reader.getString(); - } else if ("details".equals(fieldName)) { - List details - = reader.readArray(reader1 -> DeleteCertificateError.fromJson(reader1)); - deserializedDeleteCertificateError.details = details; - } else { - reader.skipChildren(); - } - } - - return deserializedDeleteCertificateError; - }); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DeploymentConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DeploymentConfiguration.java index 6ebe38b4f31f..50f5e45bba82 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DeploymentConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DeploymentConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,6 +17,8 @@ @Fluent public final class DeploymentConfiguration implements JsonSerializable { /* + * The virtual machine configuration for the pool. + * * The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure. */ private VirtualMachineConfiguration virtualMachineConfiguration; @@ -28,8 +30,9 @@ public DeploymentConfiguration() { } /** - * Get the virtualMachineConfiguration property: The configuration for compute nodes in a pool based on the Azure - * Virtual Machines infrastructure. + * Get the virtualMachineConfiguration property: The virtual machine configuration for the pool. + * + * The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure. * * @return the virtualMachineConfiguration value. */ @@ -38,8 +41,9 @@ public VirtualMachineConfiguration virtualMachineConfiguration() { } /** - * Set the virtualMachineConfiguration property: The configuration for compute nodes in a pool based on the Azure - * Virtual Machines infrastructure. + * Set the virtualMachineConfiguration property: The virtual machine configuration for the pool. + * + * The configuration for compute nodes in a pool based on the Azure Virtual Machines infrastructure. * * @param virtualMachineConfiguration the virtualMachineConfiguration value to set. * @return the DeploymentConfiguration object itself. 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 index 0ab7e32a8128..ba8c869cb217 100644 --- 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 @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; import java.util.Map; @@ -46,6 +47,13 @@ public interface DetectorResponse { */ Map tags(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the value property: A base64 encoded string that represents the content of a detector. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskPlacement.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskPlacement.java index 7e043d972336..db9adbf52831 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskPlacement.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskPlacement.java @@ -1,21 +1,15 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; /** - * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. - * - * This property can be used by user in the request to choose which location the operating system should be in. e.g., - * cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, - * please refer to Ephemeral OS disk size requirements for Windows VMs at - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at - * https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + * The location where the OS disk should be placed. */ public enum DiffDiskPlacement { /** - * Enum value CacheDisk. + * The OS disk will be placed on the cache disk of the VM. */ CACHE_DISK("CacheDisk"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskSettings.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskSettings.java index 519b8408c170..901e2aac71b5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskSettings.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiffDiskSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,11 +17,13 @@ @Fluent public final class DiffDiskSettings implements JsonSerializable { /* + * Specifies the ephemeral disk placement for operating system disk for all VMs in the pool. + * * This property can be used by user in the request to choose which location the operating system should be in. * e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size * requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux - * VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + * https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at + * https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. */ private DiffDiskPlacement placement; @@ -32,11 +34,14 @@ public DiffDiskSettings() { } /** - * Get the placement property: This property can be used by user in the request to choose which location the - * operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on - * Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux - * VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + * Get the placement property: Specifies the ephemeral disk placement for operating system disk for all VMs in the + * pool. + * + * This property can be used by user in the request to choose which location the operating system should be in. + * e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size + * requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at + * https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at + * https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. * * @return the placement value. */ @@ -45,11 +50,14 @@ public DiffDiskPlacement placement() { } /** - * Set the placement property: This property can be used by user in the request to choose which location the - * operating system should be in. e.g., cache disk space for Ephemeral OS disk provisioning. For more information on - * Ephemeral OS disk size requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at - * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux - * VMs at https://docs.microsoft.com/en-us/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. + * Set the placement property: Specifies the ephemeral disk placement for operating system disk for all VMs in the + * pool. + * + * This property can be used by user in the request to choose which location the operating system should be in. + * e.g., cache disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size + * requirements, please refer to Ephemeral OS disk size requirements for Windows VMs at + * https://learn.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VMs at + * https://learn.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements. * * @param placement the placement value to set. * @return the DiffDiskSettings object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskCustomerManagedKey.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskCustomerManagedKey.java new file mode 100644 index 000000000000..94ffbf1e597b --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskCustomerManagedKey.java @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Customer Managed Key reference to encrypt the Disk. + */ +@Fluent +public final class DiskCustomerManagedKey implements JsonSerializable { + /* + * Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is required regardless of + * rotationToLatestKeyVersionEnabled value. + */ + private String keyUrl; + + /* + * Set this flag to true to enable auto-updating of the Disk Encryption to the latest key version. Default is false. + */ + private Boolean rotationToLatestKeyVersionEnabled; + + /* + * The reference of one of the pool identities to encrypt Disk. This identity will be used to access the KeyVault. + */ + private ComputeNodeIdentityReference identityReference; + + /** + * Creates an instance of DiskCustomerManagedKey class. + */ + public DiskCustomerManagedKey() { + } + + /** + * Get the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is + * required regardless of rotationToLatestKeyVersionEnabled value. + * + * @return the keyUrl value. + */ + public String keyUrl() { + return this.keyUrl; + } + + /** + * Set the keyUrl property: Fully versioned Key Url pointing to a key in KeyVault. Version segment of the Url is + * required regardless of rotationToLatestKeyVersionEnabled value. + * + * @param keyUrl the keyUrl value to set. + * @return the DiskCustomerManagedKey object itself. + */ + public DiskCustomerManagedKey withKeyUrl(String keyUrl) { + this.keyUrl = keyUrl; + return this; + } + + /** + * Get the rotationToLatestKeyVersionEnabled property: Set this flag to true to enable auto-updating of the Disk + * Encryption to the latest key version. Default is false. + * + * @return the rotationToLatestKeyVersionEnabled value. + */ + public Boolean rotationToLatestKeyVersionEnabled() { + return this.rotationToLatestKeyVersionEnabled; + } + + /** + * Set the rotationToLatestKeyVersionEnabled property: Set this flag to true to enable auto-updating of the Disk + * Encryption to the latest key version. Default is false. + * + * @param rotationToLatestKeyVersionEnabled the rotationToLatestKeyVersionEnabled value to set. + * @return the DiskCustomerManagedKey object itself. + */ + public DiskCustomerManagedKey withRotationToLatestKeyVersionEnabled(Boolean rotationToLatestKeyVersionEnabled) { + this.rotationToLatestKeyVersionEnabled = rotationToLatestKeyVersionEnabled; + return this; + } + + /** + * Get the identityReference property: The reference of one of the pool identities to encrypt Disk. This identity + * will be used to access the KeyVault. + * + * @return the identityReference value. + */ + public ComputeNodeIdentityReference identityReference() { + return this.identityReference; + } + + /** + * Set the identityReference property: The reference of one of the pool identities to encrypt Disk. This identity + * will be used to access the KeyVault. + * + * @param identityReference the identityReference value to set. + * @return the DiskCustomerManagedKey object itself. + */ + public DiskCustomerManagedKey withIdentityReference(ComputeNodeIdentityReference identityReference) { + this.identityReference = identityReference; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identityReference() != null) { + identityReference().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("keyUrl", this.keyUrl); + jsonWriter.writeBooleanField("rotationToLatestKeyVersionEnabled", this.rotationToLatestKeyVersionEnabled); + jsonWriter.writeJsonField("identityReference", this.identityReference); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiskCustomerManagedKey from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiskCustomerManagedKey if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the DiskCustomerManagedKey. + */ + public static DiskCustomerManagedKey fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiskCustomerManagedKey deserializedDiskCustomerManagedKey = new DiskCustomerManagedKey(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keyUrl".equals(fieldName)) { + deserializedDiskCustomerManagedKey.keyUrl = reader.getString(); + } else if ("rotationToLatestKeyVersionEnabled".equals(fieldName)) { + deserializedDiskCustomerManagedKey.rotationToLatestKeyVersionEnabled + = reader.getNullable(JsonReader::getBoolean); + } else if ("identityReference".equals(fieldName)) { + deserializedDiskCustomerManagedKey.identityReference + = ComputeNodeIdentityReference.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedDiskCustomerManagedKey; + }); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionConfiguration.java index c2139126a3ca..ddd5cf5c9261 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,11 +19,22 @@ @Fluent public final class DiskEncryptionConfiguration implements JsonSerializable { /* + * The list of disk targets Batch Service will encrypt on the compute node + * * On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be * specified. */ private List targets; + /* + * The Customer Managed Key reference to encrypt the OS Disk. + * + * Customer Managed Key will encrypt OS Disk by EncryptionAtRest, and by default we will encrypt the data disk as + * well. It can be used only when the pool is configured with an identity and OsDisk is set as one of the targets of + * DiskEncryption. + */ + private DiskCustomerManagedKey customerManagedKey; + /** * Creates an instance of DiskEncryptionConfiguration class. */ @@ -31,8 +42,10 @@ public DiskEncryptionConfiguration() { } /** - * Get the targets property: On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and - * "TemporaryDisk" must be specified. + * Get the targets property: The list of disk targets Batch Service will encrypt on the compute node + * + * On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be + * specified. * * @return the targets value. */ @@ -41,8 +54,10 @@ public List targets() { } /** - * Set the targets property: On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and - * "TemporaryDisk" must be specified. + * Set the targets property: The list of disk targets Batch Service will encrypt on the compute node + * + * On Linux pool, only "TemporaryDisk" is supported; on Windows pool, "OsDisk" and "TemporaryDisk" must be + * specified. * * @param targets the targets value to set. * @return the DiskEncryptionConfiguration object itself. @@ -52,12 +67,43 @@ public DiskEncryptionConfiguration withTargets(List target return this; } + /** + * Get the customerManagedKey property: The Customer Managed Key reference to encrypt the OS Disk. + * + * Customer Managed Key will encrypt OS Disk by EncryptionAtRest, and by default we will encrypt the data disk as + * well. It can be used only when the pool is configured with an identity and OsDisk is set as one of the targets of + * DiskEncryption. + * + * @return the customerManagedKey value. + */ + public DiskCustomerManagedKey customerManagedKey() { + return this.customerManagedKey; + } + + /** + * Set the customerManagedKey property: The Customer Managed Key reference to encrypt the OS Disk. + * + * Customer Managed Key will encrypt OS Disk by EncryptionAtRest, and by default we will encrypt the data disk as + * well. It can be used only when the pool is configured with an identity and OsDisk is set as one of the targets of + * DiskEncryption. + * + * @param customerManagedKey the customerManagedKey value to set. + * @return the DiskEncryptionConfiguration object itself. + */ + public DiskEncryptionConfiguration withCustomerManagedKey(DiskCustomerManagedKey customerManagedKey) { + this.customerManagedKey = customerManagedKey; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (customerManagedKey() != null) { + customerManagedKey().validate(); + } } /** @@ -68,6 +114,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("targets", this.targets, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeJsonField("customerManagedKey", this.customerManagedKey); return jsonWriter.writeEndObject(); } @@ -90,6 +137,9 @@ public static DiskEncryptionConfiguration fromJson(JsonReader jsonReader) throws List targets = reader.readArray(reader1 -> DiskEncryptionTarget.fromString(reader1.getString())); deserializedDiskEncryptionConfiguration.targets = targets; + } else if ("customerManagedKey".equals(fieldName)) { + deserializedDiskEncryptionConfiguration.customerManagedKey + = DiskCustomerManagedKey.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionSetParameters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionSetParameters.java new file mode 100644 index 000000000000..9e7e5b71b0d2 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionSetParameters.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The ARM resource id of the disk encryption set. + */ +@Fluent +public final class DiskEncryptionSetParameters implements JsonSerializable { + /* + * The resource id of the disk encryption set. + * + * The ARM resource id of the disk encryption set. The resource should be in the same subscription as the Batch + * account. + */ + private String id; + + /** + * Creates an instance of DiskEncryptionSetParameters class. + */ + public DiskEncryptionSetParameters() { + } + + /** + * Get the id property: The resource id of the disk encryption set. + * + * The ARM resource id of the disk encryption set. The resource should be in the same subscription as the Batch + * account. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The resource id of the disk encryption set. + * + * The ARM resource id of the disk encryption set. The resource should be in the same subscription as the Batch + * account. + * + * @param id the id value to set. + * @return the DiskEncryptionSetParameters object itself. + */ + public DiskEncryptionSetParameters withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property id in model DiskEncryptionSetParameters")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiskEncryptionSetParameters.class); + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of DiskEncryptionSetParameters from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of DiskEncryptionSetParameters if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the DiskEncryptionSetParameters. + */ + public static DiskEncryptionSetParameters fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + DiskEncryptionSetParameters deserializedDiskEncryptionSetParameters = new DiskEncryptionSetParameters(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedDiskEncryptionSetParameters.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedDiskEncryptionSetParameters; + }); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionTarget.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionTarget.java index 9caa5d4af53c..0a757b37af22 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionTarget.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionTarget.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -11,12 +11,13 @@ */ public enum DiskEncryptionTarget { /** - * Enum value OsDisk. + * The OS Disk on the compute node is encrypted. */ OS_DISK("OsDisk"), /** - * Enum value TemporaryDisk. + * The temporary disk on the compute node is encrypted. On Linux this encryption applies to other partitions (such + * as those on mounted data disks) when encryption occurs at boot time. */ TEMPORARY_DISK("TemporaryDisk"); 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 index 205e0aece56d..9af9d04b5dd3 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,13 @@ */ public enum DynamicVNetAssignmentScope { /** - * Enum value none. + * No dynamic VNet assignment is enabled. */ NONE("none"), /** - * Enum value job. + * Dynamic VNet assignment is done per-job. If this value is set, the network configuration subnet ID must also be + * set. This feature requires approval before use, please contact support. */ JOB("job"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ElevationLevel.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ElevationLevel.java index eeda66c25f5d..fd4f8d09fbb0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ElevationLevel.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ElevationLevel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,12 @@ */ public enum ElevationLevel { /** - * Enum value NonAdmin. + * The user is a standard user without elevated access. */ NON_ADMIN("NonAdmin"), /** - * Enum value Admin. + * The user is a user with elevated access and operates with full Administrator permissions. */ ADMIN("Admin"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EncryptionProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EncryptionProperties.java index ac705511ae44..5308f0ef8ddf 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EncryptionProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EncryptionProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessDefaultAction.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessDefaultAction.java index 35ec0379887e..a4bf6329f6e4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessDefaultAction.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessDefaultAction.java @@ -1,22 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; /** - * The default action when there is no IPRule matched. - * * Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled. */ public enum EndpointAccessDefaultAction { /** - * Enum value Allow. + * Allow client access. */ ALLOW("Allow"), /** - * Enum value Deny. + * Deny client access. */ DENY("Deny"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessProfile.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessProfile.java index 38fc377e8c85..bf4a3973205c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessProfile.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,6 +19,8 @@ @Fluent public final class EndpointAccessProfile implements JsonSerializable { /* + * The default action when there is no IPRule matched. + * * Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled. */ private EndpointAccessDefaultAction defaultAction; @@ -35,8 +37,9 @@ public EndpointAccessProfile() { } /** - * Get the defaultAction property: Default action for endpoint access. It is only applicable when - * publicNetworkAccess is enabled. + * Get the defaultAction property: The default action when there is no IPRule matched. + * + * Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled. * * @return the defaultAction value. */ @@ -45,8 +48,9 @@ public EndpointAccessDefaultAction defaultAction() { } /** - * Set the defaultAction property: Default action for endpoint access. It is only applicable when - * publicNetworkAccess is enabled. + * Set the defaultAction property: The default action when there is no IPRule matched. + * + * Default action for endpoint access. It is only applicable when publicNetworkAccess is enabled. * * @param defaultAction the defaultAction value to set. * @return the EndpointAccessProfile object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointDependency.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointDependency.java index 932fee6bc654..503f075790b9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointDependency.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EndpointDependency.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -35,7 +35,7 @@ public final class EndpointDependency implements JsonSerializable { /** * Creates an instance of EndpointDetail class. */ - public EndpointDetail() { + private EndpointDetail() { } /** diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EnvironmentSetting.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EnvironmentSetting.java index 2100b5443dc0..d8240a4b306b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EnvironmentSetting.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/EnvironmentSetting.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; 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 f0dfc9f8cc41..3841c218a43a 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,6 +19,8 @@ @Fluent public final class FixedScaleSettings implements JsonSerializable { /* + * The timeout for allocation of compute nodes to the pool. + * * The default value is 15 minutes. Timeout values use ISO 8601 format. For example, use PT10M for 10 minutes. The * minimum value is 5 minutes. If you specify a value less than 5 minutes, the Batch service rejects the request * with an error; if you are calling the REST API directly, the HTTP status code is 400 (Bad Request). @@ -26,16 +28,22 @@ public final class FixedScaleSettings implements JsonSerializable { + /* + * Specifies the access control policy execution mode. + */ + private HostEndpointSettingsModeTypes mode; + + /* + * Specifies the reference to the InVMAccessControlProfileVersion resource id in the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{ + * galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + */ + private String inVMAccessControlProfileReferenceId; + + /** + * Creates an instance of HostEndpointSettings class. + */ + public HostEndpointSettings() { + } + + /** + * Get the mode property: Specifies the access control policy execution mode. + * + * @return the mode value. + */ + public HostEndpointSettingsModeTypes mode() { + return this.mode; + } + + /** + * Set the mode property: Specifies the access control policy execution mode. + * + * @param mode the mode value to set. + * @return the HostEndpointSettings object itself. + */ + public HostEndpointSettings withMode(HostEndpointSettingsModeTypes mode) { + this.mode = mode; + return this; + } + + /** + * Get the inVMAccessControlProfileReferenceId property: Specifies the reference to the + * InVMAccessControlProfileVersion resource id in the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + * + * @return the inVMAccessControlProfileReferenceId value. + */ + public String inVMAccessControlProfileReferenceId() { + return this.inVMAccessControlProfileReferenceId; + } + + /** + * Set the inVMAccessControlProfileReferenceId property: Specifies the reference to the + * InVMAccessControlProfileVersion resource id in the form of + * /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version}. + * + * @param inVMAccessControlProfileReferenceId the inVMAccessControlProfileReferenceId value to set. + * @return the HostEndpointSettings object itself. + */ + public HostEndpointSettings withInVMAccessControlProfileReferenceId(String inVMAccessControlProfileReferenceId) { + this.inVMAccessControlProfileReferenceId = inVMAccessControlProfileReferenceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("mode", this.mode == null ? null : this.mode.toString()); + jsonWriter.writeStringField("inVMAccessControlProfileReferenceId", this.inVMAccessControlProfileReferenceId); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of HostEndpointSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of HostEndpointSettings if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the HostEndpointSettings. + */ + public static HostEndpointSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + HostEndpointSettings deserializedHostEndpointSettings = new HostEndpointSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("mode".equals(fieldName)) { + deserializedHostEndpointSettings.mode + = HostEndpointSettingsModeTypes.fromString(reader.getString()); + } else if ("inVMAccessControlProfileReferenceId".equals(fieldName)) { + deserializedHostEndpointSettings.inVMAccessControlProfileReferenceId = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedHostEndpointSettings; + }); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/HostEndpointSettingsModeTypes.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/HostEndpointSettingsModeTypes.java new file mode 100644 index 000000000000..13d75d328cae --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/HostEndpointSettingsModeTypes.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Specifies the access control policy execution mode. + */ +public final class HostEndpointSettingsModeTypes extends ExpandableStringEnum { + /** + * In Audit mode, the system acts as if it is enforcing the access control policy, including emitting access denial + * entries in the logs but it does not actually deny any requests to host endpoints. + */ + public static final HostEndpointSettingsModeTypes AUDIT = fromString("Audit"); + + /** + * Enforce mode is the recommended mode of operation and system will enforce the access control policy. This + * property cannot be used together with 'inVMAccessControlProfileReferenceId'. + */ + public static final HostEndpointSettingsModeTypes ENFORCE = fromString("Enforce"); + + /** + * Creates a new instance of HostEndpointSettingsModeTypes value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HostEndpointSettingsModeTypes() { + } + + /** + * Creates or finds a HostEndpointSettingsModeTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding HostEndpointSettingsModeTypes. + */ + public static HostEndpointSettingsModeTypes fromString(String name) { + return fromString(name, HostEndpointSettingsModeTypes.class); + } + + /** + * Gets known HostEndpointSettingsModeTypes values. + * + * @return known HostEndpointSettingsModeTypes values. + */ + public static Collection values() { + return values(HostEndpointSettingsModeTypes.class); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IPFamily.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IPFamily.java new file mode 100644 index 000000000000..fed9306aa5b3 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IPFamily.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The IP families used to specify IP versions available to the pool. + */ +public final class IPFamily extends ExpandableStringEnum { + /** + * IPv4 is available to the pool. + */ + public static final IPFamily IPV4 = fromString("IPv4"); + + /** + * IPv6 is available to the pool. + */ + public static final IPFamily IPV6 = fromString("IPv6"); + + /** + * Creates a new instance of IPFamily value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IPFamily() { + } + + /** + * Creates or finds a IPFamily from its string representation. + * + * @param name a name to look for. + * @return the corresponding IPFamily. + */ + public static IPFamily fromString(String name) { + return fromString(name, IPFamily.class); + } + + /** + * Gets known IPFamily values. + * + * @return known IPFamily values. + */ + public static Collection values() { + return values(IPFamily.class); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IPTag.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IPTag.java new file mode 100644 index 000000000000..03c2c9a0da7d --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IPTag.java @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Specifies how tasks should be distributed across compute nodes. + */ +@Fluent +public final class IPTag implements JsonSerializable { + /* + * The IP Tag type. + * + * Example: FirstPartyUsage. + */ + private String ipTagType; + + /* + * The value of the IP tag associated with the public IP. + * + * Example: SQL. + */ + private String tag; + + /** + * Creates an instance of IPTag class. + */ + public IPTag() { + } + + /** + * Get the ipTagType property: The IP Tag type. + * + * Example: FirstPartyUsage. + * + * @return the ipTagType value. + */ + public String ipTagType() { + return this.ipTagType; + } + + /** + * Set the ipTagType property: The IP Tag type. + * + * Example: FirstPartyUsage. + * + * @param ipTagType the ipTagType value to set. + * @return the IPTag object itself. + */ + public IPTag withIpTagType(String ipTagType) { + this.ipTagType = ipTagType; + return this; + } + + /** + * Get the tag property: The value of the IP tag associated with the public IP. + * + * Example: SQL. + * + * @return the tag value. + */ + public String tag() { + return this.tag; + } + + /** + * Set the tag property: The value of the IP tag associated with the public IP. + * + * Example: SQL. + * + * @param tag the tag value to set. + * @return the IPTag object itself. + */ + public IPTag withTag(String tag) { + this.tag = tag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("ipTagType", this.ipTagType); + jsonWriter.writeStringField("tag", this.tag); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of IPTag from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of IPTag if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the IPTag. + */ + public static IPTag fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + IPTag deserializedIPTag = new IPTag(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("ipTagType".equals(fieldName)) { + deserializedIPTag.ipTagType = reader.getString(); + } else if ("tag".equals(fieldName)) { + deserializedIPTag.tag = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedIPTag; + }); + } +} 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 51d8334e3592..cc3f9caa7f4b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -18,40 +18,57 @@ @Fluent public final class ImageReference implements JsonSerializable { /* + * The publisher of the Azure Virtual Machines Marketplace image. + * * For example, Canonical or MicrosoftWindowsServer. */ private String publisher; /* + * The offer type of the Azure Virtual Machines Marketplace image. + * * For example, UbuntuServer or WindowsServer. */ private String offer; /* + * The SKU of the Azure Virtual Machines Marketplace image. + * * For example, 18.04-LTS or 2022-datacenter. */ private String sku; /* + * The version of the Azure Virtual Machines Marketplace image. + * * A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is * 'latest'. */ private String version; /* + * The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool will be created using + * this Image Id. This is of the form + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName + * }/images/{imageDefinitionName}/versions/{versionId}. + * * This property is mutually exclusive with other properties. The Azure Compute Gallery Image must have replicas in * the same region as the Azure Batch account. For information about the firewall settings for the Batch node agent * to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. */ private String id; /* + * The shared gallery image unique identifier + * * This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. */ private String sharedGalleryImageId; /* + * The community gallery image unique identifier + * * This property is mutually exclusive with other properties and can be fetched from community gallery image GET * call. */ @@ -64,7 +81,9 @@ public ImageReference() { } /** - * Get the publisher property: For example, Canonical or MicrosoftWindowsServer. + * Get the publisher property: The publisher of the Azure Virtual Machines Marketplace image. + * + * For example, Canonical or MicrosoftWindowsServer. * * @return the publisher value. */ @@ -73,7 +92,9 @@ public String publisher() { } /** - * Set the publisher property: For example, Canonical or MicrosoftWindowsServer. + * Set the publisher property: The publisher of the Azure Virtual Machines Marketplace image. + * + * For example, Canonical or MicrosoftWindowsServer. * * @param publisher the publisher value to set. * @return the ImageReference object itself. @@ -84,7 +105,9 @@ public ImageReference withPublisher(String publisher) { } /** - * Get the offer property: For example, UbuntuServer or WindowsServer. + * Get the offer property: The offer type of the Azure Virtual Machines Marketplace image. + * + * For example, UbuntuServer or WindowsServer. * * @return the offer value. */ @@ -93,7 +116,9 @@ public String offer() { } /** - * Set the offer property: For example, UbuntuServer or WindowsServer. + * Set the offer property: The offer type of the Azure Virtual Machines Marketplace image. + * + * For example, UbuntuServer or WindowsServer. * * @param offer the offer value to set. * @return the ImageReference object itself. @@ -104,7 +129,9 @@ public ImageReference withOffer(String offer) { } /** - * Get the sku property: For example, 18.04-LTS or 2022-datacenter. + * Get the sku property: The SKU of the Azure Virtual Machines Marketplace image. + * + * For example, 18.04-LTS or 2022-datacenter. * * @return the sku value. */ @@ -113,7 +140,9 @@ public String sku() { } /** - * Set the sku property: For example, 18.04-LTS or 2022-datacenter. + * Set the sku property: The SKU of the Azure Virtual Machines Marketplace image. + * + * For example, 18.04-LTS or 2022-datacenter. * * @param sku the sku value to set. * @return the ImageReference object itself. @@ -124,8 +153,10 @@ public ImageReference withSku(String sku) { } /** - * Get the version property: A value of 'latest' can be specified to select the latest version of an image. If - * omitted, the default is 'latest'. + * Get the version property: The version of the Azure Virtual Machines Marketplace image. + * + * A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is + * 'latest'. * * @return the version value. */ @@ -134,8 +165,10 @@ public String version() { } /** - * Set the version property: A value of 'latest' can be specified to select the latest version of an image. If - * omitted, the default is 'latest'. + * Set the version property: The version of the Azure Virtual Machines Marketplace image. + * + * A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is + * 'latest'. * * @param version the version value to set. * @return the ImageReference object itself. @@ -146,10 +179,14 @@ public ImageReference withVersion(String version) { } /** - * Get the id property: This property is mutually exclusive with other properties. The Azure Compute Gallery Image - * must have replicas in the same region as the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * Get the id property: The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool + * will be created using this Image Id. This is of the form + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId}. + * + * This property is mutually exclusive with other properties. The Azure Compute Gallery Image must have replicas in + * the same region as the Azure Batch account. For information about the firewall settings for the Batch node agent + * to communicate with the Batch service see + * https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. * * @return the id value. */ @@ -158,10 +195,14 @@ public String id() { } /** - * Set the id property: This property is mutually exclusive with other properties. The Azure Compute Gallery Image - * must have replicas in the same region as the Azure Batch account. For information about the firewall settings for - * the Batch node agent to communicate with the Batch service see - * https://docs.microsoft.com/en-us/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. + * Set the id property: The ARM resource identifier of the Azure Compute Gallery Image. Compute Nodes in the Pool + * will be created using this Image Id. This is of the form + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionId}. + * + * This property is mutually exclusive with other properties. The Azure Compute Gallery Image must have replicas in + * the same region as the Azure Batch account. For information about the firewall settings for the Batch node agent + * to communicate with the Batch service see + * https://learn.microsoft.com/azure/batch/batch-api-basics#virtual-network-vnet-and-firewall-configuration. * * @param id the id value to set. * @return the ImageReference object itself. @@ -172,8 +213,9 @@ public ImageReference withId(String id) { } /** - * Get the sharedGalleryImageId property: This property is mutually exclusive with other properties and can be - * fetched from shared gallery image GET call. + * Get the sharedGalleryImageId property: The shared gallery image unique identifier + * + * This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. * * @return the sharedGalleryImageId value. */ @@ -182,8 +224,9 @@ public String sharedGalleryImageId() { } /** - * Set the sharedGalleryImageId property: This property is mutually exclusive with other properties and can be - * fetched from shared gallery image GET call. + * Set the sharedGalleryImageId property: The shared gallery image unique identifier + * + * This property is mutually exclusive with other properties and can be fetched from shared gallery image GET call. * * @param sharedGalleryImageId the sharedGalleryImageId value to set. * @return the ImageReference object itself. @@ -194,8 +237,10 @@ public ImageReference withSharedGalleryImageId(String sharedGalleryImageId) { } /** - * Get the communityGalleryImageId property: This property is mutually exclusive with other properties and can be - * fetched from community gallery image GET call. + * Get the communityGalleryImageId property: The community gallery image unique identifier + * + * This property is mutually exclusive with other properties and can be fetched from community gallery image GET + * call. * * @return the communityGalleryImageId value. */ @@ -204,8 +249,10 @@ public String communityGalleryImageId() { } /** - * Set the communityGalleryImageId property: This property is mutually exclusive with other properties and can be - * fetched from community gallery image GET call. + * Set the communityGalleryImageId property: The community gallery image unique identifier + * + * This property is mutually exclusive with other properties and can be fetched from community gallery image GET + * call. * * @param communityGalleryImageId the communityGalleryImageId value to set. * @return the ImageReference object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundEndpointProtocol.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundEndpointProtocol.java index 6a20ea987890..f8bafa3840ed 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundEndpointProtocol.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundEndpointProtocol.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,12 @@ */ public enum InboundEndpointProtocol { /** - * Enum value TCP. + * Use TCP for the endpoint. */ TCP("TCP"), /** - * Enum value UDP. + * Use UDP for the endpoint. */ UDP("UDP"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundNatPool.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundNatPool.java index ec367416035a..b1959c71accd 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundNatPool.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InboundNatPool.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,6 +19,8 @@ @Fluent public final class InboundNatPool implements JsonSerializable { /* + * The name of the endpoint. + * * The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. * Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 * characters. If any invalid values are provided the request fails with HTTP status code 400. @@ -31,12 +33,17 @@ public final class InboundNatPool implements JsonSerializable { private InboundEndpointProtocol protocol; /* - * This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 22, 3389, 29876 and - * 29877 as these are reserved. If any reserved values are provided the request fails with HTTP status code 400. + * The port number on the compute node. + * + * This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as + * these are reserved. If any reserved values are provided the request fails with HTTP status code 400. */ private int backendPort; /* + * The first port number in the range of external ports that will be used to provide inbound access to the + * backendPort on individual compute nodes. + * * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges * within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request * fails with HTTP status code 400. @@ -44,6 +51,9 @@ public final class InboundNatPool implements JsonSerializable { private int frontendPortRangeStart; /* + * The last port number in the range of external ports that will be used to provide inbound access to the + * backendPort on individual compute nodes. + * * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch * service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are * provided the request fails with HTTP status code 400. @@ -51,6 +61,8 @@ public final class InboundNatPool implements JsonSerializable { private int frontendPortRangeEnd; /* + * A list of network security group rules that will be applied to the endpoint. + * * The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network * security group rules are specified, a default rule will be created to allow inbound access to the specified * backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status @@ -65,9 +77,11 @@ public InboundNatPool() { } /** - * Get the name property: The name must be unique within a Batch pool, can contain letters, numbers, underscores, - * periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, - * and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. + * Get the name property: The name of the endpoint. + * + * The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. + * Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 + * characters. If any invalid values are provided the request fails with HTTP status code 400. * * @return the name value. */ @@ -76,9 +90,11 @@ public String name() { } /** - * Set the name property: The name must be unique within a Batch pool, can contain letters, numbers, underscores, - * periods, and hyphens. Names must start with a letter or number, must end with a letter, number, or underscore, - * and cannot exceed 77 characters. If any invalid values are provided the request fails with HTTP status code 400. + * Set the name property: The name of the endpoint. + * + * The name must be unique within a Batch pool, can contain letters, numbers, underscores, periods, and hyphens. + * Names must start with a letter or number, must end with a letter, number, or underscore, and cannot exceed 77 + * characters. If any invalid values are provided the request fails with HTTP status code 400. * * @param name the name value to set. * @return the InboundNatPool object itself. @@ -109,9 +125,10 @@ public InboundNatPool withProtocol(InboundEndpointProtocol protocol) { } /** - * Get the backendPort property: This must be unique within a Batch pool. Acceptable values are between 1 and 65535 - * except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails - * with HTTP status code 400. + * Get the backendPort property: The port number on the compute node. + * + * This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as + * these are reserved. If any reserved values are provided the request fails with HTTP status code 400. * * @return the backendPort value. */ @@ -120,9 +137,10 @@ public int backendPort() { } /** - * Set the backendPort property: This must be unique within a Batch pool. Acceptable values are between 1 and 65535 - * except for 22, 3389, 29876 and 29877 as these are reserved. If any reserved values are provided the request fails - * with HTTP status code 400. + * Set the backendPort property: The port number on the compute node. + * + * This must be unique within a Batch pool. Acceptable values are between 1 and 65535 except for 29876 and 29877 as + * these are reserved. If any reserved values are provided the request fails with HTTP status code 400. * * @param backendPort the backendPort value to set. * @return the InboundNatPool object itself. @@ -133,9 +151,12 @@ public InboundNatPool withBackendPort(int backendPort) { } /** - * Get the frontendPortRangeStart property: Acceptable values range between 1 and 65534 except ports from 50000 to - * 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or - * overlapping values are provided the request fails with HTTP status code 400. + * Get the frontendPortRangeStart property: The first port number in the range of external ports that will be used + * to provide inbound access to the backendPort on individual compute nodes. + * + * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges + * within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request + * fails with HTTP status code 400. * * @return the frontendPortRangeStart value. */ @@ -144,9 +165,12 @@ public int frontendPortRangeStart() { } /** - * Set the frontendPortRangeStart property: Acceptable values range between 1 and 65534 except ports from 50000 to - * 55000 which are reserved. All ranges within a pool must be distinct and cannot overlap. If any reserved or - * overlapping values are provided the request fails with HTTP status code 400. + * Set the frontendPortRangeStart property: The first port number in the range of external ports that will be used + * to provide inbound access to the backendPort on individual compute nodes. + * + * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved. All ranges + * within a pool must be distinct and cannot overlap. If any reserved or overlapping values are provided the request + * fails with HTTP status code 400. * * @param frontendPortRangeStart the frontendPortRangeStart value to set. * @return the InboundNatPool object itself. @@ -157,9 +181,12 @@ public InboundNatPool withFrontendPortRangeStart(int frontendPortRangeStart) { } /** - * Get the frontendPortRangeEnd property: Acceptable values range between 1 and 65534 except ports from 50000 to - * 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If - * any reserved or overlapping values are provided the request fails with HTTP status code 400. + * Get the frontendPortRangeEnd property: The last port number in the range of external ports that will be used to + * provide inbound access to the backendPort on individual compute nodes. + * + * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch + * service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are + * provided the request fails with HTTP status code 400. * * @return the frontendPortRangeEnd value. */ @@ -168,9 +195,12 @@ public int frontendPortRangeEnd() { } /** - * Set the frontendPortRangeEnd property: Acceptable values range between 1 and 65534 except ports from 50000 to - * 55000 which are reserved by the Batch service. All ranges within a pool must be distinct and cannot overlap. If - * any reserved or overlapping values are provided the request fails with HTTP status code 400. + * Set the frontendPortRangeEnd property: The last port number in the range of external ports that will be used to + * provide inbound access to the backendPort on individual compute nodes. + * + * Acceptable values range between 1 and 65534 except ports from 50000 to 55000 which are reserved by the Batch + * service. All ranges within a pool must be distinct and cannot overlap. If any reserved or overlapping values are + * provided the request fails with HTTP status code 400. * * @param frontendPortRangeEnd the frontendPortRangeEnd value to set. * @return the InboundNatPool object itself. @@ -181,10 +211,13 @@ public InboundNatPool withFrontendPortRangeEnd(int frontendPortRangeEnd) { } /** - * Get the networkSecurityGroupRules property: The maximum number of rules that can be specified across all the - * endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created - * to allow inbound access to the specified backendPort. If the maximum number of network security group rules is - * exceeded the request fails with HTTP status code 400. + * Get the networkSecurityGroupRules property: A list of network security group rules that will be applied to the + * endpoint. + * + * The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network + * security group rules are specified, a default rule will be created to allow inbound access to the specified + * backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status + * code 400. * * @return the networkSecurityGroupRules value. */ @@ -193,10 +226,13 @@ public List networkSecurityGroupRules() { } /** - * Set the networkSecurityGroupRules property: The maximum number of rules that can be specified across all the - * endpoints on a Batch pool is 25. If no network security group rules are specified, a default rule will be created - * to allow inbound access to the specified backendPort. If the maximum number of network security group rules is - * exceeded the request fails with HTTP status code 400. + * Set the networkSecurityGroupRules property: A list of network security group rules that will be applied to the + * endpoint. + * + * The maximum number of rules that can be specified across all the endpoints on a Batch pool is 25. If no network + * security group rules are specified, a default rule will be created to allow inbound access to the specified + * backendPort. If the maximum number of network security group rules is exceeded the request fails with HTTP status + * code 400. * * @param networkSecurityGroupRules the networkSecurityGroupRules value to set. * @return the InboundNatPool object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InterNodeCommunicationState.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InterNodeCommunicationState.java index 8d0bc0983d23..389675f05428 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InterNodeCommunicationState.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/InterNodeCommunicationState.java @@ -1,23 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; /** - * Whether the pool permits direct communication between nodes. - * * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance of * the requested number of nodes to be allocated in the pool. If not specified, this value defaults to 'Disabled'. */ public enum InterNodeCommunicationState { /** - * Enum value Enabled. + * Enable network communication between virtual machines. */ ENABLED("Enabled"), /** - * Enum value Disabled. + * Disable network communication between virtual machines. */ DISABLED("Disabled"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpAddressProvisioningType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpAddressProvisioningType.java index fbcde6245d85..4aa152399fa6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpAddressProvisioningType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpAddressProvisioningType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,17 +9,18 @@ */ public enum IpAddressProvisioningType { /** - * Enum value BatchManaged. + * A public IP will be created and managed by Batch. There may be multiple public IPs depending on the size of the + * Pool. */ BATCH_MANAGED("BatchManaged"), /** - * Enum value UserManaged. + * Public IPs are provided by the user and will be used to provision the Compute Nodes. */ USER_MANAGED("UserManaged"), /** - * Enum value NoPublicIPAddresses. + * No public IP Address will be created for the Compute Nodes in the Pool. */ NO_PUBLIC_IPADDRESSES("NoPublicIPAddresses"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpRule.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpRule.java index 169e5347796c..cd05cb551840 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpRule.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpRule.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -20,9 +20,11 @@ public final class IpRule implements JsonSerializable { /* * Action when client IP address is matched. */ - private String action = "Allow"; + private IpRuleAction action; /* + * The IP address or IP address range to filter + * * IPv4 address, or IPv4 address range in CIDR format. */ private String value; @@ -38,7 +40,7 @@ public IpRule() { * * @return the action value. */ - public String action() { + public IpRuleAction action() { return this.action; } @@ -48,13 +50,15 @@ public String action() { * @param action the action value to set. * @return the IpRule object itself. */ - public IpRule withAction(String action) { + public IpRule withAction(IpRuleAction action) { this.action = action; return this; } /** - * Get the value property: IPv4 address, or IPv4 address range in CIDR format. + * Get the value property: The IP address or IP address range to filter + * + * IPv4 address, or IPv4 address range in CIDR format. * * @return the value value. */ @@ -63,7 +67,9 @@ public String value() { } /** - * Set the value property: IPv4 address, or IPv4 address range in CIDR format. + * Set the value property: The IP address or IP address range to filter + * + * IPv4 address, or IPv4 address range in CIDR format. * * @param value the value value to set. * @return the IpRule object itself. @@ -79,6 +85,10 @@ public IpRule withValue(String value) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (action() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property action in model IpRule")); + } if (value() == null) { throw LOGGER.atError().log(new IllegalArgumentException("Missing required property value in model IpRule")); } @@ -92,7 +102,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("action", this.action); + jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); jsonWriter.writeStringField("value", this.value); return jsonWriter.writeEndObject(); } @@ -113,7 +123,9 @@ public static IpRule fromJson(JsonReader jsonReader) throws IOException { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("value".equals(fieldName)) { + if ("action".equals(fieldName)) { + deserializedIpRule.action = IpRuleAction.fromString(reader.getString()); + } else if ("value".equals(fieldName)) { deserializedIpRule.value = reader.getString(); } else { reader.skipChildren(); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpRuleAction.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpRuleAction.java new file mode 100644 index 000000000000..d7695aaa0cb4 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IpRuleAction.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +/** + * The action when client IP address is matched. + */ +public enum IpRuleAction { + /** + * Allow access for the matched client IP address. + */ + ALLOW("Allow"); + + /** + * The actual serialized value for a IpRuleAction instance. + */ + private final String value; + + IpRuleAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IpRuleAction instance. + * + * @param value the serialized value to parse. + * @return the parsed IpRuleAction object, or null if unable to parse. + */ + public static IpRuleAction fromString(String value) { + if (value == null) { + return null; + } + IpRuleAction[] items = IpRuleAction.values(); + for (IpRuleAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IssueType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IssueType.java index f49da6ca161c..8cb0e90ab701 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IssueType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/IssueType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -12,22 +12,25 @@ */ public final class IssueType extends ExpandableStringEnum { /** - * Static value Unknown for IssueType. + * Unknown issue type. */ public static final IssueType UNKNOWN = fromString("Unknown"); /** - * Static value ConfigurationPropagationFailure for IssueType. + * An error occurred while applying the network security perimeter (NSP) configuration. */ public static final IssueType CONFIGURATION_PROPAGATION_FAILURE = fromString("ConfigurationPropagationFailure"); /** - * Static value MissingPerimeterConfiguration for IssueType. + * A network connectivity issue is happening on the resource which could be addressed either by adding new resources + * to the network security perimeter (NSP) or by modifying access rules. */ public static final IssueType MISSING_PERIMETER_CONFIGURATION = fromString("MissingPerimeterConfiguration"); /** - * Static value MissingIdentityConfiguration for IssueType. + * An managed identity hasn't been associated with the resource. The resource will still be able to validate inbound + * traffic from the network security perimeter (NSP) or matching inbound access rules, but it won't be able to + * perform outbound access as a member of the NSP. */ public static final IssueType MISSING_IDENTITY_CONFIGURATION = fromString("MissingIdentityConfiguration"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/JobDefaultOrder.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/JobDefaultOrder.java new file mode 100644 index 000000000000..95f208dbc0b5 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/JobDefaultOrder.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The order for scheduling tasks from different jobs with the same priority. + */ +public final class JobDefaultOrder extends ExpandableStringEnum { + /** + * Tasks should be scheduled uniformly from all equal-priority jobs for the pool. + */ + public static final JobDefaultOrder NONE = fromString("None"); + + /** + * If jobs have equal priority, tasks from jobs that were created earlier should be scheduled first. + */ + public static final JobDefaultOrder CREATION_TIME = fromString("CreationTime"); + + /** + * Creates a new instance of JobDefaultOrder value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JobDefaultOrder() { + } + + /** + * Creates or finds a JobDefaultOrder from its string representation. + * + * @param name a name to look for. + * @return the corresponding JobDefaultOrder. + */ + public static JobDefaultOrder fromString(String name) { + return fromString(name, JobDefaultOrder.class); + } + + /** + * Gets known JobDefaultOrder values. + * + * @return known JobDefaultOrder values. + */ + public static Collection values() { + return values(JobDefaultOrder.class); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeySource.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeySource.java index d3131f7a3b20..7700b0488567 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeySource.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeySource.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,14 @@ */ public enum KeySource { /** - * Enum value Microsoft.Batch. + * Batch creates and manages the encryption keys used to protect the account data. */ MICROSOFT_BATCH("Microsoft.Batch"), /** - * Enum value Microsoft.KeyVault. + * The encryption keys used to protect the account data are stored in an external key vault. If this is set then the + * Batch Account identity must be set to `SystemAssigned` and a valid Key Identifier must also be supplied under the + * keyVaultProperties. */ MICROSOFT_KEY_VAULT("Microsoft.KeyVault"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultProperties.java index 5309320f34aa..55376d9db200 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultReference.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultReference.java index 88eb6950419e..2edfaad8d60f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultReference.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/KeyVaultReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LinuxUserConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LinuxUserConfiguration.java index 93d34e7c582e..f27024b39c46 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LinuxUserConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LinuxUserConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,18 +17,24 @@ @Fluent public final class LinuxUserConfiguration implements JsonSerializable { /* + * The user ID of the user account. + * * The uid and gid properties must be specified together or not at all. If not specified the underlying operating * system picks the uid. */ private Integer uid; /* + * The group ID for the user account. + * * The uid and gid properties must be specified together or not at all. If not specified the underlying operating * system picks the gid. */ private Integer gid; /* + * The SSH private key for the user account. + * * The private key must not be password protected. The private key is used to automatically configure asymmetric-key * based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property * is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the @@ -44,8 +50,10 @@ public LinuxUserConfiguration() { } /** - * Get the uid property: The uid and gid properties must be specified together or not at all. If not specified the - * underlying operating system picks the uid. + * Get the uid property: The user ID of the user account. + * + * The uid and gid properties must be specified together or not at all. If not specified the underlying operating + * system picks the uid. * * @return the uid value. */ @@ -54,8 +62,10 @@ public Integer uid() { } /** - * Set the uid property: The uid and gid properties must be specified together or not at all. If not specified the - * underlying operating system picks the uid. + * Set the uid property: The user ID of the user account. + * + * The uid and gid properties must be specified together or not at all. If not specified the underlying operating + * system picks the uid. * * @param uid the uid value to set. * @return the LinuxUserConfiguration object itself. @@ -66,8 +76,10 @@ public LinuxUserConfiguration withUid(Integer uid) { } /** - * Get the gid property: The uid and gid properties must be specified together or not at all. If not specified the - * underlying operating system picks the gid. + * Get the gid property: The group ID for the user account. + * + * The uid and gid properties must be specified together or not at all. If not specified the underlying operating + * system picks the gid. * * @return the gid value. */ @@ -76,8 +88,10 @@ public Integer gid() { } /** - * Set the gid property: The uid and gid properties must be specified together or not at all. If not specified the - * underlying operating system picks the gid. + * Set the gid property: The group ID for the user account. + * + * The uid and gid properties must be specified together or not at all. If not specified the underlying operating + * system picks the gid. * * @param gid the gid value to set. * @return the LinuxUserConfiguration object itself. @@ -88,11 +102,13 @@ public LinuxUserConfiguration withGid(Integer gid) { } /** - * Get the sshPrivateKey property: The private key must not be password protected. The private key is used to - * automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's - * enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does - * this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not - * configured between nodes (no modification of the user's .ssh directory is done). + * Get the sshPrivateKey property: The SSH private key for the user account. + * + * The private key must not be password protected. The private key is used to automatically configure asymmetric-key + * based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property + * is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the + * user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of + * the user's .ssh directory is done). * * @return the sshPrivateKey value. */ @@ -101,11 +117,13 @@ public String sshPrivateKey() { } /** - * Set the sshPrivateKey property: The private key must not be password protected. The private key is used to - * automatically configure asymmetric-key based authentication for SSH between nodes in a Linux pool when the pool's - * enableInterNodeCommunication property is true (it is ignored if enableInterNodeCommunication is false). It does - * this by placing the key pair into the user's .ssh directory. If not specified, password-less SSH is not - * configured between nodes (no modification of the user's .ssh directory is done). + * Set the sshPrivateKey property: The SSH private key for the user account. + * + * The private key must not be password protected. The private key is used to automatically configure asymmetric-key + * based authentication for SSH between nodes in a Linux pool when the pool's enableInterNodeCommunication property + * is true (it is ignored if enableInterNodeCommunication is false). It does this by placing the key pair into the + * user's .ssh directory. If not specified, password-less SSH is not configured between nodes (no modification of + * the user's .ssh directory is done). * * @param sshPrivateKey the sshPrivateKey value to set. * @return the LinuxUserConfiguration object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListCertificatesResult.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListCertificatesResult.java deleted file mode 100644 index 53b2a472070a..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ListCertificatesResult.java +++ /dev/null @@ -1,127 +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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.batch.fluent.models.CertificateInner; -import java.io.IOException; -import java.util.List; - -/** - * Values returned by the List operation. - */ -@Fluent -public final class ListCertificatesResult implements JsonSerializable { - /* - * The collection of returned certificates. - */ - private List value; - - /* - * The continuation token. - */ - private String nextLink; - - /** - * Creates an instance of ListCertificatesResult class. - */ - public ListCertificatesResult() { - } - - /** - * Get the value property: The collection of returned certificates. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The collection of returned certificates. - * - * @param value the value value to set. - * @return the ListCertificatesResult object itself. - */ - public ListCertificatesResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The continuation token. - * - * @param nextLink the nextLink value to set. - * @return the ListCertificatesResult object itself. - */ - public ListCertificatesResult 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListCertificatesResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListCertificatesResult if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ListCertificatesResult. - */ - public static ListCertificatesResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListCertificatesResult deserializedListCertificatesResult = new ListCertificatesResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> CertificateInner.fromJson(reader1)); - deserializedListCertificatesResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedListCertificatesResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedListCertificatesResult; - }); - } -} 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 c9199cad95f3..9ae805f97e44 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LoginMode.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LoginMode.java index 28af131704f8..98e1d1e36a7a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LoginMode.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/LoginMode.java @@ -1,22 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; /** - * Login mode for user - * * Specifies login mode for the user. The default value is Interactive. */ public enum LoginMode { /** - * Enum value Batch. + * The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended for long running parallel + * processes. */ BATCH("Batch"), /** - * Enum value Interactive. + * The LOGON32_LOGON_INTERACTIVE Win32 login mode. Some applications require having permissions associated with the + * interactive login mode. If this is the case for an application used in your task, then this option is + * recommended. */ INTERACTIVE("Interactive"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ManagedDisk.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ManagedDisk.java index 10bc872884ea..e93f16d8b637 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ManagedDisk.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ManagedDisk.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The ManagedDisk model. + * The managed disk parameters. */ @Fluent public final class ManagedDisk implements JsonSerializable { @@ -22,11 +22,19 @@ public final class ManagedDisk implements JsonSerializable { private StorageAccountType storageAccountType; /* + * Specifies the security profile for the managed disk. + * * Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs * and is required when using Confidential VMs. */ private VMDiskSecurityProfile securityProfile; + /* + * Specifies the customer managed disk encryption set resource id for the managed disk. It can be set only in + * UserSubscription mode. + */ + private DiskEncryptionSetParameters diskEncryptionSet; + /** * Creates an instance of ManagedDisk class. */ @@ -54,8 +62,10 @@ public ManagedDisk withStorageAccountType(StorageAccountType storageAccountType) } /** - * Get the securityProfile property: Specifies the security profile settings for the managed disk. **Note**: It can - * only be set for Confidential VMs and is required when using Confidential VMs. + * Get the securityProfile property: Specifies the security profile for the managed disk. + * + * Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs + * and is required when using Confidential VMs. * * @return the securityProfile value. */ @@ -64,8 +74,10 @@ public VMDiskSecurityProfile securityProfile() { } /** - * Set the securityProfile property: Specifies the security profile settings for the managed disk. **Note**: It can - * only be set for Confidential VMs and is required when using Confidential VMs. + * Set the securityProfile property: Specifies the security profile for the managed disk. + * + * Specifies the security profile settings for the managed disk. **Note**: It can only be set for Confidential VMs + * and is required when using Confidential VMs. * * @param securityProfile the securityProfile value to set. * @return the ManagedDisk object itself. @@ -75,6 +87,28 @@ public ManagedDisk withSecurityProfile(VMDiskSecurityProfile securityProfile) { return this; } + /** + * Get the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the + * managed disk. It can be set only in UserSubscription mode. + * + * @return the diskEncryptionSet value. + */ + public DiskEncryptionSetParameters diskEncryptionSet() { + return this.diskEncryptionSet; + } + + /** + * Set the diskEncryptionSet property: Specifies the customer managed disk encryption set resource id for the + * managed disk. It can be set only in UserSubscription mode. + * + * @param diskEncryptionSet the diskEncryptionSet value to set. + * @return the ManagedDisk object itself. + */ + public ManagedDisk withDiskEncryptionSet(DiskEncryptionSetParameters diskEncryptionSet) { + this.diskEncryptionSet = diskEncryptionSet; + return this; + } + /** * Validates the instance. * @@ -84,6 +118,9 @@ public void validate() { if (securityProfile() != null) { securityProfile().validate(); } + if (diskEncryptionSet() != null) { + diskEncryptionSet().validate(); + } } /** @@ -95,6 +132,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("storageAccountType", this.storageAccountType == null ? null : this.storageAccountType.toString()); jsonWriter.writeJsonField("securityProfile", this.securityProfile); + jsonWriter.writeJsonField("diskEncryptionSet", this.diskEncryptionSet); return jsonWriter.writeEndObject(); } @@ -117,6 +155,8 @@ public static ManagedDisk fromJson(JsonReader jsonReader) throws IOException { deserializedManagedDisk.storageAccountType = StorageAccountType.fromString(reader.getString()); } else if ("securityProfile".equals(fieldName)) { deserializedManagedDisk.securityProfile = VMDiskSecurityProfile.fromJson(reader); + } else if ("diskEncryptionSet".equals(fieldName)) { + deserializedManagedDisk.diskEncryptionSet = DiskEncryptionSetParameters.fromJson(reader); } else { reader.skipChildren(); } 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 11aae21c711d..68d60a44a992 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MountConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MountConfiguration.java index ff4712027fd7..4185db55a259 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MountConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/MountConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,21 +17,29 @@ @Fluent public final class MountConfiguration implements JsonSerializable { /* + * The Azure Storage Container to mount using blob FUSE on each node. + * * This property is mutually exclusive with all other properties. */ private AzureBlobFileSystemConfiguration azureBlobFileSystemConfiguration; /* + * The NFS file system to mount on each node. + * * This property is mutually exclusive with all other properties. */ private NfsMountConfiguration nfsMountConfiguration; /* + * The CIFS/SMB file system to mount on each node. + * * This property is mutually exclusive with all other properties. */ private CifsMountConfiguration cifsMountConfiguration; /* + * The Azure File Share to mount on each node. + * * This property is mutually exclusive with all other properties. */ private AzureFileShareConfiguration azureFileShareConfiguration; @@ -43,7 +51,10 @@ public MountConfiguration() { } /** - * Get the azureBlobFileSystemConfiguration property: This property is mutually exclusive with all other properties. + * Get the azureBlobFileSystemConfiguration property: The Azure Storage Container to mount using blob FUSE on each + * node. + * + * This property is mutually exclusive with all other properties. * * @return the azureBlobFileSystemConfiguration value. */ @@ -52,7 +63,10 @@ public AzureBlobFileSystemConfiguration azureBlobFileSystemConfiguration() { } /** - * Set the azureBlobFileSystemConfiguration property: This property is mutually exclusive with all other properties. + * Set the azureBlobFileSystemConfiguration property: The Azure Storage Container to mount using blob FUSE on each + * node. + * + * This property is mutually exclusive with all other properties. * * @param azureBlobFileSystemConfiguration the azureBlobFileSystemConfiguration value to set. * @return the MountConfiguration object itself. @@ -64,7 +78,9 @@ public AzureBlobFileSystemConfiguration azureBlobFileSystemConfiguration() { } /** - * Get the nfsMountConfiguration property: This property is mutually exclusive with all other properties. + * Get the nfsMountConfiguration property: The NFS file system to mount on each node. + * + * This property is mutually exclusive with all other properties. * * @return the nfsMountConfiguration value. */ @@ -73,7 +89,9 @@ public NfsMountConfiguration nfsMountConfiguration() { } /** - * Set the nfsMountConfiguration property: This property is mutually exclusive with all other properties. + * Set the nfsMountConfiguration property: The NFS file system to mount on each node. + * + * This property is mutually exclusive with all other properties. * * @param nfsMountConfiguration the nfsMountConfiguration value to set. * @return the MountConfiguration object itself. @@ -84,7 +102,9 @@ public MountConfiguration withNfsMountConfiguration(NfsMountConfiguration nfsMou } /** - * Get the cifsMountConfiguration property: This property is mutually exclusive with all other properties. + * Get the cifsMountConfiguration property: The CIFS/SMB file system to mount on each node. + * + * This property is mutually exclusive with all other properties. * * @return the cifsMountConfiguration value. */ @@ -93,7 +113,9 @@ public CifsMountConfiguration cifsMountConfiguration() { } /** - * Set the cifsMountConfiguration property: This property is mutually exclusive with all other properties. + * Set the cifsMountConfiguration property: The CIFS/SMB file system to mount on each node. + * + * This property is mutually exclusive with all other properties. * * @param cifsMountConfiguration the cifsMountConfiguration value to set. * @return the MountConfiguration object itself. @@ -104,7 +126,9 @@ public MountConfiguration withCifsMountConfiguration(CifsMountConfiguration cifs } /** - * Get the azureFileShareConfiguration property: This property is mutually exclusive with all other properties. + * Get the azureFileShareConfiguration property: The Azure File Share to mount on each node. + * + * This property is mutually exclusive with all other properties. * * @return the azureFileShareConfiguration value. */ @@ -113,7 +137,9 @@ public AzureFileShareConfiguration azureFileShareConfiguration() { } /** - * Set the azureFileShareConfiguration property: This property is mutually exclusive with all other properties. + * Set the azureFileShareConfiguration property: The Azure File Share to mount on each node. + * + * This property is mutually exclusive with all other properties. * * @param azureFileShareConfiguration the azureFileShareConfiguration value to set. * @return the MountConfiguration object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NameAvailabilityReason.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NameAvailabilityReason.java index 62f50c3fcc38..152fbe46fa9e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NameAvailabilityReason.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NameAvailabilityReason.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -10,12 +10,12 @@ */ public enum NameAvailabilityReason { /** - * Enum value Invalid. + * The requested name is invalid. */ INVALID("Invalid"), /** - * Enum value AlreadyExists. + * The requested name is already in use. */ ALREADY_EXISTS("AlreadyExists"); 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 85f21e57751d..b3087e80283b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,6 +17,11 @@ @Fluent public final class NetworkConfiguration implements JsonSerializable { /* + * The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. This is + * of the form + * /subscriptions/{subscription}/resourceGroups/{group}/providers/{provider}/virtualNetworks/{network}/subnets/{ + * subnet}. + * * The virtual network must be in the same region and subscription as the Azure Batch account. The specified subnet * should have enough free IP addresses to accommodate the number of nodes in the pool. If the subnet doesn't have * enough free IP addresses, the pool will partially allocate compute nodes and a resize error will occur. The @@ -26,9 +31,9 @@ public final class NetworkConfiguration implements JsonSerializable { /* + * The priority for this rule. + * * Priorities within a pool must be unique and are evaluated in order of priority. The lower the number the higher * the priority. For example, rules could be specified with order numbers of 150, 250, and 350. The rule with the * order number of 150 takes precedence over the rule that has an order of 250. Allowed priorities are 150 to 4096. @@ -32,12 +34,16 @@ public final class NetworkSecurityGroupRule implements JsonSerializable sourcePortRanges() { } /** - * Set the sourcePortRanges property: Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port - * ranges (i.e. 100-200). The ports should in the range of 0 to 65535 and the port ranges or ports can't overlap. If - * any other values are provided the request fails with HTTP status code 400. Default value will be *. + * Set the sourcePortRanges property: The source port ranges to match for the rule. + * + * Valid values are '*' (for all ports 0 - 65535) or arrays of ports or port ranges (i.e. 100-200). The ports should + * in the range of 0 to 65535 and the port ranges or ports can't overlap. If any other values are provided the + * request fails with HTTP status code 400. Default value will be *. * * @param sourcePortRanges the sourcePortRanges value to set. * @return the NetworkSecurityGroupRule object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityGroupRuleAccess.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityGroupRuleAccess.java index 13d365556d46..d9c2b718378a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityGroupRuleAccess.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityGroupRuleAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,12 @@ */ public enum NetworkSecurityGroupRuleAccess { /** - * Enum value Allow. + * Allow access. */ ALLOW("Allow"), /** - * Enum value Deny. + * Deny access. */ DENY("Deny"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeter.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeter.java index c52eeb6c55ff..d141e29c9e5c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeter.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeter.java @@ -1,22 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.Objects; -import java.util.UUID; /** * Information about a network security perimeter (NSP). */ -@Fluent +@Immutable public final class NetworkSecurityPerimeter implements JsonSerializable { /* * Fully qualified Azure resource ID of the NSP resource @@ -26,7 +24,7 @@ public final class NetworkSecurityPerimeter implements JsonSerializable UUID.fromString(nonNullReader.getString())); + deserializedNetworkSecurityPerimeter.perimeterGuid = reader.getString(); } else if ("location".equals(fieldName)) { deserializedNetworkSecurityPerimeter.location = reader.getString(); } else { diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfiguration.java index 501285f55625..65e29dbcd030 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -33,7 +33,7 @@ public interface NetworkSecurityPerimeterConfiguration { String type(); /** - * Gets the properties property: Network security configuration properties. + * Gets the properties property: The properties property. * * @return the properties value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProperties.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProperties.java index fa2ec5d31099..c09a2bb42a97 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProperties.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,11 +15,11 @@ /** * Network security configuration properties. */ -@Fluent +@Immutable public final class NetworkSecurityPerimeterConfigurationProperties implements JsonSerializable { /* - * Provisioning state of a network security perimeter configuration that is being created or updated. + * The provisioningState property. */ private NetworkSecurityPerimeterConfigurationProvisioningState provisioningState; @@ -29,29 +29,28 @@ public final class NetworkSecurityPerimeterConfigurationProperties private List provisioningIssues; /* - * Information about a network security perimeter (NSP) + * The networkSecurityPerimeter property. */ private NetworkSecurityPerimeter networkSecurityPerimeter; /* - * Information about resource association + * The resourceAssociation property. */ private ResourceAssociation resourceAssociation; /* - * Network security perimeter configuration profile + * The profile property. */ private NetworkSecurityProfile profile; /** * Creates an instance of NetworkSecurityPerimeterConfigurationProperties class. */ - public NetworkSecurityPerimeterConfigurationProperties() { + private NetworkSecurityPerimeterConfigurationProperties() { } /** - * Get the provisioningState property: Provisioning state of a network security perimeter configuration that is - * being created or updated. + * Get the provisioningState property: The provisioningState property. * * @return the provisioningState value. */ @@ -69,7 +68,7 @@ public List provisioningIssues() { } /** - * Get the networkSecurityPerimeter property: Information about a network security perimeter (NSP). + * Get the networkSecurityPerimeter property: The networkSecurityPerimeter property. * * @return the networkSecurityPerimeter value. */ @@ -78,19 +77,7 @@ public NetworkSecurityPerimeter networkSecurityPerimeter() { } /** - * Set the networkSecurityPerimeter property: Information about a network security perimeter (NSP). - * - * @param networkSecurityPerimeter the networkSecurityPerimeter value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withNetworkSecurityPerimeter(NetworkSecurityPerimeter networkSecurityPerimeter) { - this.networkSecurityPerimeter = networkSecurityPerimeter; - return this; - } - - /** - * Get the resourceAssociation property: Information about resource association. + * Get the resourceAssociation property: The resourceAssociation property. * * @return the resourceAssociation value. */ @@ -99,19 +86,7 @@ public ResourceAssociation resourceAssociation() { } /** - * Set the resourceAssociation property: Information about resource association. - * - * @param resourceAssociation the resourceAssociation value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties - withResourceAssociation(ResourceAssociation resourceAssociation) { - this.resourceAssociation = resourceAssociation; - return this; - } - - /** - * Get the profile property: Network security perimeter configuration profile. + * Get the profile property: The profile property. * * @return the profile value. */ @@ -119,17 +94,6 @@ public NetworkSecurityProfile profile() { return this.profile; } - /** - * Set the profile property: Network security perimeter configuration profile. - * - * @param profile the profile value to set. - * @return the NetworkSecurityPerimeterConfigurationProperties object itself. - */ - public NetworkSecurityPerimeterConfigurationProperties withProfile(NetworkSecurityProfile profile) { - this.profile = profile; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProvisioningState.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProvisioningState.java index 2343c4797421..eefd017fbae9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProvisioningState.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeters.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeters.java index 3971cd74d5f0..40484997979a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeters.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeters.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -13,69 +13,84 @@ */ public interface NetworkSecurityPerimeters { /** - * Lists all of the NSP configurations in the specified account. + * Gets information about the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. + * @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 result of a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedIterable}. + * @return information about the specified NSP configuration along with {@link Response}. */ - PagedIterable listConfigurations(String resourceGroupName, - String accountName); + Response getConfigurationWithResponse(String resourceGroupName, + String accountName, String networkSecurityPerimeterConfigurationName, Context context); /** - * Lists all of the NSP configurations in the specified account. + * Gets information about the specified NSP configuration. * - * @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. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 a list NSP (network security perimeter) configurations request as paginated response with - * {@link PagedIterable}. + * @return information about the specified NSP configuration. */ - PagedIterable listConfigurations(String resourceGroupName, - String accountName, Context context); + NetworkSecurityPerimeterConfiguration getConfiguration(String resourceGroupName, String accountName, + String networkSecurityPerimeterConfigurationName); /** - * Gets information about the specified NSP configuration. + * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 NSP configuration along with {@link Response}. + * @return result of a list NSP (network security perimeter) configurations request as paginated response with + * {@link PagedIterable}. */ - Response getConfigurationWithResponse(String resourceGroupName, - String accountName, String networkSecurityPerimeterConfigurationName, Context context); + PagedIterable listConfigurations(String resourceGroupName, + String accountName); /** - * Gets information about the specified NSP configuration. + * Lists all of the NSP configurations in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @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 specified NSP configuration. + * @return result of a list NSP (network security perimeter) configurations request as paginated response with + * {@link PagedIterable}. */ - NetworkSecurityPerimeterConfiguration getConfiguration(String resourceGroupName, String accountName, - String networkSecurityPerimeterConfigurationName); + PagedIterable listConfigurations(String resourceGroupName, + String accountName, Context context); /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -86,9 +101,12 @@ void reconcileConfiguration(String resourceGroupName, String accountName, /** * Reconciles the specified NSP configuration. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter configuration. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param networkSecurityPerimeterConfigurationName The name for a network security perimeter configuration. * @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. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityProfile.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityProfile.java index fe29c75517bb..07ae050221fa 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityProfile.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityProfile.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Network security perimeter configuration profile. */ -@Fluent +@Immutable public final class NetworkSecurityProfile implements JsonSerializable { /* * Name of the profile @@ -45,7 +45,7 @@ public final class NetworkSecurityProfile implements JsonSerializable accessRules() { return this.accessRules; } - /** - * Set the accessRules property: List of Access Rules. - * - * @param accessRules the accessRules value to set. - * @return the NetworkSecurityProfile object itself. - */ - public NetworkSecurityProfile withAccessRules(List accessRules) { - this.accessRules = accessRules; - return this; - } - /** * Get the diagnosticSettingsVersion property: Current diagnostic settings version. * @@ -117,17 +84,6 @@ public Integer diagnosticSettingsVersion() { return this.diagnosticSettingsVersion; } - /** - * Set the diagnosticSettingsVersion property: Current diagnostic settings version. - * - * @param diagnosticSettingsVersion the diagnosticSettingsVersion value to set. - * @return the NetworkSecurityProfile object itself. - */ - public NetworkSecurityProfile withDiagnosticSettingsVersion(Integer diagnosticSettingsVersion) { - this.diagnosticSettingsVersion = diagnosticSettingsVersion; - return this; - } - /** * Get the enabledLogCategories property: List of log categories that are enabled. * @@ -137,17 +93,6 @@ public List enabledLogCategories() { return this.enabledLogCategories; } - /** - * Set the enabledLogCategories property: List of log categories that are enabled. - * - * @param enabledLogCategories the enabledLogCategories value to set. - * @return the NetworkSecurityProfile object itself. - */ - public NetworkSecurityProfile withEnabledLogCategories(List enabledLogCategories) { - this.enabledLogCategories = enabledLogCategories; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NfsMountConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NfsMountConfiguration.java index 73ac50abc912..4f943b6a8aa0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NfsMountConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NfsMountConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -23,12 +23,16 @@ public final class NfsMountConfiguration implements JsonSerializable { /* + * Node placement Policy type on Batch pools. + * * Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional * policy. */ @@ -31,8 +33,10 @@ public NodePlacementConfiguration() { } /** - * Get the policy property: Allocation policy used by Batch Service to provision the nodes. If not specified, Batch - * will use the regional policy. + * Get the policy property: Node placement Policy type on Batch pools. + * + * Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional + * policy. * * @return the policy value. */ @@ -41,8 +45,10 @@ public NodePlacementPolicyType policy() { } /** - * Set the policy property: Allocation policy used by Batch Service to provision the nodes. If not specified, Batch - * will use the regional policy. + * Set the policy property: Node placement Policy type on Batch pools. + * + * Allocation policy used by Batch Service to provision the nodes. If not specified, Batch will use the regional + * policy. * * @param policy the policy value to set. * @return the NodePlacementConfiguration object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementPolicyType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementPolicyType.java index 8478042db9be..264c9530f4e6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementPolicyType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/NodePlacementPolicyType.java @@ -1,22 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; /** - * The placement policy for allocating nodes in the pool. - * * The default value is regional. */ public enum NodePlacementPolicyType { /** - * Enum value Regional. + * All nodes in the pool will be allocated in the same region. */ REGIONAL("Regional"), /** - * Enum value Zonal. + * Nodes in the pool will be spread across different zones with best effort balancing. */ ZONAL("Zonal"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OSDisk.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OSDisk.java index 1181f9457674..c46b3779887e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OSDisk.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OSDisk.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -27,7 +27,7 @@ public final class OSDisk implements JsonSerializable { private CachingType caching; /* - * The managedDisk property. + * The managed disk parameters. */ private ManagedDisk managedDisk; @@ -90,7 +90,7 @@ public OSDisk withCaching(CachingType caching) { } /** - * Get the managedDisk property: The managedDisk property. + * Get the managedDisk property: The managed disk parameters. * * @return the managedDisk value. */ @@ -99,7 +99,7 @@ public ManagedDisk managedDisk() { } /** - * Set the managedDisk property: The managedDisk property. + * Set the managedDisk property: The managed disk parameters. * * @param managedDisk the managedDisk value to set. * @return the OSDisk object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operation.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operation.java index ce204bf040a2..fb2077e7dd82 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operation.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Operation.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -11,7 +11,9 @@ */ public interface Operation { /** - * Gets the name property: This is of the format {provider}/{resource}/{operation}. + * Gets the name property: The operation name. + * + * This is of the format {provider}/{resource}/{operation}. * * @return the name value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OperationDisplay.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OperationDisplay.java index b753f71d9954..e7119591914d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OperationDisplay.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/OperationDisplay.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The object that describes the operation. */ -@Fluent +@Immutable public final class OperationDisplay implements JsonSerializable { /* * Friendly name of the resource provider. @@ -22,6 +22,8 @@ public final class OperationDisplay implements JsonSerializable tags(); /** - * Gets the identity property: The type of identity used for the Batch Pool. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the identity value. + * @return the systemData value. */ - BatchPoolIdentity identity(); + SystemData systemData(); /** - * Gets the displayName property: The display name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * Gets the displayName property: The display name for the pool. + * + * The display name need not be unique and can contain any Unicode characters up to a maximum length of 1024. * * @return the displayName value. */ String displayName(); /** - * Gets the lastModified property: This is the last time at which the pool level data, such as the - * targetDedicatedNodes or autoScaleSettings, changed. It does not factor in node-level changes such as a compute - * node changing state. + * Gets the lastModified property: The last modified time of the pool. + * + * This is the last time at which the pool level data, such as the targetDedicatedNodes or autoScaleSettings, + * changed. It does not factor in node-level changes such as a compute node changing state. * * @return the lastModified value. */ @@ -110,18 +120,21 @@ public interface Pool { OffsetDateTime allocationStateTransitionTime(); /** - * Gets the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual Machines - * (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports - * all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 - * series). + * Gets the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes except + * STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). * * @return the vmSize value. */ String vmSize(); /** - * Gets the deploymentConfiguration property: Deployment configuration properties. + * Gets the deploymentConfiguration property: This property describes the virtual machines that the pool nodes will + * be deployed on. + * + * Deployment configuration properties. * * @return the deploymentConfiguration value. */ @@ -142,48 +155,60 @@ public interface Pool { Integer currentLowPriorityNodes(); /** - * Gets the scaleSettings property: 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. + * Gets the scaleSettings property: Settings which configure the number of nodes in 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. * * @return the scaleSettings value. */ ScaleSettings scaleSettings(); /** - * Gets the autoScaleRun property: This property is set only if the pool automatically scales, i.e. - * autoScaleSettings are used. + * Gets the autoScaleRun property: The results and errors from the last execution of the autoscale formula. + * + * This property is set only if the pool automatically scales, i.e. autoScaleSettings are used. * * @return the autoScaleRun value. */ AutoScaleRun autoScaleRun(); /** - * Gets the interNodeCommunication property: This imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. If not - * specified, this value defaults to 'Disabled'. + * Gets the interNodeCommunication property: Whether the pool permits direct communication between nodes. + * + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the chance + * of the requested number of nodes to be allocated in the pool. If not specified, this value defaults to + * 'Disabled'. * * @return the interNodeCommunication value. */ InterNodeCommunicationState interNodeCommunication(); /** - * Gets the networkConfiguration property: The network configuration for a pool. + * Gets the networkConfiguration property: The network configuration for the pool. + * + * The network configuration for a pool. * * @return the networkConfiguration value. */ NetworkConfiguration networkConfiguration(); /** - * Gets the taskSlotsPerNode property: The default value is 1. The maximum value is the smaller of 4 times the - * number of cores of the vmSize of the pool or 256. + * Gets the taskSlotsPerNode property: The number of task slots that can be used to run concurrent tasks on a single + * compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of the pool + * or 256. * * @return the taskSlotsPerNode value. */ Integer taskSlotsPerNode(); /** - * Gets the taskSchedulingPolicy property: If not specified, the default is spread. + * Gets the taskSchedulingPolicy property: How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread. * * @return the taskSchedulingPolicy value. */ @@ -197,97 +222,64 @@ public interface Pool { List userAccounts(); /** - * Gets the metadata property: The Batch service does not assign any meaning to metadata; it is solely for the use - * of user code. + * Gets the metadata property: A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. * * @return the metadata value. */ List metadata(); /** - * Gets the startTask property: In an PATCH (update) operation, this property can be set to an empty object to - * remove the start task from the pool. + * Gets the startTask property: A task specified to run on each compute node as it joins the pool. + * + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from the + * pool. * * @return the startTask value. */ StartTask startTask(); /** - * Gets the certificates property: For Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the certificates are stored in a directory - * inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is supplied to the task - * to query for this location. For certificates with visibility of 'remoteUser', a 'certs' directory is created in - * the user's home directory (e.g., /home/{user-name}/certs) and certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure KeyVault - * Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. + * Gets the applicationPackages property: The list of application packages to be installed on each compute node in + * the pool. * - * @return the certificates value. - */ - List certificates(); - - /** - * Gets the applicationPackages property: Changes to application package references affect all new compute nodes - * joining the pool, but do not affect compute nodes that are already in the pool until they are rebooted or - * reimaged. There is a maximum of 10 application package references on any given pool. + * Changes to application package references affect all new compute nodes joining the pool, but do not affect + * compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum of 10 + * application package references on any given pool. * * @return the applicationPackages value. */ List applicationPackages(); /** - * Gets the applicationLicenses property: The list of application licenses must be a subset of available Batch - * service application licenses. If a license is requested which is not supported, pool creation will fail. + * Gets the resizeOperationStatus property: Contains details about the current or last completed resize operation. * - * @return the applicationLicenses value. - */ - List applicationLicenses(); - - /** - * Gets the resizeOperationStatus property: Describes either the current operation (if the pool AllocationState is - * Resizing) or the previously completed operation (if the AllocationState is Steady). + * Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed + * operation (if the AllocationState is Steady). * * @return the resizeOperationStatus value. */ ResizeOperationStatus resizeOperationStatus(); /** - * Gets the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. + * Gets the mountConfiguration property: A list of file systems to mount on each node in the pool. + * + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. * * @return the mountConfiguration value. */ List mountConfiguration(); /** - * Gets the targetNodeCommunicationMode property: If omitted, the default value is Default. + * Gets the upgradePolicy property: The upgrade policy for the pool. * - * @return the targetNodeCommunicationMode value. - */ - NodeCommunicationMode targetNodeCommunicationMode(); - - /** - * Gets the currentNodeCommunicationMode property: Determines how a pool communicates with the Batch service. - * - * @return the currentNodeCommunicationMode value. - */ - NodeCommunicationMode currentNodeCommunicationMode(); - - /** - * Gets the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling. + * Describes an upgrade policy - automatic, manual, or rolling. * * @return the upgradePolicy value. */ UpgradePolicy upgradePolicy(); - /** - * Gets the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. When specified, - * these tags are propagated to the backing Azure resources associated with the pool. This property can only be - * specified when the Batch account was created with the poolAllocationMode property set to 'UserSubscription'. - * - * @return the resourceTags value. - */ - Map resourceTags(); - /** * Gets the name of the resource group. * @@ -326,8 +318,11 @@ interface WithParentResource { /** * Specifies resourceGroupName, accountName. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account + * names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This + * name is used as part of the DNS name that is used to access the Batch service in the region in which the + * account is created. For example: http://accountname.region.batch.azure.com/. * @return the next definition stage. */ WithCreate withExistingBatchAccount(String resourceGroupName, String accountName); @@ -342,10 +337,9 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIde DefinitionStages.WithScaleSettings, DefinitionStages.WithInterNodeCommunication, DefinitionStages.WithNetworkConfiguration, DefinitionStages.WithTaskSlotsPerNode, DefinitionStages.WithTaskSchedulingPolicy, DefinitionStages.WithUserAccounts, DefinitionStages.WithMetadata, - DefinitionStages.WithStartTask, DefinitionStages.WithCertificates, DefinitionStages.WithApplicationPackages, - DefinitionStages.WithApplicationLicenses, DefinitionStages.WithMountConfiguration, - DefinitionStages.WithTargetNodeCommunicationMode, DefinitionStages.WithUpgradePolicy, - DefinitionStages.WithResourceTags, DefinitionStages.WithIfMatch, DefinitionStages.WithIfNoneMatch { + DefinitionStages.WithStartTask, DefinitionStages.WithApplicationPackages, + DefinitionStages.WithMountConfiguration, DefinitionStages.WithUpgradePolicy, DefinitionStages.WithIfMatch, + DefinitionStages.WithIfNoneMatch { /** * Executes the create request. * @@ -393,11 +387,15 @@ interface WithIdentity { */ interface WithDisplayName { /** - * Specifies the displayName property: The display name need not be unique and can contain any Unicode - * characters up to a maximum length of 1024.. + * Specifies the displayName property: The display name for the pool. + * + * The display name need not be unique and can contain any Unicode characters up to a maximum length of + * 1024.. + * + * @param displayName The display name for the pool. * - * @param displayName The display name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * The display name need not be unique and can contain any Unicode characters up to a maximum length of + * 1024. * @return the next definition stage. */ WithCreate withDisplayName(String displayName); @@ -408,18 +406,18 @@ interface WithDisplayName { */ interface WithVmSize { /** - * Specifies the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines - * (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for - * Virtual Machines (Windows) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all - * Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and - * STANDARD_DSV2 series).. - * - * @param vmSize For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual - * Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - * Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, - * STANDARD_DS, and STANDARD_DSV2 series). + * Specifies the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same + * size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes + * except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).. + * + * @param vmSize The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes + * except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). * @return the next definition stage. */ WithCreate withVmSize(String vmSize); @@ -430,9 +428,15 @@ interface WithVmSize { */ interface WithDeploymentConfiguration { /** - * Specifies the deploymentConfiguration property: Deployment configuration properties.. + * Specifies the deploymentConfiguration property: This property describes the virtual machines that the + * pool nodes will be deployed on. + * + * Deployment configuration properties.. + * + * @param deploymentConfiguration This property describes the virtual machines that the pool nodes will be + * deployed on. * - * @param deploymentConfiguration Deployment configuration properties. + * Deployment configuration properties. * @return the next definition stage. */ WithCreate withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration); @@ -443,13 +447,17 @@ interface WithDeploymentConfiguration { */ interface WithScaleSettings { /** - * Specifies the scaleSettings property: 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.. + * Specifies the scaleSettings property: Settings which configure the number of nodes in 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.. * - * @param scaleSettings 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 + * @param scaleSettings Settings which configure the number of nodes in 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. * @return the next definition stage. @@ -462,13 +470,18 @@ interface WithScaleSettings { */ interface WithInterNodeCommunication { /** - * Specifies the interNodeCommunication property: This imposes restrictions on which nodes can be assigned - * to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated - * in the pool. If not specified, this value defaults to 'Disabled'.. + * Specifies the interNodeCommunication property: Whether the pool permits direct communication between + * nodes. + * + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the + * chance of the requested number of nodes to be allocated in the pool. If not specified, this value + * defaults to 'Disabled'.. + * + * @param interNodeCommunication Whether the pool permits direct communication between nodes. * - * @param interNodeCommunication This imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. - * If not specified, this value defaults to 'Disabled'. + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the + * chance of the requested number of nodes to be allocated in the pool. If not specified, this value + * defaults to 'Disabled'. * @return the next definition stage. */ WithCreate withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication); @@ -479,9 +492,13 @@ interface WithInterNodeCommunication { */ interface WithNetworkConfiguration { /** - * Specifies the networkConfiguration property: The network configuration for a pool.. + * Specifies the networkConfiguration property: The network configuration for the pool. + * + * The network configuration for a pool.. + * + * @param networkConfiguration The network configuration for the pool. * - * @param networkConfiguration The network configuration for a pool. + * The network configuration for a pool. * @return the next definition stage. */ WithCreate withNetworkConfiguration(NetworkConfiguration networkConfiguration); @@ -492,11 +509,17 @@ interface WithNetworkConfiguration { */ interface WithTaskSlotsPerNode { /** - * Specifies the taskSlotsPerNode property: The default value is 1. The maximum value is the smaller of 4 - * times the number of cores of the vmSize of the pool or 256.. + * Specifies the taskSlotsPerNode property: The number of task slots that can be used to run concurrent + * tasks on a single compute node in the pool. * - * @param taskSlotsPerNode The default value is 1. The maximum value is the smaller of 4 times the number of - * cores of the vmSize of the pool or 256. + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of + * the pool or 256.. + * + * @param taskSlotsPerNode The number of task slots that can be used to run concurrent tasks on a single + * compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of + * the pool or 256. * @return the next definition stage. */ WithCreate withTaskSlotsPerNode(Integer taskSlotsPerNode); @@ -507,9 +530,13 @@ interface WithTaskSlotsPerNode { */ interface WithTaskSchedulingPolicy { /** - * Specifies the taskSchedulingPolicy property: If not specified, the default is spread.. + * Specifies the taskSchedulingPolicy property: How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread.. * - * @param taskSchedulingPolicy If not specified, the default is spread. + * @param taskSchedulingPolicy How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread. * @return the next definition stage. */ WithCreate withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy); @@ -533,11 +560,13 @@ interface WithUserAccounts { */ interface WithMetadata { /** - * Specifies the metadata property: The Batch service does not assign any meaning to metadata; it is solely - * for the use of user code.. + * Specifies the metadata property: A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code.. * - * @param metadata The Batch service does not assign any meaning to metadata; it is solely for the use of - * user code. + * @param metadata A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. * @return the next definition stage. */ WithCreate withMetadata(List metadata); @@ -548,76 +577,41 @@ interface WithMetadata { */ interface WithStartTask { /** - * Specifies the startTask property: In an PATCH (update) operation, this property can be set to an empty - * object to remove the start task from the pool.. + * Specifies the startTask property: A task specified to run on each compute node as it joins the pool. + * + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from + * the pool.. + * + * @param startTask A task specified to run on each compute node as it joins the pool. * - * @param startTask In an PATCH (update) operation, this property can be set to an empty object to remove - * the start task from the pool. + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from + * the pool. * @return the next definition stage. */ WithCreate withStartTask(StartTask startTask); } - /** - * The stage of the Pool definition allowing to specify certificates. - */ - interface WithCertificates { - /** - * Specifies the certificates property: For Windows compute nodes, the Batch service installs the - * certificates to the specified certificate store and location. For Linux compute nodes, the certificates - * are stored in a directory inside the task working directory and an environment variable - * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with - * visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure - * KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.. - * - * @param certificates For Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the certificates are stored in a - * directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - * supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and - * certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure - * KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * @return the next definition stage. - */ - WithCreate withCertificates(List certificates); - } - /** * The stage of the Pool definition allowing to specify applicationPackages. */ interface WithApplicationPackages { /** - * Specifies the applicationPackages property: Changes to application package references affect all new - * compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they - * are rebooted or reimaged. There is a maximum of 10 application package references on any given pool.. + * Specifies the applicationPackages property: The list of application packages to be installed on each + * compute node in the pool. * - * @param applicationPackages Changes to application package references affect all new compute nodes joining - * the pool, but do not affect compute nodes that are already in the pool until they are rebooted or - * reimaged. There is a maximum of 10 application package references on any given pool. - * @return the next definition stage. - */ - WithCreate withApplicationPackages(List applicationPackages); - } - - /** - * The stage of the Pool definition allowing to specify applicationLicenses. - */ - interface WithApplicationLicenses { - /** - * Specifies the applicationLicenses property: The list of application licenses must be a subset of - * available Batch service application licenses. If a license is requested which is not supported, pool - * creation will fail.. + * Changes to application package references affect all new compute nodes joining the pool, but do not + * affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum + * of 10 application package references on any given pool.. + * + * @param applicationPackages The list of application packages to be installed on each compute node in the + * pool. * - * @param applicationLicenses The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool creation will fail. + * Changes to application package references affect all new compute nodes joining the pool, but do not + * affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum + * of 10 application package references on any given pool. * @return the next definition stage. */ - WithCreate withApplicationLicenses(List applicationLicenses); + WithCreate withApplicationPackages(List applicationPackages); } /** @@ -625,25 +619,16 @@ interface WithApplicationLicenses { */ interface WithMountConfiguration { /** - * Specifies the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.. + * Specifies the mountConfiguration property: A list of file systems to mount on each node in the pool. * - * @param mountConfiguration This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. - * @return the next definition stage. - */ - WithCreate withMountConfiguration(List mountConfiguration); - } - - /** - * The stage of the Pool definition allowing to specify targetNodeCommunicationMode. - */ - interface WithTargetNodeCommunicationMode { - /** - * Specifies the targetNodeCommunicationMode property: If omitted, the default value is Default.. + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.. + * + * @param mountConfiguration A list of file systems to mount on each node in the pool. * - * @param targetNodeCommunicationMode If omitted, the default value is Default. + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. * @return the next definition stage. */ - WithCreate withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode); + WithCreate withMountConfiguration(List mountConfiguration); } /** @@ -651,33 +636,18 @@ interface WithTargetNodeCommunicationMode { */ interface WithUpgradePolicy { /** - * Specifies the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.. + * Specifies the upgradePolicy property: The upgrade policy for the pool. + * + * Describes an upgrade policy - automatic, manual, or rolling.. + * + * @param upgradePolicy The upgrade policy for the pool. * - * @param upgradePolicy Describes an upgrade policy - automatic, manual, or rolling. + * Describes an upgrade policy - automatic, manual, or rolling. * @return the next definition stage. */ WithCreate withUpgradePolicy(UpgradePolicy upgradePolicy); } - /** - * The stage of the Pool definition allowing to specify resourceTags. - */ - interface WithResourceTags { - /** - * Specifies the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. - * When specified, these tags are propagated to the backing Azure resources associated with the pool. This - * property can only be specified when the Batch account was created with the poolAllocationMode property - * set to 'UserSubscription'.. - * - * @param resourceTags The user-defined tags to be associated with the Azure Batch Pool. When specified, - * these tags are propagated to the backing Azure resources associated with the pool. This property can only - * be specified when the Batch account was created with the poolAllocationMode property set to - * 'UserSubscription'. - * @return the next definition stage. - */ - WithCreate withResourceTags(Map resourceTags); - } - /** * The stage of the Pool definition allowing to specify ifMatch. */ @@ -724,10 +694,8 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, Updat UpdateStages.WithVmSize, UpdateStages.WithDeploymentConfiguration, UpdateStages.WithScaleSettings, UpdateStages.WithInterNodeCommunication, UpdateStages.WithNetworkConfiguration, UpdateStages.WithTaskSlotsPerNode, UpdateStages.WithTaskSchedulingPolicy, UpdateStages.WithUserAccounts, - UpdateStages.WithMetadata, UpdateStages.WithStartTask, UpdateStages.WithCertificates, - UpdateStages.WithApplicationPackages, UpdateStages.WithApplicationLicenses, UpdateStages.WithMountConfiguration, - UpdateStages.WithTargetNodeCommunicationMode, UpdateStages.WithUpgradePolicy, UpdateStages.WithResourceTags, - UpdateStages.WithIfMatch { + UpdateStages.WithMetadata, UpdateStages.WithStartTask, UpdateStages.WithApplicationPackages, + UpdateStages.WithMountConfiguration, UpdateStages.WithUpgradePolicy, UpdateStages.WithIfMatch { /** * Executes the update request. * @@ -779,11 +747,15 @@ interface WithIdentity { */ interface WithDisplayName { /** - * Specifies the displayName property: The display name need not be unique and can contain any Unicode - * characters up to a maximum length of 1024.. + * Specifies the displayName property: The display name for the pool. * - * @param displayName The display name need not be unique and can contain any Unicode characters up to a - * maximum length of 1024. + * The display name need not be unique and can contain any Unicode characters up to a maximum length of + * 1024.. + * + * @param displayName The display name for the pool. + * + * The display name need not be unique and can contain any Unicode characters up to a maximum length of + * 1024. * @return the next definition stage. */ Update withDisplayName(String displayName); @@ -794,18 +766,18 @@ interface WithDisplayName { */ interface WithVmSize { /** - * Specifies the vmSize property: For information about available VM sizes, see Sizes for Virtual Machines - * (Linux) (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for - * Virtual Machines (Windows) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). Batch supports all - * Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and - * STANDARD_DSV2 series).. - * - * @param vmSize For information about available VM sizes, see Sizes for Virtual Machines (Linux) - * (https://azure.microsoft.com/documentation/articles/virtual-machines-linux-sizes/) or Sizes for Virtual - * Machines (Windows) (https://azure.microsoft.com/documentation/articles/virtual-machines-windows-sizes/). - * Batch supports all Azure VM sizes except STANDARD_A0 and those with premium storage (STANDARD_GS, - * STANDARD_DS, and STANDARD_DSV2 series). + * Specifies the vmSize property: The size of virtual machines in the pool. All VMs in a pool are the same + * size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes + * except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series).. + * + * @param vmSize The size of virtual machines in the pool. All VMs in a pool are the same size. + * + * For information about available VM sizes, see Sizes for Virtual Machines in Azure + * (https://learn.microsoft.com/azure/virtual-machines/sizes/overview). Batch supports all Azure VM sizes + * except STANDARD_A0 and those with premium storage (STANDARD_GS, STANDARD_DS, and STANDARD_DSV2 series). * @return the next definition stage. */ Update withVmSize(String vmSize); @@ -816,9 +788,15 @@ interface WithVmSize { */ interface WithDeploymentConfiguration { /** - * Specifies the deploymentConfiguration property: Deployment configuration properties.. + * Specifies the deploymentConfiguration property: This property describes the virtual machines that the + * pool nodes will be deployed on. * - * @param deploymentConfiguration Deployment configuration properties. + * Deployment configuration properties.. + * + * @param deploymentConfiguration This property describes the virtual machines that the pool nodes will be + * deployed on. + * + * Deployment configuration properties. * @return the next definition stage. */ Update withDeploymentConfiguration(DeploymentConfiguration deploymentConfiguration); @@ -829,13 +807,17 @@ interface WithDeploymentConfiguration { */ interface WithScaleSettings { /** - * Specifies the scaleSettings property: 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.. + * Specifies the scaleSettings property: Settings which configure the number of nodes in 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.. + * + * @param scaleSettings Settings which configure the number of nodes in the pool. * - * @param scaleSettings 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 + * 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. * @return the next definition stage. @@ -848,13 +830,18 @@ interface WithScaleSettings { */ interface WithInterNodeCommunication { /** - * Specifies the interNodeCommunication property: This imposes restrictions on which nodes can be assigned - * to the pool. Enabling this value can reduce the chance of the requested number of nodes to be allocated - * in the pool. If not specified, this value defaults to 'Disabled'.. + * Specifies the interNodeCommunication property: Whether the pool permits direct communication between + * nodes. * - * @param interNodeCommunication This imposes restrictions on which nodes can be assigned to the pool. - * Enabling this value can reduce the chance of the requested number of nodes to be allocated in the pool. - * If not specified, this value defaults to 'Disabled'. + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the + * chance of the requested number of nodes to be allocated in the pool. If not specified, this value + * defaults to 'Disabled'.. + * + * @param interNodeCommunication Whether the pool permits direct communication between nodes. + * + * This imposes restrictions on which nodes can be assigned to the pool. Enabling this value can reduce the + * chance of the requested number of nodes to be allocated in the pool. If not specified, this value + * defaults to 'Disabled'. * @return the next definition stage. */ Update withInterNodeCommunication(InterNodeCommunicationState interNodeCommunication); @@ -865,9 +852,13 @@ interface WithInterNodeCommunication { */ interface WithNetworkConfiguration { /** - * Specifies the networkConfiguration property: The network configuration for a pool.. + * Specifies the networkConfiguration property: The network configuration for the pool. + * + * The network configuration for a pool.. * - * @param networkConfiguration The network configuration for a pool. + * @param networkConfiguration The network configuration for the pool. + * + * The network configuration for a pool. * @return the next definition stage. */ Update withNetworkConfiguration(NetworkConfiguration networkConfiguration); @@ -878,11 +869,17 @@ interface WithNetworkConfiguration { */ interface WithTaskSlotsPerNode { /** - * Specifies the taskSlotsPerNode property: The default value is 1. The maximum value is the smaller of 4 - * times the number of cores of the vmSize of the pool or 256.. + * Specifies the taskSlotsPerNode property: The number of task slots that can be used to run concurrent + * tasks on a single compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of + * the pool or 256.. * - * @param taskSlotsPerNode The default value is 1. The maximum value is the smaller of 4 times the number of - * cores of the vmSize of the pool or 256. + * @param taskSlotsPerNode The number of task slots that can be used to run concurrent tasks on a single + * compute node in the pool. + * + * The default value is 1. The maximum value is the smaller of 4 times the number of cores of the vmSize of + * the pool or 256. * @return the next definition stage. */ Update withTaskSlotsPerNode(Integer taskSlotsPerNode); @@ -893,9 +890,13 @@ interface WithTaskSlotsPerNode { */ interface WithTaskSchedulingPolicy { /** - * Specifies the taskSchedulingPolicy property: If not specified, the default is spread.. + * Specifies the taskSchedulingPolicy property: How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread.. * - * @param taskSchedulingPolicy If not specified, the default is spread. + * @param taskSchedulingPolicy How tasks are distributed across compute nodes in a pool. + * + * If not specified, the default is spread. * @return the next definition stage. */ Update withTaskSchedulingPolicy(TaskSchedulingPolicy taskSchedulingPolicy); @@ -919,11 +920,13 @@ interface WithUserAccounts { */ interface WithMetadata { /** - * Specifies the metadata property: The Batch service does not assign any meaning to metadata; it is solely - * for the use of user code.. + * Specifies the metadata property: A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code.. * - * @param metadata The Batch service does not assign any meaning to metadata; it is solely for the use of - * user code. + * @param metadata A list of name-value pairs associated with the pool as metadata. + * + * The Batch service does not assign any meaning to metadata; it is solely for the use of user code. * @return the next definition stage. */ Update withMetadata(List metadata); @@ -934,76 +937,41 @@ interface WithMetadata { */ interface WithStartTask { /** - * Specifies the startTask property: In an PATCH (update) operation, this property can be set to an empty - * object to remove the start task from the pool.. + * Specifies the startTask property: A task specified to run on each compute node as it joins the pool. + * + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from + * the pool.. + * + * @param startTask A task specified to run on each compute node as it joins the pool. * - * @param startTask In an PATCH (update) operation, this property can be set to an empty object to remove - * the start task from the pool. + * In an PATCH (update) operation, this property can be set to an empty object to remove the start task from + * the pool. * @return the next definition stage. */ Update withStartTask(StartTask startTask); } - /** - * The stage of the Pool update allowing to specify certificates. - */ - interface WithCertificates { - /** - * Specifies the certificates property: For Windows compute nodes, the Batch service installs the - * certificates to the specified certificate store and location. For Linux compute nodes, the certificates - * are stored in a directory inside the task working directory and an environment variable - * AZ_BATCH_CERTIFICATES_DIR is supplied to the task to query for this location. For certificates with - * visibility of 'remoteUser', a 'certs' directory is created in the user's home directory (e.g., - * /home/{user-name}/certs) and certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure - * KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead.. - * - * @param certificates For Windows compute nodes, the Batch service installs the certificates to the - * specified certificate store and location. For Linux compute nodes, the certificates are stored in a - * directory inside the task working directory and an environment variable AZ_BATCH_CERTIFICATES_DIR is - * supplied to the task to query for this location. For certificates with visibility of 'remoteUser', a - * 'certs' directory is created in the user's home directory (e.g., /home/{user-name}/certs) and - * certificates are placed in that directory. - * - * Warning: This property is deprecated and will be removed after February, 2024. Please use the [Azure - * KeyVault Extension](https://learn.microsoft.com/azure/batch/batch-certificate-migration-guide) instead. - * @return the next definition stage. - */ - Update withCertificates(List certificates); - } - /** * The stage of the Pool update allowing to specify applicationPackages. */ interface WithApplicationPackages { /** - * Specifies the applicationPackages property: Changes to application package references affect all new - * compute nodes joining the pool, but do not affect compute nodes that are already in the pool until they - * are rebooted or reimaged. There is a maximum of 10 application package references on any given pool.. + * Specifies the applicationPackages property: The list of application packages to be installed on each + * compute node in the pool. * - * @param applicationPackages Changes to application package references affect all new compute nodes joining - * the pool, but do not affect compute nodes that are already in the pool until they are rebooted or - * reimaged. There is a maximum of 10 application package references on any given pool. - * @return the next definition stage. - */ - Update withApplicationPackages(List applicationPackages); - } - - /** - * The stage of the Pool update allowing to specify applicationLicenses. - */ - interface WithApplicationLicenses { - /** - * Specifies the applicationLicenses property: The list of application licenses must be a subset of - * available Batch service application licenses. If a license is requested which is not supported, pool - * creation will fail.. + * Changes to application package references affect all new compute nodes joining the pool, but do not + * affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum + * of 10 application package references on any given pool.. * - * @param applicationLicenses The list of application licenses must be a subset of available Batch service - * application licenses. If a license is requested which is not supported, pool creation will fail. + * @param applicationPackages The list of application packages to be installed on each compute node in the + * pool. + * + * Changes to application package references affect all new compute nodes joining the pool, but do not + * affect compute nodes that are already in the pool until they are rebooted or reimaged. There is a maximum + * of 10 application package references on any given pool. * @return the next definition stage. */ - Update withApplicationLicenses(List applicationLicenses); + Update withApplicationPackages(List applicationPackages); } /** @@ -1011,25 +979,16 @@ interface WithApplicationLicenses { */ interface WithMountConfiguration { /** - * Specifies the mountConfiguration property: This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.. + * Specifies the mountConfiguration property: A list of file systems to mount on each node in the pool. * - * @param mountConfiguration This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. - * @return the next definition stage. - */ - Update withMountConfiguration(List mountConfiguration); - } - - /** - * The stage of the Pool update allowing to specify targetNodeCommunicationMode. - */ - interface WithTargetNodeCommunicationMode { - /** - * Specifies the targetNodeCommunicationMode property: If omitted, the default value is Default.. + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse.. * - * @param targetNodeCommunicationMode If omitted, the default value is Default. + * @param mountConfiguration A list of file systems to mount on each node in the pool. + * + * This supports Azure Files, NFS, CIFS/SMB, and Blobfuse. * @return the next definition stage. */ - Update withTargetNodeCommunicationMode(NodeCommunicationMode targetNodeCommunicationMode); + Update withMountConfiguration(List mountConfiguration); } /** @@ -1037,33 +996,18 @@ interface WithTargetNodeCommunicationMode { */ interface WithUpgradePolicy { /** - * Specifies the upgradePolicy property: Describes an upgrade policy - automatic, manual, or rolling.. + * Specifies the upgradePolicy property: The upgrade policy for the pool. * - * @param upgradePolicy Describes an upgrade policy - automatic, manual, or rolling. + * Describes an upgrade policy - automatic, manual, or rolling.. + * + * @param upgradePolicy The upgrade policy for the pool. + * + * Describes an upgrade policy - automatic, manual, or rolling. * @return the next definition stage. */ Update withUpgradePolicy(UpgradePolicy upgradePolicy); } - /** - * The stage of the Pool update allowing to specify resourceTags. - */ - interface WithResourceTags { - /** - * Specifies the resourceTags property: The user-defined tags to be associated with the Azure Batch Pool. - * When specified, these tags are propagated to the backing Azure resources associated with the pool. This - * property can only be specified when the Batch account was created with the poolAllocationMode property - * set to 'UserSubscription'.. - * - * @param resourceTags The user-defined tags to be associated with the Azure Batch Pool. When specified, - * these tags are propagated to the backing Azure resources associated with the pool. This property can only - * be specified when the Batch account was created with the poolAllocationMode property set to - * 'UserSubscription'. - * @return the next definition stage. - */ - Update withResourceTags(Map resourceTags); - } - /** * The stage of the Pool update allowing to specify ifMatch. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolAllocationMode.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolAllocationMode.java index f59af90ccc2d..a866b93bc4eb 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolAllocationMode.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolAllocationMode.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,12 @@ */ public enum PoolAllocationMode { /** - * Enum value BatchService. + * Pools will be allocated in subscriptions owned by the Batch service. */ BATCH_SERVICE("BatchService"), /** - * Enum value UserSubscription. + * Pools will be allocated in a subscription owned by the user. */ USER_SUBSCRIPTION("UserSubscription"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolEndpointConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolEndpointConfiguration.java index e48ed8699507..5ab8a4e67700 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolEndpointConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolEndpointConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,6 +19,8 @@ @Fluent public final class PoolEndpointConfiguration implements JsonSerializable { /* + * A list of inbound NAT pools that can be used to address specific ports on an individual compute node externally. + * * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is * exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType * is NoPublicIPAddresses. @@ -32,9 +34,12 @@ public PoolEndpointConfiguration() { } /** - * Get the inboundNatPools property: The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status code 400. This cannot be specified if - * the IPAddressProvisioningType is NoPublicIPAddresses. + * Get the inboundNatPools property: A list of inbound NAT pools that can be used to address specific ports on an + * individual compute node externally. + * + * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is + * exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType + * is NoPublicIPAddresses. * * @return the inboundNatPools value. */ @@ -43,9 +48,12 @@ public List inboundNatPools() { } /** - * Set the inboundNatPools property: The maximum number of inbound NAT pools per Batch pool is 5. If the maximum - * number of inbound NAT pools is exceeded the request fails with HTTP status code 400. This cannot be specified if - * the IPAddressProvisioningType is NoPublicIPAddresses. + * Set the inboundNatPools property: A list of inbound NAT pools that can be used to address specific ports on an + * individual compute node externally. + * + * The maximum number of inbound NAT pools per Batch pool is 5. If the maximum number of inbound NAT pools is + * exceeded the request fails with HTTP status code 400. This cannot be specified if the IPAddressProvisioningType + * is NoPublicIPAddresses. * * @param inboundNatPools the inboundNatPools value to set. * @return the PoolEndpointConfiguration object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolIdentityType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolIdentityType.java index ee693641a0da..2b743be19818 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolIdentityType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,12 @@ */ public enum PoolIdentityType { /** - * Enum value UserAssigned. + * Batch pool has user assigned identities with it. */ USER_ASSIGNED("UserAssigned"), /** - * Enum value None. + * Batch pool has no identity associated with it. Setting `None` in update pool will remove existing identities. */ NONE("None"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolProvisioningState.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolProvisioningState.java index 2315af2468ce..6bcb5602f78f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolProvisioningState.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,12 @@ */ public enum PoolProvisioningState { /** - * Enum value Succeeded. + * The pool is available to run tasks subject to the availability of compute nodes. */ SUCCEEDED("Succeeded"), /** - * Enum value Deleting. + * The user has requested that the pool be deleted, but the delete operation has not yet completed. */ DELETING("Deleting"); 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 e891d02f75bf..46921c80945e 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -13,52 +13,46 @@ */ public interface Pools { /** - * Lists all of the pools in the specified account. + * Gets information about the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param poolName The pool name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified pool. */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); + Response getWithResponse(String resourceGroupName, String accountName, String poolName, Context context); /** - * Lists all of the pools in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". - * Only top level properties under properties/ are valid for selection. - * @param filter OData filter expression. Valid properties for filtering are: + * Gets information about the specified pool. * - * name - * properties/allocationState - * properties/allocationStateTransitionTime - * properties/creationTime - * properties/provisioningState - * properties/provisioningStateTransitionTime - * properties/lastModified - * properties/vmSize - * properties/interNodeCommunication - * properties/scaleSettings/autoScale - * properties/scaleSettings/fixedScale. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param poolName The pool name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified pool. */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, - String select, String filter, Context context); + Pool get(String resourceGroupName, String accountName, String poolName); /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -69,8 +63,11 @@ PagedIterable listByBatchAccount(String resourceGroupName, String accountN /** * Deletes the specified pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -80,37 +77,61 @@ PagedIterable listByBatchAccount(String resourceGroupName, String accountN void delete(String resourceGroupName, String accountName, String poolName, Context context); /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 values returned by the List operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String accountName, String poolName, Context context); + PagedIterable listByBatchAccount(String resourceGroupName, String accountName); /** - * Gets information about the specified pool. + * Lists all of the pools in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param poolName The pool name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @param select Comma separated list of properties that should be returned. e.g. "properties/provisioningState". + * Only top level properties under properties/ are valid for selection. + * @param filter OData filter expression. Valid properties for filtering are: + * + * name + * properties/allocationState + * properties/allocationStateTransitionTime + * properties/creationTime + * properties/provisioningState + * properties/provisioningStateTransitionTime + * properties/lastModified + * properties/vmSize + * properties/interNodeCommunication + * properties/scaleSettings/autoScale + * properties/scaleSettings/fixedScale. + * @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 specified pool. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - Pool get(String resourceGroupName, String accountName, String poolName); + PagedIterable listByBatchAccount(String resourceGroupName, String accountName, Integer maxresults, + String select, String filter, Context context); /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -124,8 +145,11 @@ Response disableAutoScaleWithResponse(String resourceGroupName, String acc /** * Disables automatic scaling for a pool. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -143,8 +167,11 @@ Response disableAutoScaleWithResponse(String resourceGroupName, String acc * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -164,8 +191,11 @@ Response stopResizeWithResponse(String resourceGroupName, String accountNa * first to stopping and then to steady. A resize operation need not be an explicit resize pool request; this API * can also be used to halt the initial sizing of the pool when it is created. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param poolName The pool name. This must be unique within the account. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateHeaders.java index 429da0293633..e2e7fc605a31 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateHeaders.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateHeaders.java @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; /** * The PoolsCreateHeaders model. */ -@Fluent +@Immutable public final class PoolsCreateHeaders { /* - * The Etag property. + * The ETag property. */ - private String etag; + private final String etag; // HttpHeaders containing the raw property values. /** @@ -29,7 +29,7 @@ public PoolsCreateHeaders(HttpHeaders rawHeaders) { } /** - * Get the etag property: The Etag property. + * Get the etag property: The ETag property. * * @return the etag value. */ @@ -37,17 +37,6 @@ public String etag() { return this.etag; } - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the PoolsCreateHeaders object itself. - */ - public PoolsCreateHeaders withEtag(String etag) { - this.etag = etag; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateResponse.java index a33e33d1523d..db696b2289b2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateResponse.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleHeaders.java index d50116263801..4dafcefe3bb2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleHeaders.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleHeaders.java @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; /** * The PoolsDisableAutoScaleHeaders model. */ -@Fluent +@Immutable public final class PoolsDisableAutoScaleHeaders { /* - * The Etag property. + * The ETag property. */ - private String etag; + private final String etag; // HttpHeaders containing the raw property values. /** @@ -29,7 +29,7 @@ public PoolsDisableAutoScaleHeaders(HttpHeaders rawHeaders) { } /** - * Get the etag property: The Etag property. + * Get the etag property: The ETag property. * * @return the etag value. */ @@ -37,17 +37,6 @@ public String etag() { return this.etag; } - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the PoolsDisableAutoScaleHeaders object itself. - */ - public PoolsDisableAutoScaleHeaders withEtag(String etag) { - this.etag = etag; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleResponse.java index fe92a8fb4231..912547ca7cd5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleResponse.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetHeaders.java index 82d5a2a94446..96a9f7671967 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetHeaders.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetHeaders.java @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; /** * The PoolsGetHeaders model. */ -@Fluent +@Immutable public final class PoolsGetHeaders { /* - * The Etag property. + * The ETag property. */ - private String etag; + private final String etag; // HttpHeaders containing the raw property values. /** @@ -29,7 +29,7 @@ public PoolsGetHeaders(HttpHeaders rawHeaders) { } /** - * Get the etag property: The Etag property. + * Get the etag property: The ETag property. * * @return the etag value. */ @@ -37,17 +37,6 @@ public String etag() { return this.etag; } - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the PoolsGetHeaders object itself. - */ - public PoolsGetHeaders withEtag(String etag) { - this.etag = etag; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetResponse.java index 4dfd0c832b35..cbe34a65d2b1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetResponse.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsGetResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeHeaders.java index 8db08a04c5a7..027d636ca201 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeHeaders.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeHeaders.java @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; /** * The PoolsStopResizeHeaders model. */ -@Fluent +@Immutable public final class PoolsStopResizeHeaders { /* - * The Etag property. + * The ETag property. */ - private String etag; + private final String etag; // HttpHeaders containing the raw property values. /** @@ -29,7 +29,7 @@ public PoolsStopResizeHeaders(HttpHeaders rawHeaders) { } /** - * Get the etag property: The Etag property. + * Get the etag property: The ETag property. * * @return the etag value. */ @@ -37,17 +37,6 @@ public String etag() { return this.etag; } - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the PoolsStopResizeHeaders object itself. - */ - public PoolsStopResizeHeaders withEtag(String etag) { - this.etag = etag; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeResponse.java index 7d3d20af1775..78bafabaf0d9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeResponse.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateHeaders.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateHeaders.java index 9e559adf9601..6f0890d57443 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateHeaders.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateHeaders.java @@ -1,22 +1,22 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; /** * The PoolsUpdateHeaders model. */ -@Fluent +@Immutable public final class PoolsUpdateHeaders { /* - * The Etag property. + * The ETag property. */ - private String etag; + private final String etag; // HttpHeaders containing the raw property values. /** @@ -29,7 +29,7 @@ public PoolsUpdateHeaders(HttpHeaders rawHeaders) { } /** - * Get the etag property: The Etag property. + * Get the etag property: The ETag property. * * @return the etag value. */ @@ -37,17 +37,6 @@ public String etag() { return this.etag; } - /** - * Set the etag property: The Etag property. - * - * @param etag the etag value to set. - * @return the PoolsUpdateHeaders object itself. - */ - public PoolsUpdateHeaders withEtag(String etag) { - this.etag = etag; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateResponse.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateResponse.java index 27771bfbf81a..46929fb91e5b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateResponse.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpoint.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpoint.java index 3fa2ed4c49e7..6184d26c36a8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpoint.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpoint.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -26,7 +26,7 @@ public final class PrivateEndpoint implements JsonSerializable /** * Creates an instance of PrivateEndpoint class. */ - public PrivateEndpoint() { + private PrivateEndpoint() { } /** diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java index a42d08f449a8..8161de83ca2a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; import java.util.List; import java.util.Map; @@ -47,6 +48,13 @@ public interface PrivateEndpointConnection { */ Map tags(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: The provisioning state of the private endpoint connection. * @@ -55,14 +63,18 @@ public interface PrivateEndpointConnection { PrivateEndpointConnectionProvisioningState provisioningState(); /** - * Gets the privateEndpoint property: The private endpoint of the private endpoint connection. + * Gets the privateEndpoint property: The ARM resource identifier of the private endpoint. + * + * The private endpoint of the private endpoint connection. * * @return the privateEndpoint value. */ PrivateEndpoint privateEndpoint(); /** - * Gets the groupIds property: The value has one and only one group id. + * Gets the groupIds property: The group id of the private endpoint connection. + * + * The value has one and only one group id. * * @return the groupIds value. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnectionProvisioningState.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnectionProvisioningState.java index 034cf9c497c5..d48023dac70a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnectionProvisioningState.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnectionProvisioningState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,32 +9,33 @@ */ public enum PrivateEndpointConnectionProvisioningState { /** - * Enum value Creating. + * The connection is creating. */ CREATING("Creating"), /** - * Enum value Updating. + * The user has requested that the connection status be updated, but the update operation has not yet completed. You + * may not reference the connection when connecting the Batch account. */ UPDATING("Updating"), /** - * Enum value Deleting. + * The connection is deleting. */ DELETING("Deleting"), /** - * Enum value Succeeded. + * The connection status is final and is ready for use if Status is Approved. */ SUCCEEDED("Succeeded"), /** - * Enum value Failed. + * The user requested that the connection be updated and it failed. You may retry the update operation. */ FAILED("Failed"), /** - * Enum value Cancelled. + * The user has cancelled the connection creation. */ CANCELLED("Cancelled"); 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 cc630371b0dd..56597203d198 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -13,38 +13,14 @@ * Resource collection API of PrivateEndpointConnections. */ public interface PrivateEndpointConnections { - /** - * Lists all of the private endpoint connections in the specified 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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); - - /** - * Lists all of the private endpoint connections in the specified account. - * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @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 values returned by the List operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, Context context); - /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param context The context to associate with this operation. @@ -59,8 +35,11 @@ Response getWithResponse(String resourceGroupName, St /** * Gets information about the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -73,8 +52,11 @@ Response getWithResponse(String resourceGroupName, St /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -90,8 +72,11 @@ PrivateEndpointConnection update(String resourceGroupName, String accountName, S /** * Updates the properties of an existing private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param parameters PrivateEndpointConnection properties that should be updated. Properties that are supplied will @@ -110,8 +95,11 @@ PrivateEndpointConnection update(String resourceGroupName, String accountName, S /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -123,8 +111,11 @@ PrivateEndpointConnection update(String resourceGroupName, String accountName, S /** * Deletes the specified private endpoint connection. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @param privateEndpointConnectionName The private endpoint connection name. This must be unique within the * account. * @param context The context to associate with this operation. @@ -133,4 +124,37 @@ PrivateEndpointConnection update(String resourceGroupName, String accountName, S * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context); + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.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 as paginated response with {@link PagedIterable}. + */ + PagedIterable listByBatchAccount(String resourceGroupName, String accountName); + + /** + * Lists all of the private endpoint connections in the specified account. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @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 values returned by the List operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByBatchAccount(String resourceGroupName, String accountName, + Integer maxresults, Context context); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java index 3b67466da617..579db30d8774 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner; import java.util.List; import java.util.Map; @@ -48,7 +49,16 @@ public interface PrivateLinkResource { Map tags(); /** - * Gets the groupId property: The group id is used to establish the private link connection. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the groupId property: The group id of the private link resource. + * + * The group id is used to establish the private link connection. * * @return the groupId value. */ @@ -65,6 +75,8 @@ public interface PrivateLinkResource { /** * Gets the requiredZoneNames property: The list of required zone names for the private DNS resource name. * + * The list of required zone names for the private DNS resource name. + * * @return the requiredZoneNames value. */ List requiredZoneNames(); 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 fc4aaa9627b0..1b34d054a68b 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -13,57 +13,69 @@ */ public interface PrivateLinkResources { /** - * Lists all of the private link resources in the specified account. + * Gets information about the specified private link resource. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified private link resource along with {@link Response}. */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName); + Response getWithResponse(String resourceGroupName, String accountName, + String privateLinkResourceName, Context context); /** - * Lists all of the private link resources in the specified account. + * Gets information about the specified private link resource. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param maxresults The maximum number of items to return in the response. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param privateLinkResourceName The private link resource name. This must be unique within the 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 values returned by the List operation as paginated response with {@link PagedIterable}. + * @return information about the specified private link resource. */ - PagedIterable listByBatchAccount(String resourceGroupName, String accountName, - Integer maxresults, Context context); + PrivateLinkResource get(String resourceGroupName, String accountName, String privateLinkResourceName); /** - * Gets information about the specified private link resource. + * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the account. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.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 along with {@link Response}. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String accountName, - String privateLinkResourceName, Context context); + PagedIterable listByBatchAccount(String resourceGroupName, String accountName); /** - * Gets information about the specified private link resource. + * Lists all of the private link resources in the specified account. * - * @param resourceGroupName The name of the resource group that contains the Batch account. - * @param accountName The name of the Batch account. - * @param privateLinkResourceName The private link resource name. This must be unique within the account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName A name for the Batch account which must be unique within the region. Batch account names must + * be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as + * part of the DNS name that is used to access the Batch service in the region in which the account is created. For + * example: http://accountname.region.batch.azure.com/. + * @param maxresults The maximum number of items to return in the response. + * @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 specified private link resource. + * @return values returned by the List operation as paginated response with {@link PagedIterable}. */ - PrivateLinkResource get(String resourceGroupName, String accountName, String privateLinkResourceName); + PagedIterable listByBatchAccount(String resourceGroupName, String accountName, + Integer maxresults, Context context); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionState.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionState.java index b81d5291f423..a57f1f7f41e9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionState.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionState.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionStatus.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionStatus.java index 6b53a564e685..b1e7c556fab1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionStatus.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionStatus.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,22 +9,22 @@ */ public enum PrivateLinkServiceConnectionStatus { /** - * Enum value Approved. + * The private endpoint connection is approved and can be used to access Batch account. */ APPROVED("Approved"), /** - * Enum value Pending. + * The private endpoint connection is pending and cannot be used to access Batch account. */ PENDING("Pending"), /** - * Enum value Rejected. + * The private endpoint connection is rejected and cannot be used to access Batch account. */ REJECTED("Rejected"), /** - * Enum value Disconnected. + * The private endpoint connection is disconnected and cannot be used to access Batch account. */ DISCONNECTED("Disconnected"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ProvisioningIssue.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ProvisioningIssue.java index a1bed76f9890..7a5a97801db3 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ProvisioningIssue.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ProvisioningIssue.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -22,16 +22,14 @@ public final class ProvisioningIssue implements JsonSerializable { + /* + * Specifies whether Metadata Security Protocol feature should be enabled on the virtual machine or virtual machine + * scale set. Default is False. + */ + private Boolean enabled; + + /* + * Settings for the IMDS endpoint. + */ + private HostEndpointSettings imds; + + /* + * Settings for the WireServer endpoint. + */ + private HostEndpointSettings wireServer; + + /** + * Creates an instance of ProxyAgentSettings class. + */ + public ProxyAgentSettings() { + } + + /** + * Get the enabled property: Specifies whether Metadata Security Protocol feature should be enabled on the virtual + * machine or virtual machine scale set. Default is False. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Specifies whether Metadata Security Protocol feature should be enabled on the virtual + * machine or virtual machine scale set. Default is False. + * + * @param enabled the enabled value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the imds property: Settings for the IMDS endpoint. + * + * @return the imds value. + */ + public HostEndpointSettings imds() { + return this.imds; + } + + /** + * Set the imds property: Settings for the IMDS endpoint. + * + * @param imds the imds value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withImds(HostEndpointSettings imds) { + this.imds = imds; + return this; + } + + /** + * Get the wireServer property: Settings for the WireServer endpoint. + * + * @return the wireServer value. + */ + public HostEndpointSettings wireServer() { + return this.wireServer; + } + + /** + * Set the wireServer property: Settings for the WireServer endpoint. + * + * @param wireServer the wireServer value to set. + * @return the ProxyAgentSettings object itself. + */ + public ProxyAgentSettings withWireServer(HostEndpointSettings wireServer) { + this.wireServer = wireServer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (imds() != null) { + imds().validate(); + } + if (wireServer() != null) { + wireServer().validate(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeBooleanField("enabled", this.enabled); + jsonWriter.writeJsonField("imds", this.imds); + jsonWriter.writeJsonField("wireServer", this.wireServer); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProxyAgentSettings from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProxyAgentSettings if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ProxyAgentSettings. + */ + public static ProxyAgentSettings fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProxyAgentSettings deserializedProxyAgentSettings = new ProxyAgentSettings(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("enabled".equals(fieldName)) { + deserializedProxyAgentSettings.enabled = reader.getNullable(JsonReader::getBoolean); + } else if ("imds".equals(fieldName)) { + deserializedProxyAgentSettings.imds = HostEndpointSettings.fromJson(reader); + } else if ("wireServer".equals(fieldName)) { + deserializedProxyAgentSettings.wireServer = HostEndpointSettings.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProxyAgentSettings; + }); + } +} 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 d8fdc0790af7..b9779ae5f735 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -18,11 +18,15 @@ @Fluent public final class PublicIpAddressConfiguration implements JsonSerializable { /* + * The provisioning type for Public IP Addresses for the Batch Pool. + * * The default value is BatchManaged */ private IpAddressProvisioningType provision; /* + * 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 * 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: @@ -30,6 +34,19 @@ public final class PublicIpAddressConfiguration implements JsonSerializable ipAddressIds; + /* + * The IP families used to specify IP versions available to the pool. + * + * IP families are used to determine single-stack or dual-stack pools. For single-stack, the expected value is IPv4. + * For dual-stack, the expected values are IPv4 and IPv6. + */ + private List ipFamilies; + + /* + * IP Tags that will applied to new Public IPs that Batch creates. + */ + private List ipTags; + /** * Creates an instance of PublicIpAddressConfiguration class. */ @@ -37,7 +54,9 @@ public PublicIpAddressConfiguration() { } /** - * Get the provision property: The default value is BatchManaged. + * Get the provision property: The provisioning type for Public IP Addresses for the Batch Pool. + * + * The default value is BatchManaged. * * @return the provision value. */ @@ -46,7 +65,9 @@ public IpAddressProvisioningType provision() { } /** - * Set the provision property: The default value is BatchManaged. + * Set the provision property: The provisioning type for Public IP Addresses for the Batch Pool. + * + * The default value is BatchManaged. * * @param provision the provision value to set. * @return the PublicIpAddressConfiguration object itself. @@ -57,9 +78,12 @@ public PublicIpAddressConfiguration withProvision(IpAddressProvisioningType prov } /** - * Get the ipAddressIds property: The number of IPs specified here limits the 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: + * 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 + * 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. @@ -69,9 +93,12 @@ public List ipAddressIds() { } /** - * Set the ipAddressIds property: The number of IPs specified here limits the 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: + * 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 + * 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. @@ -82,12 +109,61 @@ public PublicIpAddressConfiguration withIpAddressIds(List ipAddressIds) return this; } + /** + * Get the ipFamilies property: The IP families used to specify IP versions available to the pool. + * + * IP families are used to determine single-stack or dual-stack pools. For single-stack, the expected value is IPv4. + * For dual-stack, the expected values are IPv4 and IPv6. + * + * @return the ipFamilies value. + */ + public List ipFamilies() { + return this.ipFamilies; + } + + /** + * Set the ipFamilies property: The IP families used to specify IP versions available to the pool. + * + * IP families are used to determine single-stack or dual-stack pools. For single-stack, the expected value is IPv4. + * For dual-stack, the expected values are IPv4 and IPv6. + * + * @param ipFamilies the ipFamilies value to set. + * @return the PublicIpAddressConfiguration object itself. + */ + public PublicIpAddressConfiguration withIpFamilies(List ipFamilies) { + this.ipFamilies = ipFamilies; + return this; + } + + /** + * Get the ipTags property: IP Tags that will applied to new Public IPs that Batch creates. + * + * @return the ipTags value. + */ + public List ipTags() { + return this.ipTags; + } + + /** + * Set the ipTags property: IP Tags that will applied to new Public IPs that Batch creates. + * + * @param ipTags the ipTags value to set. + * @return the PublicIpAddressConfiguration object itself. + */ + public PublicIpAddressConfiguration withIpTags(List ipTags) { + this.ipTags = ipTags; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (ipTags() != null) { + ipTags().forEach(e -> e.validate()); + } } /** @@ -98,6 +174,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("provision", this.provision == null ? null : this.provision.toString()); jsonWriter.writeArrayField("ipAddressIds", this.ipAddressIds, (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("ipFamilies", this.ipFamilies, + (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeArrayField("ipTags", this.ipTags, (writer, element) -> writer.writeJson(element)); return jsonWriter.writeEndObject(); } @@ -122,6 +201,12 @@ public static PublicIpAddressConfiguration fromJson(JsonReader jsonReader) throw } else if ("ipAddressIds".equals(fieldName)) { List ipAddressIds = reader.readArray(reader1 -> reader1.getString()); deserializedPublicIpAddressConfiguration.ipAddressIds = ipAddressIds; + } else if ("ipFamilies".equals(fieldName)) { + List ipFamilies = reader.readArray(reader1 -> IPFamily.fromString(reader1.getString())); + deserializedPublicIpAddressConfiguration.ipFamilies = ipFamilies; + } else if ("ipTags".equals(fieldName)) { + List ipTags = reader.readArray(reader1 -> IPTag.fromJson(reader1)); + deserializedPublicIpAddressConfiguration.ipTags = ipTags; } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicNetworkAccessType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicNetworkAccessType.java index 3f670beef380..06c1f668904e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicNetworkAccessType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/PublicNetworkAccessType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,17 +9,18 @@ */ public enum PublicNetworkAccessType { /** - * Enum value Enabled. + * Enables connectivity to Azure Batch through public DNS. */ ENABLED("Enabled"), /** - * Enum value Disabled. + * Disables public connectivity and enables private connectivity to Azure Batch Service through private endpoint + * resource. */ DISABLED("Disabled"), /** - * Enum value SecuredByPerimeter. + * Secures connectivity to Azure Batch through NSP configuration. */ SECURED_BY_PERIMETER("SecuredByPerimeter"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeError.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeError.java index f81c98f2f315..307cc47c9a5b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeError.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResizeError.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -16,7 +16,7 @@ /** * An error that occurred when resizing a pool. */ -@Fluent +@Immutable public final class ResizeError implements JsonSerializable { /* * An identifier for the error. Codes are invariant and are intended to be consumed programmatically. @@ -36,7 +36,7 @@ public final class ResizeError implements JsonSerializable { /** * Creates an instance of ResizeError class. */ - public ResizeError() { + private ResizeError() { } /** @@ -49,18 +49,6 @@ public String code() { return this.code; } - /** - * Set the code property: An identifier for the error. Codes are invariant and are intended to be consumed - * programmatically. - * - * @param code the code value to set. - * @return the ResizeError object itself. - */ - public ResizeError withCode(String code) { - this.code = code; - return this; - } - /** * Get the message property: A message describing the error, intended to be suitable for display in a user * interface. @@ -71,18 +59,6 @@ public String message() { return this.message; } - /** - * Set the message property: A message describing the error, intended to be suitable for display in a user - * interface. - * - * @param message the message value to set. - * @return the ResizeError object itself. - */ - public ResizeError withMessage(String message) { - this.message = message; - return this; - } - /** * Get the details property: Additional details about the error. * @@ -92,17 +68,6 @@ public List details() { return this.details; } - /** - * Set the details property: Additional details about the error. - * - * @param details the details value to set. - * @return the ResizeError object itself. - */ - public ResizeError withDetails(List details) { - this.details = details; - return this; - } - /** * Validates the instance. * 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 3ca9143e2a08..8e44842611ac 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 @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; @@ -22,7 +22,7 @@ * Describes either the current operation (if the pool AllocationState is Resizing) or the previously completed * operation (if the AllocationState is Steady). */ -@Fluent +@Immutable public final class ResizeOperationStatus implements JsonSerializable { /* * The desired number of dedicated compute nodes in the pool. @@ -35,6 +35,8 @@ public final class ResizeOperationStatus implements JsonSerializable errors() { return this.errors; } - /** - * Set the errors property: This property is set only if an error occurred during the last pool resize, and only - * when the pool allocationState is Steady. - * - * @param errors the errors value to set. - * @return the ResizeOperationStatus object itself. - */ - public ResizeOperationStatus withErrors(List errors) { - this.errors = errors; - return this; - } - /** * Validates the instance. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceAssociation.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceAssociation.java index 157d64a469b2..d952772f6555 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceAssociation.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceAssociation.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Information about resource association. */ -@Fluent +@Immutable public final class ResourceAssociation implements JsonSerializable { /* * Name of the resource association @@ -22,14 +22,14 @@ public final class ResourceAssociation implements JsonSerializable { /** - * Static value Enforced for ResourceAssociationAccessMode. + * Enforced access mode - traffic to the resource that failed access checks is blocked. */ public static final ResourceAssociationAccessMode ENFORCED = fromString("Enforced"); /** - * Static value Learning for ResourceAssociationAccessMode. + * Learning access mode - traffic to the resource is enabled for analysis but not blocked. */ public static final ResourceAssociationAccessMode LEARNING = fromString("Learning"); /** - * Static value Audit for ResourceAssociationAccessMode. + * Audit access mode - traffic to the resource that fails access checks is logged but not blocked. */ public static final ResourceAssociationAccessMode AUDIT = fromString("Audit"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceFile.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceFile.java index dab4bbbe0aa4..f2899ff2b6d9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceFile.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceFile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,12 +17,16 @@ @Fluent public final class ResourceFile implements JsonSerializable { /* + * The storage container name in the auto storage account. + * * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them * must be specified. */ private String autoStorageContainerName; /* + * The URL of the blob container within Azure Blob Storage. + * * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them * must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a * URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions @@ -32,6 +36,8 @@ public final class ResourceFile implements JsonSerializable { private String storageContainerUrl; /* + * The URL of the file to download. + * * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them * must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are * three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read @@ -41,6 +47,9 @@ public final class ResourceFile implements JsonSerializable { private String httpUrl; /* + * The blob prefix to use when downloading blobs from an Azure Storage container. Only the blobs whose names begin + * with the specified prefix will be downloaded. + * * The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a * partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be * downloaded. @@ -48,6 +57,8 @@ public final class ResourceFile implements JsonSerializable { private String blobPrefix; /* + * The location on the compute node to which to download the file, relative to the task's working directory. + * * If the httpUrl property is specified, the filePath is required and describes the path which the file will be * downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property * is specified, filePath is optional and is the directory to download the files to. In the case where filePath is @@ -58,6 +69,8 @@ public final class ResourceFile implements JsonSerializable { private String filePath; /* + * The file permission mode attribute in octal format. + * * This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is * specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a * Linux node, then a default value of 0770 is applied to the file. @@ -65,6 +78,9 @@ public final class ResourceFile implements JsonSerializable { private String fileMode; /* + * The reference to the user assigned identity to use to access Azure Blob Storage specified by storageContainerUrl + * or httpUrl + * * The reference to a user assigned identity associated with the Batch pool which a compute node will use. */ private ComputeNodeIdentityReference identityReference; @@ -76,8 +92,10 @@ public ResourceFile() { } /** - * Get the autoStorageContainerName property: The autoStorageContainerName, storageContainerUrl and httpUrl - * properties are mutually exclusive and one of them must be specified. + * Get the autoStorageContainerName property: The storage container name in the auto storage account. + * + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them + * must be specified. * * @return the autoStorageContainerName value. */ @@ -86,8 +104,10 @@ public String autoStorageContainerName() { } /** - * Set the autoStorageContainerName property: The autoStorageContainerName, storageContainerUrl and httpUrl - * properties are mutually exclusive and one of them must be specified. + * Set the autoStorageContainerName property: The storage container name in the auto storage account. + * + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them + * must be specified. * * @param autoStorageContainerName the autoStorageContainerName value to set. * @return the ResourceFile object itself. @@ -98,11 +118,13 @@ public ResourceFile withAutoStorageContainerName(String autoStorageContainerName } /** - * Get the storageContainerUrl property: The autoStorageContainerName, storageContainerUrl and httpUrl properties - * are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute - * nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature - * (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, - * or set the ACL for the container to allow public access. + * Get the storageContainerUrl property: The URL of the blob container within Azure Blob Storage. + * + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them + * must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a + * URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions + * on the container, use a managed identity with read and list permissions, or set the ACL for the container to + * allow public access. * * @return the storageContainerUrl value. */ @@ -111,11 +133,13 @@ public String storageContainerUrl() { } /** - * Set the storageContainerUrl property: The autoStorageContainerName, storageContainerUrl and httpUrl properties - * are mutually exclusive and one of them must be specified. This URL must be readable and listable from compute - * nodes. There are three ways to get such a URL for a container in Azure storage: include a Shared Access Signature - * (SAS) granting read and list permissions on the container, use a managed identity with read and list permissions, - * or set the ACL for the container to allow public access. + * Set the storageContainerUrl property: The URL of the blob container within Azure Blob Storage. + * + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them + * must be specified. This URL must be readable and listable from compute nodes. There are three ways to get such a + * URL for a container in Azure storage: include a Shared Access Signature (SAS) granting read and list permissions + * on the container, use a managed identity with read and list permissions, or set the ACL for the container to + * allow public access. * * @param storageContainerUrl the storageContainerUrl value to set. * @return the ResourceFile object itself. @@ -126,11 +150,13 @@ public ResourceFile withStorageContainerUrl(String storageContainerUrl) { } /** - * Get the httpUrl property: The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually - * exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from - * compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access - * Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the - * ACL for the blob or its container to allow public access. + * Get the httpUrl property: The URL of the file to download. + * + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them + * must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are + * three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read + * permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its + * container to allow public access. * * @return the httpUrl value. */ @@ -139,11 +165,13 @@ public String httpUrl() { } /** - * Set the httpUrl property: The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually - * exclusive and one of them must be specified. If the URL points to Azure Blob Storage, it must be readable from - * compute nodes. There are three ways to get such a URL for a blob in Azure storage: include a Shared Access - * Signature (SAS) granting read permissions on the blob, use a managed identity with read permission, or set the - * ACL for the blob or its container to allow public access. + * Set the httpUrl property: The URL of the file to download. + * + * The autoStorageContainerName, storageContainerUrl and httpUrl properties are mutually exclusive and one of them + * must be specified. If the URL points to Azure Blob Storage, it must be readable from compute nodes. There are + * three ways to get such a URL for a blob in Azure storage: include a Shared Access Signature (SAS) granting read + * permissions on the blob, use a managed identity with read permission, or set the ACL for the blob or its + * container to allow public access. * * @param httpUrl the httpUrl value to set. * @return the ResourceFile object itself. @@ -154,9 +182,12 @@ public ResourceFile withHttpUrl(String httpUrl) { } /** - * Get the blobPrefix property: The property is valid only when autoStorageContainerName or storageContainerUrl is - * used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the - * container will be downloaded. + * Get the blobPrefix property: The blob prefix to use when downloading blobs from an Azure Storage container. Only + * the blobs whose names begin with the specified prefix will be downloaded. + * + * The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a + * partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be + * downloaded. * * @return the blobPrefix value. */ @@ -165,9 +196,12 @@ public String blobPrefix() { } /** - * Set the blobPrefix property: The property is valid only when autoStorageContainerName or storageContainerUrl is - * used. This prefix can be a partial filename or a subdirectory. If a prefix is not specified, all the files in the - * container will be downloaded. + * Set the blobPrefix property: The blob prefix to use when downloading blobs from an Azure Storage container. Only + * the blobs whose names begin with the specified prefix will be downloaded. + * + * The property is valid only when autoStorageContainerName or storageContainerUrl is used. This prefix can be a + * partial filename or a subdirectory. If a prefix is not specified, all the files in the container will be + * downloaded. * * @param blobPrefix the blobPrefix value to set. * @return the ResourceFile object itself. @@ -178,12 +212,15 @@ public ResourceFile withBlobPrefix(String blobPrefix) { } /** - * Get the filePath property: If the httpUrl property is specified, the filePath is required and describes the path - * which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or - * storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In - * the case where filePath is used as a directory, any directory structure already associated with the input data - * will be retained in full and appended to the specified filePath directory. The specified relative path cannot - * break out of the task's working directory (for example by using '..'). + * Get the filePath property: The location on the compute node to which to download the file, relative to the task's + * working directory. + * + * If the httpUrl property is specified, the filePath is required and describes the path which the file will be + * downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property + * is specified, filePath is optional and is the directory to download the files to. In the case where filePath is + * used as a directory, any directory structure already associated with the input data will be retained in full and + * appended to the specified filePath directory. The specified relative path cannot break out of the task's working + * directory (for example by using '..'). * * @return the filePath value. */ @@ -192,12 +229,15 @@ public String filePath() { } /** - * Set the filePath property: If the httpUrl property is specified, the filePath is required and describes the path - * which the file will be downloaded to, including the filename. Otherwise, if the autoStorageContainerName or - * storageContainerUrl property is specified, filePath is optional and is the directory to download the files to. In - * the case where filePath is used as a directory, any directory structure already associated with the input data - * will be retained in full and appended to the specified filePath directory. The specified relative path cannot - * break out of the task's working directory (for example by using '..'). + * Set the filePath property: The location on the compute node to which to download the file, relative to the task's + * working directory. + * + * If the httpUrl property is specified, the filePath is required and describes the path which the file will be + * downloaded to, including the filename. Otherwise, if the autoStorageContainerName or storageContainerUrl property + * is specified, filePath is optional and is the directory to download the files to. In the case where filePath is + * used as a directory, any directory structure already associated with the input data will be retained in full and + * appended to the specified filePath directory. The specified relative path cannot break out of the task's working + * directory (for example by using '..'). * * @param filePath the filePath value to set. * @return the ResourceFile object itself. @@ -208,9 +248,11 @@ public ResourceFile withFilePath(String filePath) { } /** - * Get the fileMode property: This property applies only to files being downloaded to Linux compute nodes. It will - * be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is - * not specified for a Linux node, then a default value of 0770 is applied to the file. + * Get the fileMode property: The file permission mode attribute in octal format. + * + * This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is + * specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a + * Linux node, then a default value of 0770 is applied to the file. * * @return the fileMode value. */ @@ -219,9 +261,11 @@ public String fileMode() { } /** - * Set the fileMode property: This property applies only to files being downloaded to Linux compute nodes. It will - * be ignored if it is specified for a resourceFile which will be downloaded to a Windows node. If this property is - * not specified for a Linux node, then a default value of 0770 is applied to the file. + * Set the fileMode property: The file permission mode attribute in octal format. + * + * This property applies only to files being downloaded to Linux compute nodes. It will be ignored if it is + * specified for a resourceFile which will be downloaded to a Windows node. If this property is not specified for a + * Linux node, then a default value of 0770 is applied to the file. * * @param fileMode the fileMode value to set. * @return the ResourceFile object itself. @@ -232,8 +276,10 @@ public ResourceFile withFileMode(String fileMode) { } /** - * Get the identityReference property: The reference to a user assigned identity associated with the Batch pool - * which a compute node will use. + * Get the identityReference property: The reference to the user assigned identity to use to access Azure Blob + * Storage specified by storageContainerUrl or httpUrl + * + * The reference to a user assigned identity associated with the Batch pool which a compute node will use. * * @return the identityReference value. */ @@ -242,8 +288,10 @@ public ComputeNodeIdentityReference identityReference() { } /** - * Set the identityReference property: The reference to a user assigned identity associated with the Batch pool - * which a compute node will use. + * Set the identityReference property: The reference to the user assigned identity to use to access Azure Blob + * Storage specified by storageContainerUrl or httpUrl + * + * The reference to a user assigned identity associated with the Batch pool which a compute node will use. * * @param identityReference the identityReference value to set. * @return the ResourceFile object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceIdentityType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceIdentityType.java index 4b6f177d0ed1..5a7648676498 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceIdentityType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceIdentityType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,17 +9,18 @@ */ public enum ResourceIdentityType { /** - * Enum value SystemAssigned. + * Batch account has a system assigned identity with it. */ SYSTEM_ASSIGNED("SystemAssigned"), /** - * Enum value UserAssigned. + * Batch account has user assigned identities with it. */ USER_ASSIGNED("UserAssigned"), /** - * Enum value None. + * Batch account has no identity associated with it. Setting `None` in update account will remove existing + * identities. */ NONE("None"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceType.java new file mode 100644 index 000000000000..1436cd2a9f57 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ResourceType.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.models; + +/** + * The result of the request to list operations. + */ +public enum ResourceType { + /** + * The resource type for Microsoft.Batch/batchAccounts. + */ + MICROSOFT_BATCH_BATCH_ACCOUNTS("Microsoft.Batch/batchAccounts"); + + /** + * The actual serialized value for a ResourceType instance. + */ + private final String value; + + ResourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceType object, or null if unable to parse. + */ + public static ResourceType fromString(String value) { + if (value == null) { + return null; + } + ResourceType[] items = ResourceType.values(); + for (ResourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java index f9a856489b41..25b13d701ef0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; 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 a1c3545a6ffe..78b131282f19 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -21,11 +21,15 @@ @Fluent public final class ScaleSettings implements JsonSerializable { /* + * Fixed scale settings for the pool. + * * This property and autoScale are mutually exclusive and one of the properties must be specified. */ private FixedScaleSettings fixedScale; /* + * AutoScale settings for the pool. + * * This property and fixedScale are mutually exclusive and one of the properties must be specified. */ private AutoScaleSettings autoScale; @@ -37,8 +41,9 @@ public ScaleSettings() { } /** - * Get the fixedScale property: This property and autoScale are mutually exclusive and one of the properties must be - * specified. + * Get the fixedScale property: Fixed scale settings for the pool. + * + * This property and autoScale are mutually exclusive and one of the properties must be specified. * * @return the fixedScale value. */ @@ -47,8 +52,9 @@ public FixedScaleSettings fixedScale() { } /** - * Set the fixedScale property: This property and autoScale are mutually exclusive and one of the properties must be - * specified. + * Set the fixedScale property: Fixed scale settings for the pool. + * + * This property and autoScale are mutually exclusive and one of the properties must be specified. * * @param fixedScale the fixedScale value to set. * @return the ScaleSettings object itself. @@ -59,8 +65,9 @@ public ScaleSettings withFixedScale(FixedScaleSettings fixedScale) { } /** - * Get the autoScale property: This property and fixedScale are mutually exclusive and one of the properties must be - * specified. + * Get the autoScale property: AutoScale settings for the pool. + * + * This property and fixedScale are mutually exclusive and one of the properties must be specified. * * @return the autoScale value. */ @@ -69,8 +76,9 @@ public AutoScaleSettings autoScale() { } /** - * Set the autoScale property: This property and fixedScale are mutually exclusive and one of the properties must be - * specified. + * Set the autoScale property: AutoScale settings for the pool. + * + * This property and fixedScale are mutually exclusive and one of the properties must be specified. * * @param autoScale the autoScale value to set. * @return the ScaleSettings object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityEncryptionTypes.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityEncryptionTypes.java index befa33bb70ab..b61f8a02bec1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityEncryptionTypes.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityEncryptionTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -8,21 +8,29 @@ import java.util.Collection; /** - * Specifies the EncryptionType of the managed disk. It is set to VMGuestStateOnly for encryption of just the - * VMGuestState blob, and NonPersistedTPM for not persisting firmware state in the VMGuestState blob. **Note**: It can - * be set for only Confidential VMs and required when using Confidential VMs. + * Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed + * disk along with VMGuestState blob, VMGuestStateOnly for encryption of just the VMGuestState blob, and NonPersistedTPM + * for not persisting firmware state in the VMGuestState blob. **Note**: It can be set for only Confidential VMs and + * required when using Confidential VMs. */ public final class SecurityEncryptionTypes extends ExpandableStringEnum { /** - * Static value NonPersistedTPM for SecurityEncryptionTypes. + * EncryptionType of the managed disk is set to NonPersistedTPM for not persisting firmware state in the + * VMGuestState blob. */ public static final SecurityEncryptionTypes NON_PERSISTED_TPM = fromString("NonPersistedTPM"); /** - * Static value VMGuestStateOnly for SecurityEncryptionTypes. + * EncryptionType of the managed disk is set to VMGuestStateOnly for encryption of just the VMGuestState blob. */ public static final SecurityEncryptionTypes VMGUEST_STATE_ONLY = fromString("VMGuestStateOnly"); + /** + * EncryptionType of the managed disk is set to DiskWithVMGuestState for encryption of the managed disk along with + * VMGuestState blob. It is not supported in data disks. + */ + public static final SecurityEncryptionTypes DISK_WITH_VMGUEST_STATE = fromString("DiskWithVMGuestState"); + /** * Creates a new instance of SecurityEncryptionTypes value. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityProfile.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityProfile.java index 269b91a0c9b4..aebf8027d853 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityProfile.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -34,6 +34,11 @@ public final class SecurityProfile implements JsonSerializable */ private UefiSettings uefiSettings; + /* + * Specifies ProxyAgent settings while creating the virtual machine. + */ + private ProxyAgentSettings proxyAgentSettings; + /** * Creates an instance of SecurityProfile class. */ @@ -108,6 +113,26 @@ public SecurityProfile withUefiSettings(UefiSettings uefiSettings) { return this; } + /** + * Get the proxyAgentSettings property: Specifies ProxyAgent settings while creating the virtual machine. + * + * @return the proxyAgentSettings value. + */ + public ProxyAgentSettings proxyAgentSettings() { + return this.proxyAgentSettings; + } + + /** + * Set the proxyAgentSettings property: Specifies ProxyAgent settings while creating the virtual machine. + * + * @param proxyAgentSettings the proxyAgentSettings value to set. + * @return the SecurityProfile object itself. + */ + public SecurityProfile withProxyAgentSettings(ProxyAgentSettings proxyAgentSettings) { + this.proxyAgentSettings = proxyAgentSettings; + return this; + } + /** * Validates the instance. * @@ -117,6 +142,9 @@ public void validate() { if (uefiSettings() != null) { uefiSettings().validate(); } + if (proxyAgentSettings() != null) { + proxyAgentSettings().validate(); + } } /** @@ -128,6 +156,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("securityType", this.securityType == null ? null : this.securityType.toString()); jsonWriter.writeBooleanField("encryptionAtHost", this.encryptionAtHost); jsonWriter.writeJsonField("uefiSettings", this.uefiSettings); + jsonWriter.writeJsonField("proxyAgentSettings", this.proxyAgentSettings); return jsonWriter.writeEndObject(); } @@ -152,6 +181,8 @@ public static SecurityProfile fromJson(JsonReader jsonReader) throws IOException deserializedSecurityProfile.encryptionAtHost = reader.getNullable(JsonReader::getBoolean); } else if ("uefiSettings".equals(fieldName)) { deserializedSecurityProfile.uefiSettings = UefiSettings.fromJson(reader); + } else if ("proxyAgentSettings".equals(fieldName)) { + deserializedSecurityProfile.proxyAgentSettings = ProxyAgentSettings.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityTypes.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityTypes.java index 40e5637d35d4..e469e7015b13 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityTypes.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SecurityTypes.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,12 +9,15 @@ */ public enum SecurityTypes { /** - * Enum value trustedLaunch. + * Trusted launch protects against advanced and persistent attack techniques. */ TRUSTED_LAUNCH("trustedLaunch"), /** - * Enum value confidentialVM. + * Azure confidential computing offers confidential VMs are for tenants with high security and confidentiality + * requirements. These VMs provide a strong, hardware-enforced boundary to help meet your security needs. You can + * use confidential VMs for migrations without making changes to your code, with the platform protecting your VM's + * state from being read or modified. */ CONFIDENTIAL_VM("confidentialVM"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ServiceArtifactReference.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ServiceArtifactReference.java index 498b4e9bc0d3..19b351cb96f6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ServiceArtifactReference.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ServiceArtifactReference.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,6 +19,8 @@ @Fluent public final class ServiceArtifactReference implements JsonSerializable { /* + * The service artifact reference id of ServiceArtifactReference + * * The service artifact reference id in the form of * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName * }/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName} @@ -32,7 +34,9 @@ public ServiceArtifactReference() { } /** - * Get the id property: The service artifact reference id in the form of + * Get the id property: The service artifact reference id of ServiceArtifactReference + * + * The service artifact reference id in the form of * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. * * @return the id value. @@ -42,7 +46,9 @@ public String id() { } /** - * Set the id property: The service artifact reference id in the form of + * Set the id property: The service artifact reference id of ServiceArtifactReference + * + * The service artifact reference id in the form of * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. * * @param id the id value to set. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Severity.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Severity.java index 7e20b046ad63..6d125e417b58 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Severity.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/Severity.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SkuCapability.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SkuCapability.java index f307510d78d3..98d9396402f2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SkuCapability.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SkuCapability.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -29,7 +29,7 @@ public final class SkuCapability implements JsonSerializable { /** * Creates an instance of SkuCapability class. */ - public SkuCapability() { + private SkuCapability() { } /** 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 839c38cf53a2..2705ba074031 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -24,6 +24,8 @@ @Fluent public final class StartTask implements JsonSerializable { /* + * The command line of the start task. + * * The command line does not run under a shell, and therefore cannot take advantage of shell features such as * environment variable expansion. If you want to take advantage of such features, you should invoke the shell in * the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if @@ -42,11 +44,15 @@ public final class StartTask implements JsonSerializable { private List environmentSettings; /* + * The user identity under which the start task runs. + * * If omitted, the task runs as a non-administrative user unique to the task. */ private UserIdentity userIdentity; /* + * The maximum number of times the task may be retried. + * * The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the * number of retries. The 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 @@ -56,6 +62,9 @@ public final class StartTask implements JsonSerializable { private Integer maxTaskRetryCount; /* + * Whether the Batch service should wait for the start task to complete successfully (that is, to exit with exit + * code 0) before scheduling any tasks on the compute node. + * * If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum * retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the * Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected @@ -67,6 +76,8 @@ public final class StartTask implements JsonSerializable { private Boolean waitForSuccess; /* + * The settings for the container under which the start task runs. + * * When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch * directories on the node) are mapped into the container, all task environment variables are mapped into the * container, and the task command line is executed in the container. @@ -80,10 +91,12 @@ public StartTask() { } /** - * Get the commandLine property: The command line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take advantage of such features, you should - * invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" - * in Linux. Required if any other properties of the startTask are specified. + * Get the commandLine property: The command line of the start task. + * + * The command line does not run under a shell, and therefore cannot take advantage of shell features such as + * environment variable expansion. If you want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if + * any other properties of the startTask are specified. * * @return the commandLine value. */ @@ -92,10 +105,12 @@ public String commandLine() { } /** - * Set the commandLine property: The command line does not run under a shell, and therefore cannot take advantage of - * shell features such as environment variable expansion. If you want to take advantage of such features, you should - * invoke the shell in the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" - * in Linux. Required if any other properties of the startTask are specified. + * Set the commandLine property: The command line of the start task. + * + * The command line does not run under a shell, and therefore cannot take advantage of shell features such as + * environment variable expansion. If you want to take advantage of such features, you should invoke the shell in + * the command line, for example using "cmd /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. Required if + * any other properties of the startTask are specified. * * @param commandLine the commandLine value to set. * @return the StartTask object itself. @@ -148,7 +163,9 @@ public StartTask withEnvironmentSettings(List environmentSet } /** - * Get the userIdentity property: If omitted, the task runs as a non-administrative user unique to the task. + * Get the userIdentity property: The user identity under which the start task runs. + * + * If omitted, the task runs as a non-administrative user unique to the task. * * @return the userIdentity value. */ @@ -157,7 +174,9 @@ public UserIdentity userIdentity() { } /** - * Set the userIdentity property: If omitted, the task runs as a non-administrative user unique to the task. + * Set the userIdentity property: The user identity under which the start task runs. + * + * If omitted, the task runs as a non-administrative user unique to the task. * * @param userIdentity the userIdentity value to set. * @return the StartTask object itself. @@ -168,11 +187,13 @@ public StartTask withUserIdentity(UserIdentity userIdentity) { } /** - * Get the maxTaskRetryCount property: The Batch service retries a task if its exit code is nonzero. Note that this - * value specifically controls the number of retries. The 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. Default is 0. + * Get the maxTaskRetryCount property: The maximum number of times the task may be retried. + * + * The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the + * number of retries. The 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. Default is 0. * * @return the maxTaskRetryCount value. */ @@ -181,11 +202,13 @@ public Integer maxTaskRetryCount() { } /** - * Set the maxTaskRetryCount property: The Batch service retries a task if its exit code is nonzero. Note that this - * value specifically controls the number of retries. The 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. Default is 0. + * Set the maxTaskRetryCount property: The maximum number of times the task may be retried. + * + * The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the + * number of retries. The 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. Default is 0. * * @param maxTaskRetryCount the maxTaskRetryCount value to set. * @return the StartTask object itself. @@ -196,13 +219,16 @@ public StartTask withMaxTaskRetryCount(Integer maxTaskRetryCount) { } /** - * Get the waitForSuccess property: If true and the start task fails on a compute node, the Batch service retries - * the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule - * tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch - * service will not wait for the start task to complete. In this case, other tasks can start executing on the - * compute node while the start task is still running; and even if the start task fails, new tasks will continue to - * be scheduled on the node. The default is true. + * Get the waitForSuccess property: Whether the Batch service should wait for the start task to complete + * successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node. + * + * If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum + * retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the + * Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected + * via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to + * complete. In this case, other tasks can start executing on the compute node while the start task is still + * running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is + * true. * * @return the waitForSuccess value. */ @@ -211,13 +237,16 @@ public Boolean waitForSuccess() { } /** - * Set the waitForSuccess property: If true and the start task fails on a compute node, the Batch service retries - * the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed - * successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule - * tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch - * service will not wait for the start task to complete. In this case, other tasks can start executing on the - * compute node while the start task is still running; and even if the start task fails, new tasks will continue to - * be scheduled on the node. The default is true. + * Set the waitForSuccess property: Whether the Batch service should wait for the start task to complete + * successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node. + * + * If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum + * retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the + * Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected + * via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to + * complete. In this case, other tasks can start executing on the compute node while the start task is still + * running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is + * true. * * @param waitForSuccess the waitForSuccess value to set. * @return the StartTask object itself. @@ -228,9 +257,11 @@ public StartTask withWaitForSuccess(Boolean waitForSuccess) { } /** - * Get the containerSettings property: When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command line is executed in the container. + * Get the containerSettings property: The settings for the container under which the start task runs. + * + * When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch + * directories on the node) are mapped into the container, all task environment variables are mapped into the + * container, and the task command line is executed in the container. * * @return the containerSettings value. */ @@ -239,9 +270,11 @@ public TaskContainerSettings containerSettings() { } /** - * Set the containerSettings property: When this is specified, all directories recursively below the - * AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task - * environment variables are mapped into the container, and the task command line is executed in the container. + * Set the containerSettings property: The settings for the container under which the start task runs. + * + * When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch + * directories on the node) are mapped into the container, all task environment variables are mapped into the + * container, and the task command line is executed in the container. * * @param containerSettings the containerSettings value to set. * @return the StartTask object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StorageAccountType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StorageAccountType.java index 30c5c66b7a63..430dba34116c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StorageAccountType.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/StorageAccountType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -9,17 +9,17 @@ */ public enum StorageAccountType { /** - * Enum value Standard_LRS. + * The data disk / OS disk should use standard locally redundant storage. */ STANDARD_LRS("Standard_LRS"), /** - * Enum value Premium_LRS. + * The data disk / OS disk should use premium locally redundant storage. */ PREMIUM_LRS("Premium_LRS"), /** - * Enum value StandardSSD_LRS. + * The data disk / OS disk should use standard SSD locally redundant storage. */ STANDARD_SSD_LRS("StandardSSD_LRS"); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java index 72afbfb41fde..41662f41476f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskContainerSettings.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskContainerSettings.java index 6f06b8cf8ff7..5095c83d65a5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskContainerSettings.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskContainerSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,18 +19,24 @@ @Fluent public final class TaskContainerSettings implements JsonSerializable { /* + * Additional options to the container create command. + * * These additional options are supplied as arguments to the "docker create" command, in addition to those * controlled by the Batch Service. */ private String containerRunOptions; /* + * The image to use to create the container in which the task will run. + * * This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the * image name, the tag ":latest" is used as a default. */ private String imageName; /* + * The private registry which contains the container image. + * * This setting can be omitted if was already provided at pool creation. */ private ContainerRegistry registry; @@ -41,6 +47,8 @@ public final class TaskContainerSettings implements JsonSerializable containerHostBatchBindMounts() { } /** - * Set the containerHostBatchBindMounts property: If this array is null or be not present, container task will mount - * entire temporary disk drive in windows (or AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into - * container if this array is set as empty. + * Set the containerHostBatchBindMounts property: The paths you want to mounted to container task. + * + * If this array is null or be not present, container task will mount entire temporary disk drive in windows (or + * AZ_BATCH_NODE_ROOT_DIR in Linux). It won't' mount any data paths into container if this array is set as empty. * * @param containerHostBatchBindMounts the containerHostBatchBindMounts value to set. * @return the TaskContainerSettings object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskSchedulingPolicy.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskSchedulingPolicy.java index a3c728a2dd71..a93884c8d84e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskSchedulingPolicy.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/TaskSchedulingPolicy.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,6 +17,13 @@ */ @Fluent public final class TaskSchedulingPolicy implements JsonSerializable { + /* + * If not specified, the default is none. + * + * The order for scheduling tasks from different jobs with the same priority. + */ + private JobDefaultOrder jobDefaultOrder; + /* * How tasks should be distributed across compute nodes. */ @@ -28,6 +35,30 @@ public final class TaskSchedulingPolicy implements JsonSerializable { private UpgradeMode mode; /* + * Configuration parameters used for performing automatic OS Upgrade. + * * The configuration parameters used for performing automatic OS upgrade. */ private AutomaticOSUpgradePolicy automaticOSUpgradePolicy; @@ -71,7 +73,9 @@ public UpgradePolicy withMode(UpgradeMode mode) { } /** - * Get the automaticOSUpgradePolicy property: The configuration parameters used for performing automatic OS upgrade. + * Get the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade. + * + * The configuration parameters used for performing automatic OS upgrade. * * @return the automaticOSUpgradePolicy value. */ @@ -80,7 +84,9 @@ public AutomaticOSUpgradePolicy automaticOSUpgradePolicy() { } /** - * Set the automaticOSUpgradePolicy property: The configuration parameters used for performing automatic OS upgrade. + * Set the automaticOSUpgradePolicy property: Configuration parameters used for performing automatic OS Upgrade. + * + * The configuration parameters used for performing automatic OS upgrade. * * @param automaticOSUpgradePolicy the automaticOSUpgradePolicy value to set. * @return the UpgradePolicy object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAccount.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAccount.java index 5aed0526b99b..df69608fbcdb 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAccount.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAccount.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -28,18 +28,24 @@ public final class UserAccount implements JsonSerializable { private String password; /* + * The elevation level of the user. + * * nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with * elevated access and operates with full Administrator permissions. The default value is nonAdmin. */ private ElevationLevel elevationLevel; /* + * The Linux-specific user configuration for the user account. + * * This property is ignored if specified on a Windows pool. If not specified, the user is created with the default * options. */ private LinuxUserConfiguration linuxUserConfiguration; /* + * The Windows-specific user configuration for the user account. + * * This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the * user is created with the default options. */ @@ -94,9 +100,10 @@ public UserAccount withPassword(String password) { } /** - * Get the elevationLevel property: nonAdmin - The auto user is a standard user without elevated access. admin - The - * auto user is a user with elevated access and operates with full Administrator permissions. The default value is - * nonAdmin. + * Get the elevationLevel property: The elevation level of the user. + * + * nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with + * elevated access and operates with full Administrator permissions. The default value is nonAdmin. * * @return the elevationLevel value. */ @@ -105,9 +112,10 @@ public ElevationLevel elevationLevel() { } /** - * Set the elevationLevel property: nonAdmin - The auto user is a standard user without elevated access. admin - The - * auto user is a user with elevated access and operates with full Administrator permissions. The default value is - * nonAdmin. + * Set the elevationLevel property: The elevation level of the user. + * + * nonAdmin - The auto user is a standard user without elevated access. admin - The auto user is a user with + * elevated access and operates with full Administrator permissions. The default value is nonAdmin. * * @param elevationLevel the elevationLevel value to set. * @return the UserAccount object itself. @@ -118,8 +126,10 @@ public UserAccount withElevationLevel(ElevationLevel elevationLevel) { } /** - * Get the linuxUserConfiguration property: This property is ignored if specified on a Windows pool. If not - * specified, the user is created with the default options. + * Get the linuxUserConfiguration property: The Linux-specific user configuration for the user account. + * + * This property is ignored if specified on a Windows pool. If not specified, the user is created with the default + * options. * * @return the linuxUserConfiguration value. */ @@ -128,8 +138,10 @@ public LinuxUserConfiguration linuxUserConfiguration() { } /** - * Set the linuxUserConfiguration property: This property is ignored if specified on a Windows pool. If not - * specified, the user is created with the default options. + * Set the linuxUserConfiguration property: The Linux-specific user configuration for the user account. + * + * This property is ignored if specified on a Windows pool. If not specified, the user is created with the default + * options. * * @param linuxUserConfiguration the linuxUserConfiguration value to set. * @return the UserAccount object itself. @@ -140,8 +152,10 @@ public UserAccount withLinuxUserConfiguration(LinuxUserConfiguration linuxUserCo } /** - * Get the windowsUserConfiguration property: This property can only be specified if the user is on a Windows pool. - * If not specified and on a Windows pool, the user is created with the default options. + * Get the windowsUserConfiguration property: The Windows-specific user configuration for the user account. + * + * This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the + * user is created with the default options. * * @return the windowsUserConfiguration value. */ @@ -150,8 +164,10 @@ public WindowsUserConfiguration windowsUserConfiguration() { } /** - * Set the windowsUserConfiguration property: This property can only be specified if the user is on a Windows pool. - * If not specified and on a Windows pool, the user is created with the default options. + * Set the windowsUserConfiguration property: The Windows-specific user configuration for the user account. + * + * This property can only be specified if the user is on a Windows pool. If not specified and on a Windows pool, the + * user is created with the default options. * * @param windowsUserConfiguration the windowsUserConfiguration value to set. * @return the UserAccount object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAssignedIdentities.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAssignedIdentities.java index ddd7c1872e6d..0f5a386393a7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAssignedIdentities.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/UserAssignedIdentities.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; 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 8aa0c0c8fa91..9759d239cb6f 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,11 +19,15 @@ @Fluent public final class UserIdentity implements JsonSerializable { /* + * The name of the user identity under which the task is run. + * * The userName and autoUser properties are mutually exclusive; you must specify one but not both. */ private String username; /* + * The auto user under which the task is run. + * * The userName and autoUser properties are mutually exclusive; you must specify one but not both. */ private AutoUserSpecification autoUser; @@ -35,8 +39,9 @@ public UserIdentity() { } /** - * Get the username property: The userName and autoUser properties are mutually exclusive; you must specify one but - * not both. + * Get the username property: The name of the user identity under which the task is run. + * + * The userName and autoUser properties are mutually exclusive; you must specify one but not both. * * @return the username value. */ @@ -45,8 +50,9 @@ public String username() { } /** - * Set the username property: The userName and autoUser properties are mutually exclusive; you must specify one but - * not both. + * Set the username property: The name of the user identity under which the task is run. + * + * The userName and autoUser properties are mutually exclusive; you must specify one but not both. * * @param username the username value to set. * @return the UserIdentity object itself. @@ -57,8 +63,9 @@ public UserIdentity withUsername(String username) { } /** - * Get the autoUser property: The userName and autoUser properties are mutually exclusive; you must specify one but - * not both. + * Get the autoUser property: The auto user under which the task is run. + * + * The userName and autoUser properties are mutually exclusive; you must specify one but not both. * * @return the autoUser value. */ @@ -67,8 +74,9 @@ public AutoUserSpecification autoUser() { } /** - * Set the autoUser property: The userName and autoUser properties are mutually exclusive; you must specify one but - * not both. + * Set the autoUser property: The auto user under which the task is run. + * + * The userName and autoUser properties are mutually exclusive; you must specify one but not both. * * @param autoUser the autoUser value to set. * @return the UserIdentity object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMDiskSecurityProfile.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMDiskSecurityProfile.java index 5a3a55893924..a7f6ddec140c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMDiskSecurityProfile.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMDiskSecurityProfile.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -24,6 +24,12 @@ public final class VMDiskSecurityProfile implements JsonSerializable { private Object protectedSettings; /* + * The collection of extension names. + * * Collection of extension names after which this extension needs to be provisioned. */ private List provisionAfterExtensions; @@ -242,8 +244,9 @@ public VMExtension withProtectedSettings(Object protectedSettings) { } /** - * Get the provisionAfterExtensions property: Collection of extension names after which this extension needs to be - * provisioned. + * Get the provisionAfterExtensions property: The collection of extension names. + * + * Collection of extension names after which this extension needs to be provisioned. * * @return the provisionAfterExtensions value. */ @@ -252,8 +255,9 @@ public List provisionAfterExtensions() { } /** - * Set the provisionAfterExtensions property: Collection of extension names after which this extension needs to be - * provisioned. + * Set the provisionAfterExtensions property: The collection of extension names. + * + * Collection of extension names after which this extension needs to be provisioned. * * @param provisionAfterExtensions the provisionAfterExtensions value to set. * @return the VMExtension object itself. @@ -297,8 +301,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("typeHandlerVersion", this.typeHandlerVersion); jsonWriter.writeBooleanField("autoUpgradeMinorVersion", this.autoUpgradeMinorVersion); jsonWriter.writeBooleanField("enableAutomaticUpgrade", this.enableAutomaticUpgrade); - jsonWriter.writeUntypedField("settings", this.settings); - jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); + if (this.settings != null) { + jsonWriter.writeUntypedField("settings", this.settings); + } + if (this.protectedSettings != null) { + jsonWriter.writeUntypedField("protectedSettings", this.protectedSettings); + } jsonWriter.writeArrayField("provisionAfterExtensions", this.provisionAfterExtensions, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineConfiguration.java index 13886194a215..3d3dd2a9c541 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -19,6 +19,8 @@ @Fluent public final class VirtualMachineConfiguration implements JsonSerializable { /* + * A reference to the Azure Virtual Machines Marketplace Image or the custom Virtual Machine Image to use. + * * A reference to an Azure Virtual Machines Marketplace image or the Azure Image resource of a custom Virtual * Machine. To get the list of all imageReferences verified by Azure Batch, see the 'List supported node agent SKUs' * operation. @@ -26,6 +28,8 @@ public final class VirtualMachineConfiguration implements JsonSerializable dataDisks; /* + * The type of on-premises license to be used when deploying the operating system. + * * This only applies to images that contain the Windows operating system, and should only be used when you hold * valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is * applied. Values are: @@ -55,6 +65,8 @@ public final class VirtualMachineConfiguration implements JsonSerializable extensions; /* + * Settings for the operating system disk of the Virtual Machine. + * * Contains configuration for ephemeral OSDisk settings. */ private OSDisk osDisk; @@ -87,6 +107,9 @@ public final class VirtualMachineConfiguration implements JsonSerializable dataDisks() { } /** - * Set the dataDisks property: This property must be specified if the compute nodes in the pool need to have empty - * data disks attached to them. + * Set the dataDisks property: The configuration for data disks attached to the compute nodes in the pool. + * + * This property must be specified if the compute nodes in the pool need to have empty data disks attached to them. * * @param dataDisks the dataDisks value to set. * @return the VirtualMachineConfiguration object itself. @@ -196,9 +233,11 @@ public VirtualMachineConfiguration withDataDisks(List dataDisks) { } /** - * Get the licenseType property: This only applies to images that contain the Windows operating system, and should - * only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no - * on-premises licensing discount is applied. Values are: + * Get the licenseType property: The type of on-premises license to be used when deploying the operating system. + * + * This only applies to images that contain the Windows operating system, and should only be used when you hold + * valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is + * applied. Values are: * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. @@ -210,9 +249,11 @@ public String licenseType() { } /** - * Set the licenseType property: This only applies to images that contain the Windows operating system, and should - * only be used when you hold valid on-premises licenses for the nodes which will be deployed. If omitted, no - * on-premises licensing discount is applied. Values are: + * Set the licenseType property: The type of on-premises license to be used when deploying the operating system. + * + * This only applies to images that contain the Windows operating system, and should only be used when you hold + * valid on-premises licenses for the nodes which will be deployed. If omitted, no on-premises licensing discount is + * applied. Values are: * * Windows_Server - The on-premises license is for Windows Server. * Windows_Client - The on-premises license is for Windows Client. @@ -226,9 +267,11 @@ public VirtualMachineConfiguration withLicenseType(String licenseType) { } /** - * Get the containerConfiguration property: If specified, setup is performed on each node in the pool to allow tasks - * to run in containers. All regular tasks and job manager tasks run on this pool must specify the containerSettings - * property, and all other tasks may specify it. + * Get the containerConfiguration property: The container configuration for the pool. + * + * If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks + * and job manager tasks run on this pool must specify the containerSettings property, and all other tasks may + * specify it. * * @return the containerConfiguration value. */ @@ -237,9 +280,11 @@ public ContainerConfiguration containerConfiguration() { } /** - * Set the containerConfiguration property: If specified, setup is performed on each node in the pool to allow tasks - * to run in containers. All regular tasks and job manager tasks run on this pool must specify the containerSettings - * property, and all other tasks may specify it. + * Set the containerConfiguration property: The container configuration for the pool. + * + * If specified, setup is performed on each node in the pool to allow tasks to run in containers. All regular tasks + * and job manager tasks run on this pool must specify the containerSettings property, and all other tasks may + * specify it. * * @param containerConfiguration the containerConfiguration value to set. * @return the VirtualMachineConfiguration object itself. @@ -250,8 +295,9 @@ public VirtualMachineConfiguration withContainerConfiguration(ContainerConfigura } /** - * Get the diskEncryptionConfiguration property: If specified, encryption is performed on each node in the pool - * during node provisioning. + * Get the diskEncryptionConfiguration property: The disk encryption configuration for the pool. + * + * If specified, encryption is performed on each node in the pool during node provisioning. * * @return the diskEncryptionConfiguration value. */ @@ -260,8 +306,9 @@ public DiskEncryptionConfiguration diskEncryptionConfiguration() { } /** - * Set the diskEncryptionConfiguration property: If specified, encryption is performed on each node in the pool - * during node provisioning. + * Set the diskEncryptionConfiguration property: The disk encryption configuration for the pool. + * + * If specified, encryption is performed on each node in the pool during node provisioning. * * @param diskEncryptionConfiguration the diskEncryptionConfiguration value to set. * @return the VirtualMachineConfiguration object itself. @@ -273,8 +320,9 @@ public DiskEncryptionConfiguration diskEncryptionConfiguration() { } /** - * Get the nodePlacementConfiguration property: This configuration will specify rules on how nodes in the pool will - * be physically allocated. + * Get the nodePlacementConfiguration property: The node placement configuration for the pool. + * + * This configuration will specify rules on how nodes in the pool will be physically allocated. * * @return the nodePlacementConfiguration value. */ @@ -283,8 +331,9 @@ public NodePlacementConfiguration nodePlacementConfiguration() { } /** - * Set the nodePlacementConfiguration property: This configuration will specify rules on how nodes in the pool will - * be physically allocated. + * Set the nodePlacementConfiguration property: The node placement configuration for the pool. + * + * This configuration will specify rules on how nodes in the pool will be physically allocated. * * @param nodePlacementConfiguration the nodePlacementConfiguration value to set. * @return the VirtualMachineConfiguration object itself. @@ -296,8 +345,9 @@ public NodePlacementConfiguration nodePlacementConfiguration() { } /** - * Get the extensions property: If specified, the extensions mentioned in this configuration will be installed on - * each node. + * Get the extensions property: The virtual machine extension for the pool. + * + * If specified, the extensions mentioned in this configuration will be installed on each node. * * @return the extensions value. */ @@ -306,8 +356,9 @@ public List extensions() { } /** - * Set the extensions property: If specified, the extensions mentioned in this configuration will be installed on - * each node. + * Set the extensions property: The virtual machine extension for the pool. + * + * If specified, the extensions mentioned in this configuration will be installed on each node. * * @param extensions the extensions value to set. * @return the VirtualMachineConfiguration object itself. @@ -318,7 +369,9 @@ public VirtualMachineConfiguration withExtensions(List extensions) } /** - * Get the osDisk property: Contains configuration for ephemeral OSDisk settings. + * Get the osDisk property: Settings for the operating system disk of the Virtual Machine. + * + * Contains configuration for ephemeral OSDisk settings. * * @return the osDisk value. */ @@ -327,7 +380,9 @@ public OSDisk osDisk() { } /** - * Set the osDisk property: Contains configuration for ephemeral OSDisk settings. + * Set the osDisk property: Settings for the operating system disk of the Virtual Machine. + * + * Contains configuration for ephemeral OSDisk settings. * * @param osDisk the osDisk value to set. * @return the VirtualMachineConfiguration object itself. @@ -360,7 +415,10 @@ public VirtualMachineConfiguration withSecurityProfile(SecurityProfile securityP } /** - * Get the serviceArtifactReference property: The service artifact reference id in the form of + * Get the serviceArtifactReference property: Specifies the service artifact reference id used to set same image + * version for all virtual machines in the scale set when using 'latest' image version. + * + * The service artifact reference id in the form of * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. * * @return the serviceArtifactReference value. @@ -370,7 +428,10 @@ public ServiceArtifactReference serviceArtifactReference() { } /** - * Set the serviceArtifactReference property: The service artifact reference id in the form of + * Set the serviceArtifactReference property: Specifies the service artifact reference id used to set same image + * version for all virtual machines in the scale set when using 'latest' image version. + * + * The service artifact reference id in the form of * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactName}/vmArtifactsProfiles/{vmArtifactsProfilesName}. * * @param serviceArtifactReference the serviceArtifactReference value to set. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineFamilyCoreQuota.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineFamilyCoreQuota.java index d1b20cb9f2a4..5c6d2bd5288e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineFamilyCoreQuota.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineFamilyCoreQuota.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -29,7 +29,7 @@ public final class VirtualMachineFamilyCoreQuota implements JsonSerializable { /* + * Whether automatic updates are enabled on the virtual machine. + * * If omitted, the default value is true. */ private Boolean enableAutomaticUpdates; @@ -28,7 +30,9 @@ public WindowsConfiguration() { } /** - * Get the enableAutomaticUpdates property: If omitted, the default value is true. + * Get the enableAutomaticUpdates property: Whether automatic updates are enabled on the virtual machine. + * + * If omitted, the default value is true. * * @return the enableAutomaticUpdates value. */ @@ -37,7 +41,9 @@ public Boolean enableAutomaticUpdates() { } /** - * Set the enableAutomaticUpdates property: If omitted, the default value is true. + * Set the enableAutomaticUpdates property: Whether automatic updates are enabled on the virtual machine. + * + * If omitted, the default value is true. * * @param enableAutomaticUpdates the enableAutomaticUpdates value to set. * @return the WindowsConfiguration object itself. diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/WindowsUserConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/WindowsUserConfiguration.java index e608ce7db6c1..3fd81a95e9f0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/WindowsUserConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/WindowsUserConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.models; @@ -17,6 +17,8 @@ @Fluent public final class WindowsUserConfiguration implements JsonSerializable { /* + * Login mode for user + * * Specifies login mode for the user. The default value is Interactive. */ private LoginMode loginMode; @@ -28,7 +30,9 @@ public WindowsUserConfiguration() { } /** - * Get the loginMode property: Specifies login mode for the user. The default value is Interactive. + * Get the loginMode property: Login mode for user + * + * Specifies login mode for the user. The default value is Interactive. * * @return the loginMode value. */ @@ -37,7 +41,9 @@ public LoginMode loginMode() { } /** - * Set the loginMode property: Specifies login mode for the user. The default value is Interactive. + * Set the loginMode property: Login mode for user + * + * Specifies login mode for the user. The default value is Interactive. * * @param loginMode the loginMode value to set. * @return the WindowsUserConfiguration object itself. 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 3fcecd9cd266..2b9b15a8d2b2 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 @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for BatchManagementClient. - * Batch Client. + * Package containing the data models for Batch. + * The Batch Management 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 7c3e630e2f76..ec18c3e82002 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 @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for BatchManagementClient. - * Batch Client. + * Package containing the classes for Batch. + * The Batch Management Client. */ package com.azure.resourcemanager.batch; diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/module-info.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/module-info.java index 3b3f86e3d24e..9722d81bd149 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/module-info.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.batch { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.batch.fluent.models to com.azure.core; opens com.azure.resourcemanager.batch.models to com.azure.core; + opens com.azure.resourcemanager.batch.implementation.models to com.azure.core; } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/azure-resourcemanager-batch_apiview_properties.json b/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/azure-resourcemanager-batch_apiview_properties.json new file mode 100644 index 000000000000..1c64b026a7bd --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/azure-resourcemanager-batch_apiview_properties.json @@ -0,0 +1,262 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.activate": "Microsoft.Batch.ApplicationPackages.activate", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.activateWithResponse": "Microsoft.Batch.ApplicationPackages.activate", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.create": "Microsoft.Batch.ApplicationPackages.create", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.createWithResponse": "Microsoft.Batch.ApplicationPackages.create", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.delete": "Microsoft.Batch.ApplicationPackages.delete", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.deleteWithResponse": "Microsoft.Batch.ApplicationPackages.delete", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.get": "Microsoft.Batch.ApplicationPackages.get", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.getWithResponse": "Microsoft.Batch.ApplicationPackages.get", + "com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.list": "Microsoft.Batch.ApplicationPackages.list", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.create": "Microsoft.Batch.Applications.create", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.createWithResponse": "Microsoft.Batch.Applications.create", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.delete": "Microsoft.Batch.Applications.delete", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.deleteWithResponse": "Microsoft.Batch.Applications.delete", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.get": "Microsoft.Batch.Applications.get", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.getWithResponse": "Microsoft.Batch.Applications.get", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.list": "Microsoft.Batch.Applications.list", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.update": "Microsoft.Batch.Applications.update", + "com.azure.resourcemanager.batch.fluent.ApplicationsClient.updateWithResponse": "Microsoft.Batch.Applications.update", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.beginCreate": "Microsoft.Batch.BatchAccounts.create", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.beginDelete": "Microsoft.Batch.BatchAccounts.delete", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.create": "Microsoft.Batch.BatchAccounts.create", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.delete": "Microsoft.Batch.BatchAccounts.delete", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getByResourceGroup": "Microsoft.Batch.BatchAccounts.get", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getByResourceGroupWithResponse": "Microsoft.Batch.BatchAccounts.get", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getDetector": "Microsoft.Batch.DetectorResponses.getDetector", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getDetectorWithResponse": "Microsoft.Batch.DetectorResponses.getDetector", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getKeys": "Microsoft.Batch.BatchAccounts.getKeys", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getKeysWithResponse": "Microsoft.Batch.BatchAccounts.getKeys", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.list": "Microsoft.Batch.BatchAccounts.list", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.listByResourceGroup": "Microsoft.Batch.BatchAccounts.listByResourceGroup", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.listDetectors": "Microsoft.Batch.DetectorResponses.listDetectors", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.listOutboundNetworkDependenciesEndpoints": "Microsoft.Batch.BatchAccounts.listOutboundNetworkDependenciesEndpoints", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.regenerateKey": "Microsoft.Batch.BatchAccounts.regenerateKey", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.regenerateKeyWithResponse": "Microsoft.Batch.BatchAccounts.regenerateKey", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.synchronizeAutoStorageKeys": "Microsoft.Batch.BatchAccounts.synchronizeAutoStorageKeys", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.synchronizeAutoStorageKeysWithResponse": "Microsoft.Batch.BatchAccounts.synchronizeAutoStorageKeys", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.update": "Microsoft.Batch.BatchAccounts.update", + "com.azure.resourcemanager.batch.fluent.BatchAccountsClient.updateWithResponse": "Microsoft.Batch.BatchAccounts.update", + "com.azure.resourcemanager.batch.fluent.BatchManagementClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.LocationsClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.LocationsClient.checkNameAvailability": "Microsoft.Batch.LocationOperationGroup.checkNameAvailability", + "com.azure.resourcemanager.batch.fluent.LocationsClient.checkNameAvailabilityWithResponse": "Microsoft.Batch.LocationOperationGroup.checkNameAvailability", + "com.azure.resourcemanager.batch.fluent.LocationsClient.getQuotas": "Microsoft.Batch.LocationOperationGroup.getQuotas", + "com.azure.resourcemanager.batch.fluent.LocationsClient.getQuotasWithResponse": "Microsoft.Batch.LocationOperationGroup.getQuotas", + "com.azure.resourcemanager.batch.fluent.LocationsClient.listSupportedVirtualMachineSkus": "Microsoft.Batch.LocationOperationGroup.listSupportedVirtualMachineSkus", + "com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.beginReconcileConfiguration": "Microsoft.Batch.NetworkSecurityPerimeterConfigurations.reconcileConfiguration", + "com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.getConfiguration": "Microsoft.Batch.NetworkSecurityPerimeterConfigurations.getConfiguration", + "com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.getConfigurationWithResponse": "Microsoft.Batch.NetworkSecurityPerimeterConfigurations.getConfiguration", + "com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.listConfigurations": "Microsoft.Batch.NetworkSecurityPerimeterConfigurations.listConfigurations", + "com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.reconcileConfiguration": "Microsoft.Batch.NetworkSecurityPerimeterConfigurations.reconcileConfiguration", + "com.azure.resourcemanager.batch.fluent.OperationsClient": "Microsoft.Batch.Operations", + "com.azure.resourcemanager.batch.fluent.OperationsClient.list": "Azure.ResourceManager.Legacy.Operations.list", + "com.azure.resourcemanager.batch.fluent.PoolsClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.PoolsClient.beginDelete": "Microsoft.Batch.Pools.delete", + "com.azure.resourcemanager.batch.fluent.PoolsClient.create": "Microsoft.Batch.Pools.create", + "com.azure.resourcemanager.batch.fluent.PoolsClient.createWithResponse": "Microsoft.Batch.Pools.create", + "com.azure.resourcemanager.batch.fluent.PoolsClient.delete": "Microsoft.Batch.Pools.delete", + "com.azure.resourcemanager.batch.fluent.PoolsClient.disableAutoScale": "Microsoft.Batch.Pools.disableAutoScale", + "com.azure.resourcemanager.batch.fluent.PoolsClient.disableAutoScaleWithResponse": "Microsoft.Batch.Pools.disableAutoScale", + "com.azure.resourcemanager.batch.fluent.PoolsClient.get": "Microsoft.Batch.Pools.get", + "com.azure.resourcemanager.batch.fluent.PoolsClient.getWithResponse": "Microsoft.Batch.Pools.get", + "com.azure.resourcemanager.batch.fluent.PoolsClient.listByBatchAccount": "Microsoft.Batch.Pools.listByBatchAccount", + "com.azure.resourcemanager.batch.fluent.PoolsClient.stopResize": "Microsoft.Batch.Pools.stopResize", + "com.azure.resourcemanager.batch.fluent.PoolsClient.stopResizeWithResponse": "Microsoft.Batch.Pools.stopResize", + "com.azure.resourcemanager.batch.fluent.PoolsClient.update": "Microsoft.Batch.Pools.update", + "com.azure.resourcemanager.batch.fluent.PoolsClient.updateWithResponse": "Microsoft.Batch.Pools.update", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.beginDelete": "Microsoft.Batch.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.beginUpdate": "Microsoft.Batch.PrivateEndpointConnections.update", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.delete": "Microsoft.Batch.PrivateEndpointConnections.delete", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.get": "Microsoft.Batch.PrivateEndpointConnections.get", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.getWithResponse": "Microsoft.Batch.PrivateEndpointConnections.get", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.listByBatchAccount": "Microsoft.Batch.PrivateEndpointConnections.listByBatchAccount", + "com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.update": "Microsoft.Batch.PrivateEndpointConnections.update", + "com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient": "Microsoft.Batch", + "com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient.get": "Microsoft.Batch.PrivateLinkResources.get", + "com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient.getWithResponse": "Microsoft.Batch.PrivateLinkResources.get", + "com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient.listByBatchAccount": "Microsoft.Batch.PrivateLinkResources.listByBatchAccount", + "com.azure.resourcemanager.batch.fluent.models.ApplicationInner": "Microsoft.Batch.Application", + "com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner": "Microsoft.Batch.ApplicationPackage", + "com.azure.resourcemanager.batch.fluent.models.ApplicationPackageProperties": "Microsoft.Batch.ApplicationPackageProperties", + "com.azure.resourcemanager.batch.fluent.models.ApplicationProperties": "Microsoft.Batch.ApplicationProperties", + "com.azure.resourcemanager.batch.fluent.models.BatchAccountCreateProperties": "Microsoft.Batch.BatchAccountCreateProperties", + "com.azure.resourcemanager.batch.fluent.models.BatchAccountInner": "Microsoft.Batch.BatchAccount", + "com.azure.resourcemanager.batch.fluent.models.BatchAccountKeysInner": "Microsoft.Batch.BatchAccountKeys", + "com.azure.resourcemanager.batch.fluent.models.BatchAccountProperties": "Microsoft.Batch.BatchAccountProperties", + "com.azure.resourcemanager.batch.fluent.models.BatchAccountUpdateProperties": "Microsoft.Batch.BatchAccountUpdateProperties", + "com.azure.resourcemanager.batch.fluent.models.BatchLocationQuotaInner": "Microsoft.Batch.BatchLocationQuota", + "com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner": "Microsoft.Batch.CheckNameAvailabilityResult", + "com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner": "Microsoft.Batch.DetectorResponse", + "com.azure.resourcemanager.batch.fluent.models.DetectorResponseProperties": "Microsoft.Batch.DetectorResponseProperties", + "com.azure.resourcemanager.batch.fluent.models.NetworkSecurityPerimeterConfigurationInner": "Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfiguration", + "com.azure.resourcemanager.batch.fluent.models.OperationInner": "Microsoft.Batch.Operation", + "com.azure.resourcemanager.batch.fluent.models.OutboundEnvironmentEndpointInner": "Microsoft.Batch.OutboundEnvironmentEndpoint", + "com.azure.resourcemanager.batch.fluent.models.PoolInner": "Microsoft.Batch.Pool", + "com.azure.resourcemanager.batch.fluent.models.PoolProperties": "Microsoft.Batch.PoolProperties", + "com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner": "Microsoft.Batch.PrivateEndpointConnection", + "com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionProperties": "Microsoft.Batch.PrivateEndpointConnectionProperties", + "com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner": "Microsoft.Batch.PrivateLinkResource", + "com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceProperties": "Microsoft.Batch.PrivateLinkResourceProperties", + "com.azure.resourcemanager.batch.fluent.models.SupportedSkuInner": "Microsoft.Batch.SupportedSku", + "com.azure.resourcemanager.batch.implementation.BatchManagementClientBuilder": "Microsoft.Batch", + "com.azure.resourcemanager.batch.implementation.models.BatchAccountListResult": "Microsoft.Batch.BatchAccountListResult", + "com.azure.resourcemanager.batch.implementation.models.DetectorListResult": "Microsoft.Batch.DetectorListResult", + "com.azure.resourcemanager.batch.implementation.models.ListApplicationPackagesResult": "Microsoft.Batch.ListApplicationPackagesResult", + "com.azure.resourcemanager.batch.implementation.models.ListApplicationsResult": "Microsoft.Batch.ListApplicationsResult", + "com.azure.resourcemanager.batch.implementation.models.ListPoolsResult": "Microsoft.Batch.ListPoolsResult", + "com.azure.resourcemanager.batch.implementation.models.ListPrivateEndpointConnectionsResult": "Microsoft.Batch.ListPrivateEndpointConnectionsResult", + "com.azure.resourcemanager.batch.implementation.models.ListPrivateLinkResourcesResult": "Microsoft.Batch.ListPrivateLinkResourcesResult", + "com.azure.resourcemanager.batch.implementation.models.NetworkSecurityPerimeterConfigurationListResult": "Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationListResult", + "com.azure.resourcemanager.batch.implementation.models.OperationListResult": "Microsoft.Batch.OperationListResult", + "com.azure.resourcemanager.batch.implementation.models.OutboundEnvironmentEndpointCollection": "Microsoft.Batch.OutboundEnvironmentEndpointCollection", + "com.azure.resourcemanager.batch.implementation.models.SupportedSkusResult": "Microsoft.Batch.SupportedSkusResult", + "com.azure.resourcemanager.batch.models.AccessRule": "Azure.ResourceManager.CommonTypes.AccessRule", + "com.azure.resourcemanager.batch.models.AccessRuleDirection": "Azure.ResourceManager.CommonTypes.AccessRuleDirection", + "com.azure.resourcemanager.batch.models.AccessRuleProperties": "Azure.ResourceManager.CommonTypes.AccessRuleProperties", + "com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscription": "Azure.ResourceManager.CommonTypes.AccessRuleProperties.subscription.anonymous", + "com.azure.resourcemanager.batch.models.AccountKeyType": "Microsoft.Batch.AccountKeyType", + "com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters": "Microsoft.Batch.ActivateApplicationPackageParameters", + "com.azure.resourcemanager.batch.models.AllocationState": "Microsoft.Batch.AllocationState", + "com.azure.resourcemanager.batch.models.ApplicationPackageReference": "Microsoft.Batch.ApplicationPackageReference", + "com.azure.resourcemanager.batch.models.AuthenticationMode": "Microsoft.Batch.AuthenticationMode", + "com.azure.resourcemanager.batch.models.AutoScaleRun": "Microsoft.Batch.AutoScaleRun", + "com.azure.resourcemanager.batch.models.AutoScaleRunError": "Microsoft.Batch.AutoScaleRunError", + "com.azure.resourcemanager.batch.models.AutoScaleSettings": "Microsoft.Batch.AutoScaleSettings", + "com.azure.resourcemanager.batch.models.AutoStorageAuthenticationMode": "Microsoft.Batch.AutoStorageAuthenticationMode", + "com.azure.resourcemanager.batch.models.AutoStorageBaseProperties": "Microsoft.Batch.AutoStorageBaseProperties", + "com.azure.resourcemanager.batch.models.AutoStorageProperties": "Microsoft.Batch.AutoStorageProperties", + "com.azure.resourcemanager.batch.models.AutoUserScope": "Microsoft.Batch.AutoUserScope", + "com.azure.resourcemanager.batch.models.AutoUserSpecification": "Microsoft.Batch.AutoUserSpecification", + "com.azure.resourcemanager.batch.models.AutomaticOSUpgradePolicy": "Microsoft.Batch.AutomaticOSUpgradePolicy", + "com.azure.resourcemanager.batch.models.AzureBlobFileSystemConfiguration": "Microsoft.Batch.AzureBlobFileSystemConfiguration", + "com.azure.resourcemanager.batch.models.AzureFileShareConfiguration": "Microsoft.Batch.AzureFileShareConfiguration", + "com.azure.resourcemanager.batch.models.BatchAccountCreateParameters": "Microsoft.Batch.BatchAccountCreateParameters", + "com.azure.resourcemanager.batch.models.BatchAccountIdentity": "Microsoft.Batch.BatchAccountIdentity", + "com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters": "Microsoft.Batch.BatchAccountRegenerateKeyParameters", + "com.azure.resourcemanager.batch.models.BatchAccountUpdateParameters": "Microsoft.Batch.BatchAccountUpdateParameters", + "com.azure.resourcemanager.batch.models.BatchPoolIdentity": "Microsoft.Batch.BatchPoolIdentity", + "com.azure.resourcemanager.batch.models.CachingType": "Microsoft.Batch.CachingType", + "com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters": "Microsoft.Batch.CheckNameAvailabilityParameters", + "com.azure.resourcemanager.batch.models.CifsMountConfiguration": "Microsoft.Batch.CifsMountConfiguration", + "com.azure.resourcemanager.batch.models.ComputeNodeDeallocationOption": "Microsoft.Batch.ComputeNodeDeallocationOption", + "com.azure.resourcemanager.batch.models.ComputeNodeFillType": "Microsoft.Batch.ComputeNodeFillType", + "com.azure.resourcemanager.batch.models.ComputeNodeIdentityReference": "Microsoft.Batch.ComputeNodeIdentityReference", + "com.azure.resourcemanager.batch.models.ContainerConfiguration": "Microsoft.Batch.ContainerConfiguration", + "com.azure.resourcemanager.batch.models.ContainerHostBatchBindMountEntry": "Microsoft.Batch.ContainerHostBatchBindMountEntry", + "com.azure.resourcemanager.batch.models.ContainerHostDataPath": "Microsoft.Batch.ContainerHostDataPath", + "com.azure.resourcemanager.batch.models.ContainerRegistry": "Microsoft.Batch.ContainerRegistry", + "com.azure.resourcemanager.batch.models.ContainerType": "Microsoft.Batch.ContainerType", + "com.azure.resourcemanager.batch.models.ContainerWorkingDirectory": "Microsoft.Batch.ContainerWorkingDirectory", + "com.azure.resourcemanager.batch.models.DataDisk": "Microsoft.Batch.DataDisk", + "com.azure.resourcemanager.batch.models.DeploymentConfiguration": "Microsoft.Batch.DeploymentConfiguration", + "com.azure.resourcemanager.batch.models.DiffDiskPlacement": "Microsoft.Batch.DiffDiskPlacement", + "com.azure.resourcemanager.batch.models.DiffDiskSettings": "Microsoft.Batch.DiffDiskSettings", + "com.azure.resourcemanager.batch.models.DiskCustomerManagedKey": "Microsoft.Batch.DiskCustomerManagedKey", + "com.azure.resourcemanager.batch.models.DiskEncryptionConfiguration": "Microsoft.Batch.DiskEncryptionConfiguration", + "com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters": "Microsoft.Batch.DiskEncryptionSetParameters", + "com.azure.resourcemanager.batch.models.DiskEncryptionTarget": "Microsoft.Batch.DiskEncryptionTarget", + "com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope": "Microsoft.Batch.DynamicVNetAssignmentScope", + "com.azure.resourcemanager.batch.models.ElevationLevel": "Microsoft.Batch.ElevationLevel", + "com.azure.resourcemanager.batch.models.EncryptionProperties": "Microsoft.Batch.EncryptionProperties", + "com.azure.resourcemanager.batch.models.EndpointAccessDefaultAction": "Microsoft.Batch.EndpointAccessDefaultAction", + "com.azure.resourcemanager.batch.models.EndpointAccessProfile": "Microsoft.Batch.EndpointAccessProfile", + "com.azure.resourcemanager.batch.models.EndpointDependency": "Microsoft.Batch.EndpointDependency", + "com.azure.resourcemanager.batch.models.EndpointDetail": "Microsoft.Batch.EndpointDetail", + "com.azure.resourcemanager.batch.models.EnvironmentSetting": "Microsoft.Batch.EnvironmentSetting", + "com.azure.resourcemanager.batch.models.FixedScaleSettings": "Microsoft.Batch.FixedScaleSettings", + "com.azure.resourcemanager.batch.models.HostEndpointSettings": "Microsoft.Batch.HostEndpointSettings", + "com.azure.resourcemanager.batch.models.HostEndpointSettingsModeTypes": "Microsoft.Batch.HostEndpointSettingsModeTypes", + "com.azure.resourcemanager.batch.models.IPFamily": "Microsoft.Batch.IPFamily", + "com.azure.resourcemanager.batch.models.IPTag": "Microsoft.Batch.IPTag", + "com.azure.resourcemanager.batch.models.ImageReference": "Microsoft.Batch.ImageReference", + "com.azure.resourcemanager.batch.models.InboundEndpointProtocol": "Microsoft.Batch.InboundEndpointProtocol", + "com.azure.resourcemanager.batch.models.InboundNatPool": "Microsoft.Batch.InboundNatPool", + "com.azure.resourcemanager.batch.models.InterNodeCommunicationState": "Microsoft.Batch.InterNodeCommunicationState", + "com.azure.resourcemanager.batch.models.IpAddressProvisioningType": "Microsoft.Batch.IPAddressProvisioningType", + "com.azure.resourcemanager.batch.models.IpRule": "Microsoft.Batch.IPRule", + "com.azure.resourcemanager.batch.models.IpRuleAction": "Microsoft.Batch.IPRuleAction", + "com.azure.resourcemanager.batch.models.IssueType": "Azure.ResourceManager.CommonTypes.IssueType", + "com.azure.resourcemanager.batch.models.JobDefaultOrder": "Microsoft.Batch.JobDefaultOrder", + "com.azure.resourcemanager.batch.models.KeySource": "Microsoft.Batch.KeySource", + "com.azure.resourcemanager.batch.models.KeyVaultProperties": "Microsoft.Batch.KeyVaultProperties", + "com.azure.resourcemanager.batch.models.KeyVaultReference": "Microsoft.Batch.KeyVaultReference", + "com.azure.resourcemanager.batch.models.LinuxUserConfiguration": "Microsoft.Batch.LinuxUserConfiguration", + "com.azure.resourcemanager.batch.models.LoginMode": "Microsoft.Batch.LoginMode", + "com.azure.resourcemanager.batch.models.ManagedDisk": "Microsoft.Batch.ManagedDisk", + "com.azure.resourcemanager.batch.models.MetadataItem": "Microsoft.Batch.MetadataItem", + "com.azure.resourcemanager.batch.models.MountConfiguration": "Microsoft.Batch.MountConfiguration", + "com.azure.resourcemanager.batch.models.NameAvailabilityReason": "Microsoft.Batch.NameAvailabilityReason", + "com.azure.resourcemanager.batch.models.NetworkConfiguration": "Microsoft.Batch.NetworkConfiguration", + "com.azure.resourcemanager.batch.models.NetworkProfile": "Microsoft.Batch.NetworkProfile", + "com.azure.resourcemanager.batch.models.NetworkSecurityGroupRule": "Microsoft.Batch.NetworkSecurityGroupRule", + "com.azure.resourcemanager.batch.models.NetworkSecurityGroupRuleAccess": "Microsoft.Batch.NetworkSecurityGroupRuleAccess", + "com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter": "Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeter", + "com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationProperties": "Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationProperties", + "com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationProvisioningState": "Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationProvisioningState", + "com.azure.resourcemanager.batch.models.NetworkSecurityProfile": "Azure.ResourceManager.CommonTypes.NetworkSecurityProfile", + "com.azure.resourcemanager.batch.models.NfsMountConfiguration": "Microsoft.Batch.NFSMountConfiguration", + "com.azure.resourcemanager.batch.models.NodePlacementConfiguration": "Microsoft.Batch.NodePlacementConfiguration", + "com.azure.resourcemanager.batch.models.NodePlacementPolicyType": "Microsoft.Batch.NodePlacementPolicyType", + "com.azure.resourcemanager.batch.models.OSDisk": "Microsoft.Batch.OSDisk", + "com.azure.resourcemanager.batch.models.OperationDisplay": "Microsoft.Batch.OperationDisplay", + "com.azure.resourcemanager.batch.models.PackageState": "Microsoft.Batch.PackageState", + "com.azure.resourcemanager.batch.models.PoolAllocationMode": "Microsoft.Batch.PoolAllocationMode", + "com.azure.resourcemanager.batch.models.PoolEndpointConfiguration": "Microsoft.Batch.PoolEndpointConfiguration", + "com.azure.resourcemanager.batch.models.PoolIdentityType": "Microsoft.Batch.PoolIdentityType", + "com.azure.resourcemanager.batch.models.PoolProvisioningState": "Microsoft.Batch.PoolProvisioningState", + "com.azure.resourcemanager.batch.models.PoolsCreateHeaders": null, + "com.azure.resourcemanager.batch.models.PoolsDisableAutoScaleHeaders": null, + "com.azure.resourcemanager.batch.models.PoolsGetHeaders": null, + "com.azure.resourcemanager.batch.models.PoolsStopResizeHeaders": null, + "com.azure.resourcemanager.batch.models.PoolsUpdateHeaders": null, + "com.azure.resourcemanager.batch.models.PrivateEndpoint": "Microsoft.Batch.PrivateEndpoint", + "com.azure.resourcemanager.batch.models.PrivateEndpointConnectionProvisioningState": "Microsoft.Batch.PrivateEndpointConnectionProvisioningState", + "com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState": "Microsoft.Batch.PrivateLinkServiceConnectionState", + "com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus": "Microsoft.Batch.PrivateLinkServiceConnectionStatus", + "com.azure.resourcemanager.batch.models.ProvisioningIssue": "Azure.ResourceManager.CommonTypes.ProvisioningIssue", + "com.azure.resourcemanager.batch.models.ProvisioningIssueProperties": "Azure.ResourceManager.CommonTypes.ProvisioningIssueProperties", + "com.azure.resourcemanager.batch.models.ProvisioningState": "Microsoft.Batch.ProvisioningState", + "com.azure.resourcemanager.batch.models.ProxyAgentSettings": "Microsoft.Batch.ProxyAgentSettings", + "com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration": "Microsoft.Batch.PublicIPAddressConfiguration", + "com.azure.resourcemanager.batch.models.PublicNetworkAccessType": "Microsoft.Batch.PublicNetworkAccessType", + "com.azure.resourcemanager.batch.models.ResizeError": "Microsoft.Batch.ResizeError", + "com.azure.resourcemanager.batch.models.ResizeOperationStatus": "Microsoft.Batch.ResizeOperationStatus", + "com.azure.resourcemanager.batch.models.ResourceAssociation": "Azure.ResourceManager.CommonTypes.ResourceAssociation", + "com.azure.resourcemanager.batch.models.ResourceAssociationAccessMode": "Azure.ResourceManager.CommonTypes.ResourceAssociationAccessMode", + "com.azure.resourcemanager.batch.models.ResourceFile": "Microsoft.Batch.ResourceFile", + "com.azure.resourcemanager.batch.models.ResourceIdentityType": "Microsoft.Batch.ResourceIdentityType", + "com.azure.resourcemanager.batch.models.ResourceType": "Microsoft.Batch.ResourceType", + "com.azure.resourcemanager.batch.models.RollingUpgradePolicy": "Microsoft.Batch.RollingUpgradePolicy", + "com.azure.resourcemanager.batch.models.ScaleSettings": "Microsoft.Batch.ScaleSettings", + "com.azure.resourcemanager.batch.models.SecurityEncryptionTypes": "Microsoft.Batch.SecurityEncryptionTypes", + "com.azure.resourcemanager.batch.models.SecurityProfile": "Microsoft.Batch.SecurityProfile", + "com.azure.resourcemanager.batch.models.SecurityTypes": "Microsoft.Batch.SecurityTypes", + "com.azure.resourcemanager.batch.models.ServiceArtifactReference": "Microsoft.Batch.ServiceArtifactReference", + "com.azure.resourcemanager.batch.models.Severity": "Azure.ResourceManager.CommonTypes.Severity", + "com.azure.resourcemanager.batch.models.SkuCapability": "Microsoft.Batch.SkuCapability", + "com.azure.resourcemanager.batch.models.StartTask": "Microsoft.Batch.StartTask", + "com.azure.resourcemanager.batch.models.StorageAccountType": "Microsoft.Batch.StorageAccountType", + "com.azure.resourcemanager.batch.models.TaskContainerSettings": "Microsoft.Batch.TaskContainerSettings", + "com.azure.resourcemanager.batch.models.TaskSchedulingPolicy": "Microsoft.Batch.TaskSchedulingPolicy", + "com.azure.resourcemanager.batch.models.UefiSettings": "Microsoft.Batch.UefiSettings", + "com.azure.resourcemanager.batch.models.UpgradeMode": "Microsoft.Batch.UpgradeMode", + "com.azure.resourcemanager.batch.models.UpgradePolicy": "Microsoft.Batch.UpgradePolicy", + "com.azure.resourcemanager.batch.models.UserAccount": "Microsoft.Batch.UserAccount", + "com.azure.resourcemanager.batch.models.UserAssignedIdentities": "Microsoft.Batch.UserAssignedIdentities", + "com.azure.resourcemanager.batch.models.UserIdentity": "Microsoft.Batch.UserIdentity", + "com.azure.resourcemanager.batch.models.VMDiskSecurityProfile": "Microsoft.Batch.VMDiskSecurityProfile", + "com.azure.resourcemanager.batch.models.VMExtension": "Microsoft.Batch.VMExtension", + "com.azure.resourcemanager.batch.models.VirtualMachineConfiguration": "Microsoft.Batch.VirtualMachineConfiguration", + "com.azure.resourcemanager.batch.models.VirtualMachineFamilyCoreQuota": "Microsoft.Batch.VirtualMachineFamilyCoreQuota", + "com.azure.resourcemanager.batch.models.WindowsConfiguration": "Microsoft.Batch.WindowsConfiguration", + "com.azure.resourcemanager.batch.models.WindowsUserConfiguration": "Microsoft.Batch.WindowsUserConfiguration" + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/azure-resourcemanager-batch_metadata.json b/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/azure-resourcemanager-batch_metadata.json new file mode 100644 index 000000000000..091fc67b6ec4 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/azure-resourcemanager-batch_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersion":"2025-06-01","crossLanguageDefinitions":{"com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.activate":"Microsoft.Batch.ApplicationPackages.activate","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.activateWithResponse":"Microsoft.Batch.ApplicationPackages.activate","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.create":"Microsoft.Batch.ApplicationPackages.create","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.createWithResponse":"Microsoft.Batch.ApplicationPackages.create","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.delete":"Microsoft.Batch.ApplicationPackages.delete","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.deleteWithResponse":"Microsoft.Batch.ApplicationPackages.delete","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.get":"Microsoft.Batch.ApplicationPackages.get","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.getWithResponse":"Microsoft.Batch.ApplicationPackages.get","com.azure.resourcemanager.batch.fluent.ApplicationPackagesClient.list":"Microsoft.Batch.ApplicationPackages.list","com.azure.resourcemanager.batch.fluent.ApplicationsClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.ApplicationsClient.create":"Microsoft.Batch.Applications.create","com.azure.resourcemanager.batch.fluent.ApplicationsClient.createWithResponse":"Microsoft.Batch.Applications.create","com.azure.resourcemanager.batch.fluent.ApplicationsClient.delete":"Microsoft.Batch.Applications.delete","com.azure.resourcemanager.batch.fluent.ApplicationsClient.deleteWithResponse":"Microsoft.Batch.Applications.delete","com.azure.resourcemanager.batch.fluent.ApplicationsClient.get":"Microsoft.Batch.Applications.get","com.azure.resourcemanager.batch.fluent.ApplicationsClient.getWithResponse":"Microsoft.Batch.Applications.get","com.azure.resourcemanager.batch.fluent.ApplicationsClient.list":"Microsoft.Batch.Applications.list","com.azure.resourcemanager.batch.fluent.ApplicationsClient.update":"Microsoft.Batch.Applications.update","com.azure.resourcemanager.batch.fluent.ApplicationsClient.updateWithResponse":"Microsoft.Batch.Applications.update","com.azure.resourcemanager.batch.fluent.BatchAccountsClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.beginCreate":"Microsoft.Batch.BatchAccounts.create","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.beginDelete":"Microsoft.Batch.BatchAccounts.delete","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.create":"Microsoft.Batch.BatchAccounts.create","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.delete":"Microsoft.Batch.BatchAccounts.delete","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getByResourceGroup":"Microsoft.Batch.BatchAccounts.get","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getByResourceGroupWithResponse":"Microsoft.Batch.BatchAccounts.get","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getDetector":"Microsoft.Batch.DetectorResponses.getDetector","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getDetectorWithResponse":"Microsoft.Batch.DetectorResponses.getDetector","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getKeys":"Microsoft.Batch.BatchAccounts.getKeys","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.getKeysWithResponse":"Microsoft.Batch.BatchAccounts.getKeys","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.list":"Microsoft.Batch.BatchAccounts.list","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.listByResourceGroup":"Microsoft.Batch.BatchAccounts.listByResourceGroup","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.listDetectors":"Microsoft.Batch.DetectorResponses.listDetectors","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.listOutboundNetworkDependenciesEndpoints":"Microsoft.Batch.BatchAccounts.listOutboundNetworkDependenciesEndpoints","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.regenerateKey":"Microsoft.Batch.BatchAccounts.regenerateKey","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.regenerateKeyWithResponse":"Microsoft.Batch.BatchAccounts.regenerateKey","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.synchronizeAutoStorageKeys":"Microsoft.Batch.BatchAccounts.synchronizeAutoStorageKeys","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.synchronizeAutoStorageKeysWithResponse":"Microsoft.Batch.BatchAccounts.synchronizeAutoStorageKeys","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.update":"Microsoft.Batch.BatchAccounts.update","com.azure.resourcemanager.batch.fluent.BatchAccountsClient.updateWithResponse":"Microsoft.Batch.BatchAccounts.update","com.azure.resourcemanager.batch.fluent.BatchManagementClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.LocationsClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.LocationsClient.checkNameAvailability":"Microsoft.Batch.LocationOperationGroup.checkNameAvailability","com.azure.resourcemanager.batch.fluent.LocationsClient.checkNameAvailabilityWithResponse":"Microsoft.Batch.LocationOperationGroup.checkNameAvailability","com.azure.resourcemanager.batch.fluent.LocationsClient.getQuotas":"Microsoft.Batch.LocationOperationGroup.getQuotas","com.azure.resourcemanager.batch.fluent.LocationsClient.getQuotasWithResponse":"Microsoft.Batch.LocationOperationGroup.getQuotas","com.azure.resourcemanager.batch.fluent.LocationsClient.listSupportedVirtualMachineSkus":"Microsoft.Batch.LocationOperationGroup.listSupportedVirtualMachineSkus","com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.beginReconcileConfiguration":"Microsoft.Batch.NetworkSecurityPerimeterConfigurations.reconcileConfiguration","com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.getConfiguration":"Microsoft.Batch.NetworkSecurityPerimeterConfigurations.getConfiguration","com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.getConfigurationWithResponse":"Microsoft.Batch.NetworkSecurityPerimeterConfigurations.getConfiguration","com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.listConfigurations":"Microsoft.Batch.NetworkSecurityPerimeterConfigurations.listConfigurations","com.azure.resourcemanager.batch.fluent.NetworkSecurityPerimetersClient.reconcileConfiguration":"Microsoft.Batch.NetworkSecurityPerimeterConfigurations.reconcileConfiguration","com.azure.resourcemanager.batch.fluent.OperationsClient":"Microsoft.Batch.Operations","com.azure.resourcemanager.batch.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.batch.fluent.PoolsClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.PoolsClient.beginDelete":"Microsoft.Batch.Pools.delete","com.azure.resourcemanager.batch.fluent.PoolsClient.create":"Microsoft.Batch.Pools.create","com.azure.resourcemanager.batch.fluent.PoolsClient.createWithResponse":"Microsoft.Batch.Pools.create","com.azure.resourcemanager.batch.fluent.PoolsClient.delete":"Microsoft.Batch.Pools.delete","com.azure.resourcemanager.batch.fluent.PoolsClient.disableAutoScale":"Microsoft.Batch.Pools.disableAutoScale","com.azure.resourcemanager.batch.fluent.PoolsClient.disableAutoScaleWithResponse":"Microsoft.Batch.Pools.disableAutoScale","com.azure.resourcemanager.batch.fluent.PoolsClient.get":"Microsoft.Batch.Pools.get","com.azure.resourcemanager.batch.fluent.PoolsClient.getWithResponse":"Microsoft.Batch.Pools.get","com.azure.resourcemanager.batch.fluent.PoolsClient.listByBatchAccount":"Microsoft.Batch.Pools.listByBatchAccount","com.azure.resourcemanager.batch.fluent.PoolsClient.stopResize":"Microsoft.Batch.Pools.stopResize","com.azure.resourcemanager.batch.fluent.PoolsClient.stopResizeWithResponse":"Microsoft.Batch.Pools.stopResize","com.azure.resourcemanager.batch.fluent.PoolsClient.update":"Microsoft.Batch.Pools.update","com.azure.resourcemanager.batch.fluent.PoolsClient.updateWithResponse":"Microsoft.Batch.Pools.update","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.beginDelete":"Microsoft.Batch.PrivateEndpointConnections.delete","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.beginUpdate":"Microsoft.Batch.PrivateEndpointConnections.update","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.Batch.PrivateEndpointConnections.delete","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.Batch.PrivateEndpointConnections.get","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.Batch.PrivateEndpointConnections.get","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.listByBatchAccount":"Microsoft.Batch.PrivateEndpointConnections.listByBatchAccount","com.azure.resourcemanager.batch.fluent.PrivateEndpointConnectionsClient.update":"Microsoft.Batch.PrivateEndpointConnections.update","com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient":"Microsoft.Batch","com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient.get":"Microsoft.Batch.PrivateLinkResources.get","com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient.getWithResponse":"Microsoft.Batch.PrivateLinkResources.get","com.azure.resourcemanager.batch.fluent.PrivateLinkResourcesClient.listByBatchAccount":"Microsoft.Batch.PrivateLinkResources.listByBatchAccount","com.azure.resourcemanager.batch.fluent.models.ApplicationInner":"Microsoft.Batch.Application","com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner":"Microsoft.Batch.ApplicationPackage","com.azure.resourcemanager.batch.fluent.models.ApplicationPackageProperties":"Microsoft.Batch.ApplicationPackageProperties","com.azure.resourcemanager.batch.fluent.models.ApplicationProperties":"Microsoft.Batch.ApplicationProperties","com.azure.resourcemanager.batch.fluent.models.BatchAccountCreateProperties":"Microsoft.Batch.BatchAccountCreateProperties","com.azure.resourcemanager.batch.fluent.models.BatchAccountInner":"Microsoft.Batch.BatchAccount","com.azure.resourcemanager.batch.fluent.models.BatchAccountKeysInner":"Microsoft.Batch.BatchAccountKeys","com.azure.resourcemanager.batch.fluent.models.BatchAccountProperties":"Microsoft.Batch.BatchAccountProperties","com.azure.resourcemanager.batch.fluent.models.BatchAccountUpdateProperties":"Microsoft.Batch.BatchAccountUpdateProperties","com.azure.resourcemanager.batch.fluent.models.BatchLocationQuotaInner":"Microsoft.Batch.BatchLocationQuota","com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner":"Microsoft.Batch.CheckNameAvailabilityResult","com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner":"Microsoft.Batch.DetectorResponse","com.azure.resourcemanager.batch.fluent.models.DetectorResponseProperties":"Microsoft.Batch.DetectorResponseProperties","com.azure.resourcemanager.batch.fluent.models.NetworkSecurityPerimeterConfigurationInner":"Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfiguration","com.azure.resourcemanager.batch.fluent.models.OperationInner":"Microsoft.Batch.Operation","com.azure.resourcemanager.batch.fluent.models.OutboundEnvironmentEndpointInner":"Microsoft.Batch.OutboundEnvironmentEndpoint","com.azure.resourcemanager.batch.fluent.models.PoolInner":"Microsoft.Batch.Pool","com.azure.resourcemanager.batch.fluent.models.PoolProperties":"Microsoft.Batch.PoolProperties","com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner":"Microsoft.Batch.PrivateEndpointConnection","com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionProperties":"Microsoft.Batch.PrivateEndpointConnectionProperties","com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner":"Microsoft.Batch.PrivateLinkResource","com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceProperties":"Microsoft.Batch.PrivateLinkResourceProperties","com.azure.resourcemanager.batch.fluent.models.SupportedSkuInner":"Microsoft.Batch.SupportedSku","com.azure.resourcemanager.batch.implementation.BatchManagementClientBuilder":"Microsoft.Batch","com.azure.resourcemanager.batch.implementation.models.BatchAccountListResult":"Microsoft.Batch.BatchAccountListResult","com.azure.resourcemanager.batch.implementation.models.DetectorListResult":"Microsoft.Batch.DetectorListResult","com.azure.resourcemanager.batch.implementation.models.ListApplicationPackagesResult":"Microsoft.Batch.ListApplicationPackagesResult","com.azure.resourcemanager.batch.implementation.models.ListApplicationsResult":"Microsoft.Batch.ListApplicationsResult","com.azure.resourcemanager.batch.implementation.models.ListPoolsResult":"Microsoft.Batch.ListPoolsResult","com.azure.resourcemanager.batch.implementation.models.ListPrivateEndpointConnectionsResult":"Microsoft.Batch.ListPrivateEndpointConnectionsResult","com.azure.resourcemanager.batch.implementation.models.ListPrivateLinkResourcesResult":"Microsoft.Batch.ListPrivateLinkResourcesResult","com.azure.resourcemanager.batch.implementation.models.NetworkSecurityPerimeterConfigurationListResult":"Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationListResult","com.azure.resourcemanager.batch.implementation.models.OperationListResult":"Microsoft.Batch.OperationListResult","com.azure.resourcemanager.batch.implementation.models.OutboundEnvironmentEndpointCollection":"Microsoft.Batch.OutboundEnvironmentEndpointCollection","com.azure.resourcemanager.batch.implementation.models.SupportedSkusResult":"Microsoft.Batch.SupportedSkusResult","com.azure.resourcemanager.batch.models.AccessRule":"Azure.ResourceManager.CommonTypes.AccessRule","com.azure.resourcemanager.batch.models.AccessRuleDirection":"Azure.ResourceManager.CommonTypes.AccessRuleDirection","com.azure.resourcemanager.batch.models.AccessRuleProperties":"Azure.ResourceManager.CommonTypes.AccessRuleProperties","com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscription":"Azure.ResourceManager.CommonTypes.AccessRuleProperties.subscription.anonymous","com.azure.resourcemanager.batch.models.AccountKeyType":"Microsoft.Batch.AccountKeyType","com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters":"Microsoft.Batch.ActivateApplicationPackageParameters","com.azure.resourcemanager.batch.models.AllocationState":"Microsoft.Batch.AllocationState","com.azure.resourcemanager.batch.models.ApplicationPackageReference":"Microsoft.Batch.ApplicationPackageReference","com.azure.resourcemanager.batch.models.AuthenticationMode":"Microsoft.Batch.AuthenticationMode","com.azure.resourcemanager.batch.models.AutoScaleRun":"Microsoft.Batch.AutoScaleRun","com.azure.resourcemanager.batch.models.AutoScaleRunError":"Microsoft.Batch.AutoScaleRunError","com.azure.resourcemanager.batch.models.AutoScaleSettings":"Microsoft.Batch.AutoScaleSettings","com.azure.resourcemanager.batch.models.AutoStorageAuthenticationMode":"Microsoft.Batch.AutoStorageAuthenticationMode","com.azure.resourcemanager.batch.models.AutoStorageBaseProperties":"Microsoft.Batch.AutoStorageBaseProperties","com.azure.resourcemanager.batch.models.AutoStorageProperties":"Microsoft.Batch.AutoStorageProperties","com.azure.resourcemanager.batch.models.AutoUserScope":"Microsoft.Batch.AutoUserScope","com.azure.resourcemanager.batch.models.AutoUserSpecification":"Microsoft.Batch.AutoUserSpecification","com.azure.resourcemanager.batch.models.AutomaticOSUpgradePolicy":"Microsoft.Batch.AutomaticOSUpgradePolicy","com.azure.resourcemanager.batch.models.AzureBlobFileSystemConfiguration":"Microsoft.Batch.AzureBlobFileSystemConfiguration","com.azure.resourcemanager.batch.models.AzureFileShareConfiguration":"Microsoft.Batch.AzureFileShareConfiguration","com.azure.resourcemanager.batch.models.BatchAccountCreateParameters":"Microsoft.Batch.BatchAccountCreateParameters","com.azure.resourcemanager.batch.models.BatchAccountIdentity":"Microsoft.Batch.BatchAccountIdentity","com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters":"Microsoft.Batch.BatchAccountRegenerateKeyParameters","com.azure.resourcemanager.batch.models.BatchAccountUpdateParameters":"Microsoft.Batch.BatchAccountUpdateParameters","com.azure.resourcemanager.batch.models.BatchPoolIdentity":"Microsoft.Batch.BatchPoolIdentity","com.azure.resourcemanager.batch.models.CachingType":"Microsoft.Batch.CachingType","com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters":"Microsoft.Batch.CheckNameAvailabilityParameters","com.azure.resourcemanager.batch.models.CifsMountConfiguration":"Microsoft.Batch.CifsMountConfiguration","com.azure.resourcemanager.batch.models.ComputeNodeDeallocationOption":"Microsoft.Batch.ComputeNodeDeallocationOption","com.azure.resourcemanager.batch.models.ComputeNodeFillType":"Microsoft.Batch.ComputeNodeFillType","com.azure.resourcemanager.batch.models.ComputeNodeIdentityReference":"Microsoft.Batch.ComputeNodeIdentityReference","com.azure.resourcemanager.batch.models.ContainerConfiguration":"Microsoft.Batch.ContainerConfiguration","com.azure.resourcemanager.batch.models.ContainerHostBatchBindMountEntry":"Microsoft.Batch.ContainerHostBatchBindMountEntry","com.azure.resourcemanager.batch.models.ContainerHostDataPath":"Microsoft.Batch.ContainerHostDataPath","com.azure.resourcemanager.batch.models.ContainerRegistry":"Microsoft.Batch.ContainerRegistry","com.azure.resourcemanager.batch.models.ContainerType":"Microsoft.Batch.ContainerType","com.azure.resourcemanager.batch.models.ContainerWorkingDirectory":"Microsoft.Batch.ContainerWorkingDirectory","com.azure.resourcemanager.batch.models.DataDisk":"Microsoft.Batch.DataDisk","com.azure.resourcemanager.batch.models.DeploymentConfiguration":"Microsoft.Batch.DeploymentConfiguration","com.azure.resourcemanager.batch.models.DiffDiskPlacement":"Microsoft.Batch.DiffDiskPlacement","com.azure.resourcemanager.batch.models.DiffDiskSettings":"Microsoft.Batch.DiffDiskSettings","com.azure.resourcemanager.batch.models.DiskCustomerManagedKey":"Microsoft.Batch.DiskCustomerManagedKey","com.azure.resourcemanager.batch.models.DiskEncryptionConfiguration":"Microsoft.Batch.DiskEncryptionConfiguration","com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters":"Microsoft.Batch.DiskEncryptionSetParameters","com.azure.resourcemanager.batch.models.DiskEncryptionTarget":"Microsoft.Batch.DiskEncryptionTarget","com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope":"Microsoft.Batch.DynamicVNetAssignmentScope","com.azure.resourcemanager.batch.models.ElevationLevel":"Microsoft.Batch.ElevationLevel","com.azure.resourcemanager.batch.models.EncryptionProperties":"Microsoft.Batch.EncryptionProperties","com.azure.resourcemanager.batch.models.EndpointAccessDefaultAction":"Microsoft.Batch.EndpointAccessDefaultAction","com.azure.resourcemanager.batch.models.EndpointAccessProfile":"Microsoft.Batch.EndpointAccessProfile","com.azure.resourcemanager.batch.models.EndpointDependency":"Microsoft.Batch.EndpointDependency","com.azure.resourcemanager.batch.models.EndpointDetail":"Microsoft.Batch.EndpointDetail","com.azure.resourcemanager.batch.models.EnvironmentSetting":"Microsoft.Batch.EnvironmentSetting","com.azure.resourcemanager.batch.models.FixedScaleSettings":"Microsoft.Batch.FixedScaleSettings","com.azure.resourcemanager.batch.models.HostEndpointSettings":"Microsoft.Batch.HostEndpointSettings","com.azure.resourcemanager.batch.models.HostEndpointSettingsModeTypes":"Microsoft.Batch.HostEndpointSettingsModeTypes","com.azure.resourcemanager.batch.models.IPFamily":"Microsoft.Batch.IPFamily","com.azure.resourcemanager.batch.models.IPTag":"Microsoft.Batch.IPTag","com.azure.resourcemanager.batch.models.ImageReference":"Microsoft.Batch.ImageReference","com.azure.resourcemanager.batch.models.InboundEndpointProtocol":"Microsoft.Batch.InboundEndpointProtocol","com.azure.resourcemanager.batch.models.InboundNatPool":"Microsoft.Batch.InboundNatPool","com.azure.resourcemanager.batch.models.InterNodeCommunicationState":"Microsoft.Batch.InterNodeCommunicationState","com.azure.resourcemanager.batch.models.IpAddressProvisioningType":"Microsoft.Batch.IPAddressProvisioningType","com.azure.resourcemanager.batch.models.IpRule":"Microsoft.Batch.IPRule","com.azure.resourcemanager.batch.models.IpRuleAction":"Microsoft.Batch.IPRuleAction","com.azure.resourcemanager.batch.models.IssueType":"Azure.ResourceManager.CommonTypes.IssueType","com.azure.resourcemanager.batch.models.JobDefaultOrder":"Microsoft.Batch.JobDefaultOrder","com.azure.resourcemanager.batch.models.KeySource":"Microsoft.Batch.KeySource","com.azure.resourcemanager.batch.models.KeyVaultProperties":"Microsoft.Batch.KeyVaultProperties","com.azure.resourcemanager.batch.models.KeyVaultReference":"Microsoft.Batch.KeyVaultReference","com.azure.resourcemanager.batch.models.LinuxUserConfiguration":"Microsoft.Batch.LinuxUserConfiguration","com.azure.resourcemanager.batch.models.LoginMode":"Microsoft.Batch.LoginMode","com.azure.resourcemanager.batch.models.ManagedDisk":"Microsoft.Batch.ManagedDisk","com.azure.resourcemanager.batch.models.MetadataItem":"Microsoft.Batch.MetadataItem","com.azure.resourcemanager.batch.models.MountConfiguration":"Microsoft.Batch.MountConfiguration","com.azure.resourcemanager.batch.models.NameAvailabilityReason":"Microsoft.Batch.NameAvailabilityReason","com.azure.resourcemanager.batch.models.NetworkConfiguration":"Microsoft.Batch.NetworkConfiguration","com.azure.resourcemanager.batch.models.NetworkProfile":"Microsoft.Batch.NetworkProfile","com.azure.resourcemanager.batch.models.NetworkSecurityGroupRule":"Microsoft.Batch.NetworkSecurityGroupRule","com.azure.resourcemanager.batch.models.NetworkSecurityGroupRuleAccess":"Microsoft.Batch.NetworkSecurityGroupRuleAccess","com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter":"Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeter","com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationProperties":"Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationProperties","com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationProvisioningState":"Azure.ResourceManager.CommonTypes.NetworkSecurityPerimeterConfigurationProvisioningState","com.azure.resourcemanager.batch.models.NetworkSecurityProfile":"Azure.ResourceManager.CommonTypes.NetworkSecurityProfile","com.azure.resourcemanager.batch.models.NfsMountConfiguration":"Microsoft.Batch.NFSMountConfiguration","com.azure.resourcemanager.batch.models.NodePlacementConfiguration":"Microsoft.Batch.NodePlacementConfiguration","com.azure.resourcemanager.batch.models.NodePlacementPolicyType":"Microsoft.Batch.NodePlacementPolicyType","com.azure.resourcemanager.batch.models.OSDisk":"Microsoft.Batch.OSDisk","com.azure.resourcemanager.batch.models.OperationDisplay":"Microsoft.Batch.OperationDisplay","com.azure.resourcemanager.batch.models.PackageState":"Microsoft.Batch.PackageState","com.azure.resourcemanager.batch.models.PoolAllocationMode":"Microsoft.Batch.PoolAllocationMode","com.azure.resourcemanager.batch.models.PoolEndpointConfiguration":"Microsoft.Batch.PoolEndpointConfiguration","com.azure.resourcemanager.batch.models.PoolIdentityType":"Microsoft.Batch.PoolIdentityType","com.azure.resourcemanager.batch.models.PoolProvisioningState":"Microsoft.Batch.PoolProvisioningState","com.azure.resourcemanager.batch.models.PoolsCreateHeaders":null,"com.azure.resourcemanager.batch.models.PoolsDisableAutoScaleHeaders":null,"com.azure.resourcemanager.batch.models.PoolsGetHeaders":null,"com.azure.resourcemanager.batch.models.PoolsStopResizeHeaders":null,"com.azure.resourcemanager.batch.models.PoolsUpdateHeaders":null,"com.azure.resourcemanager.batch.models.PrivateEndpoint":"Microsoft.Batch.PrivateEndpoint","com.azure.resourcemanager.batch.models.PrivateEndpointConnectionProvisioningState":"Microsoft.Batch.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState":"Microsoft.Batch.PrivateLinkServiceConnectionState","com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus":"Microsoft.Batch.PrivateLinkServiceConnectionStatus","com.azure.resourcemanager.batch.models.ProvisioningIssue":"Azure.ResourceManager.CommonTypes.ProvisioningIssue","com.azure.resourcemanager.batch.models.ProvisioningIssueProperties":"Azure.ResourceManager.CommonTypes.ProvisioningIssueProperties","com.azure.resourcemanager.batch.models.ProvisioningState":"Microsoft.Batch.ProvisioningState","com.azure.resourcemanager.batch.models.ProxyAgentSettings":"Microsoft.Batch.ProxyAgentSettings","com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration":"Microsoft.Batch.PublicIPAddressConfiguration","com.azure.resourcemanager.batch.models.PublicNetworkAccessType":"Microsoft.Batch.PublicNetworkAccessType","com.azure.resourcemanager.batch.models.ResizeError":"Microsoft.Batch.ResizeError","com.azure.resourcemanager.batch.models.ResizeOperationStatus":"Microsoft.Batch.ResizeOperationStatus","com.azure.resourcemanager.batch.models.ResourceAssociation":"Azure.ResourceManager.CommonTypes.ResourceAssociation","com.azure.resourcemanager.batch.models.ResourceAssociationAccessMode":"Azure.ResourceManager.CommonTypes.ResourceAssociationAccessMode","com.azure.resourcemanager.batch.models.ResourceFile":"Microsoft.Batch.ResourceFile","com.azure.resourcemanager.batch.models.ResourceIdentityType":"Microsoft.Batch.ResourceIdentityType","com.azure.resourcemanager.batch.models.ResourceType":"Microsoft.Batch.ResourceType","com.azure.resourcemanager.batch.models.RollingUpgradePolicy":"Microsoft.Batch.RollingUpgradePolicy","com.azure.resourcemanager.batch.models.ScaleSettings":"Microsoft.Batch.ScaleSettings","com.azure.resourcemanager.batch.models.SecurityEncryptionTypes":"Microsoft.Batch.SecurityEncryptionTypes","com.azure.resourcemanager.batch.models.SecurityProfile":"Microsoft.Batch.SecurityProfile","com.azure.resourcemanager.batch.models.SecurityTypes":"Microsoft.Batch.SecurityTypes","com.azure.resourcemanager.batch.models.ServiceArtifactReference":"Microsoft.Batch.ServiceArtifactReference","com.azure.resourcemanager.batch.models.Severity":"Azure.ResourceManager.CommonTypes.Severity","com.azure.resourcemanager.batch.models.SkuCapability":"Microsoft.Batch.SkuCapability","com.azure.resourcemanager.batch.models.StartTask":"Microsoft.Batch.StartTask","com.azure.resourcemanager.batch.models.StorageAccountType":"Microsoft.Batch.StorageAccountType","com.azure.resourcemanager.batch.models.TaskContainerSettings":"Microsoft.Batch.TaskContainerSettings","com.azure.resourcemanager.batch.models.TaskSchedulingPolicy":"Microsoft.Batch.TaskSchedulingPolicy","com.azure.resourcemanager.batch.models.UefiSettings":"Microsoft.Batch.UefiSettings","com.azure.resourcemanager.batch.models.UpgradeMode":"Microsoft.Batch.UpgradeMode","com.azure.resourcemanager.batch.models.UpgradePolicy":"Microsoft.Batch.UpgradePolicy","com.azure.resourcemanager.batch.models.UserAccount":"Microsoft.Batch.UserAccount","com.azure.resourcemanager.batch.models.UserAssignedIdentities":"Microsoft.Batch.UserAssignedIdentities","com.azure.resourcemanager.batch.models.UserIdentity":"Microsoft.Batch.UserIdentity","com.azure.resourcemanager.batch.models.VMDiskSecurityProfile":"Microsoft.Batch.VMDiskSecurityProfile","com.azure.resourcemanager.batch.models.VMExtension":"Microsoft.Batch.VMExtension","com.azure.resourcemanager.batch.models.VirtualMachineConfiguration":"Microsoft.Batch.VirtualMachineConfiguration","com.azure.resourcemanager.batch.models.VirtualMachineFamilyCoreQuota":"Microsoft.Batch.VirtualMachineFamilyCoreQuota","com.azure.resourcemanager.batch.models.WindowsConfiguration":"Microsoft.Batch.WindowsConfiguration","com.azure.resourcemanager.batch.models.WindowsUserConfiguration":"Microsoft.Batch.WindowsUserConfiguration"},"generatedFiles":["src/main/java/com/azure/resourcemanager/batch/BatchManager.java","src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationPackagesClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/ApplicationsClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/BatchAccountsClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/BatchManagementClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/LocationsClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/NetworkSecurityPerimetersClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/PoolsClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationPackageProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/ApplicationProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountCreateProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountKeysInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchAccountUpdateProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/BatchLocationQuotaInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/CheckNameAvailabilityResultInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/DetectorResponseProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/OperationInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/OutboundEnvironmentEndpointInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/PoolProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/SupportedSkuInner.java","src/main/java/com/azure/resourcemanager/batch/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/batch/fluent/package-info.java","src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackageImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationPackagesImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/ApplicationsImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountKeysImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/BatchAccountsImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/BatchLocationQuotaImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/batch/implementation/BatchManagementClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/CheckNameAvailabilityResultImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/DetectorResponseImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/LocationsClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/LocationsImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimeterConfigurationImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/NetworkSecurityPerimetersImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/OperationImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/OutboundEnvironmentEndpointImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PoolImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PoolsClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PoolsImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourceImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/batch/implementation/SupportedSkuImpl.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/BatchAccountListResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/DetectorListResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationPackagesResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/ListApplicationsResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPoolsResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateEndpointConnectionsResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/ListPrivateLinkResourcesResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/NetworkSecurityPerimeterConfigurationListResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/OperationListResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/OutboundEnvironmentEndpointCollection.java","src/main/java/com/azure/resourcemanager/batch/implementation/models/SupportedSkusResult.java","src/main/java/com/azure/resourcemanager/batch/implementation/package-info.java","src/main/java/com/azure/resourcemanager/batch/models/AccessRule.java","src/main/java/com/azure/resourcemanager/batch/models/AccessRuleDirection.java","src/main/java/com/azure/resourcemanager/batch/models/AccessRuleProperties.java","src/main/java/com/azure/resourcemanager/batch/models/AccessRulePropertiesSubscription.java","src/main/java/com/azure/resourcemanager/batch/models/AccountKeyType.java","src/main/java/com/azure/resourcemanager/batch/models/ActivateApplicationPackageParameters.java","src/main/java/com/azure/resourcemanager/batch/models/AllocationState.java","src/main/java/com/azure/resourcemanager/batch/models/Application.java","src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackage.java","src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackageReference.java","src/main/java/com/azure/resourcemanager/batch/models/ApplicationPackages.java","src/main/java/com/azure/resourcemanager/batch/models/Applications.java","src/main/java/com/azure/resourcemanager/batch/models/AuthenticationMode.java","src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRun.java","src/main/java/com/azure/resourcemanager/batch/models/AutoScaleRunError.java","src/main/java/com/azure/resourcemanager/batch/models/AutoScaleSettings.java","src/main/java/com/azure/resourcemanager/batch/models/AutoStorageAuthenticationMode.java","src/main/java/com/azure/resourcemanager/batch/models/AutoStorageBaseProperties.java","src/main/java/com/azure/resourcemanager/batch/models/AutoStorageProperties.java","src/main/java/com/azure/resourcemanager/batch/models/AutoUserScope.java","src/main/java/com/azure/resourcemanager/batch/models/AutoUserSpecification.java","src/main/java/com/azure/resourcemanager/batch/models/AutomaticOSUpgradePolicy.java","src/main/java/com/azure/resourcemanager/batch/models/AzureBlobFileSystemConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/AzureFileShareConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/BatchAccount.java","src/main/java/com/azure/resourcemanager/batch/models/BatchAccountCreateParameters.java","src/main/java/com/azure/resourcemanager/batch/models/BatchAccountIdentity.java","src/main/java/com/azure/resourcemanager/batch/models/BatchAccountKeys.java","src/main/java/com/azure/resourcemanager/batch/models/BatchAccountRegenerateKeyParameters.java","src/main/java/com/azure/resourcemanager/batch/models/BatchAccountUpdateParameters.java","src/main/java/com/azure/resourcemanager/batch/models/BatchAccounts.java","src/main/java/com/azure/resourcemanager/batch/models/BatchLocationQuota.java","src/main/java/com/azure/resourcemanager/batch/models/BatchPoolIdentity.java","src/main/java/com/azure/resourcemanager/batch/models/CachingType.java","src/main/java/com/azure/resourcemanager/batch/models/CheckNameAvailabilityParameters.java","src/main/java/com/azure/resourcemanager/batch/models/CheckNameAvailabilityResult.java","src/main/java/com/azure/resourcemanager/batch/models/CifsMountConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/ComputeNodeDeallocationOption.java","src/main/java/com/azure/resourcemanager/batch/models/ComputeNodeFillType.java","src/main/java/com/azure/resourcemanager/batch/models/ComputeNodeIdentityReference.java","src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/ContainerHostBatchBindMountEntry.java","src/main/java/com/azure/resourcemanager/batch/models/ContainerHostDataPath.java","src/main/java/com/azure/resourcemanager/batch/models/ContainerRegistry.java","src/main/java/com/azure/resourcemanager/batch/models/ContainerType.java","src/main/java/com/azure/resourcemanager/batch/models/ContainerWorkingDirectory.java","src/main/java/com/azure/resourcemanager/batch/models/DataDisk.java","src/main/java/com/azure/resourcemanager/batch/models/DeploymentConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/DetectorResponse.java","src/main/java/com/azure/resourcemanager/batch/models/DiffDiskPlacement.java","src/main/java/com/azure/resourcemanager/batch/models/DiffDiskSettings.java","src/main/java/com/azure/resourcemanager/batch/models/DiskCustomerManagedKey.java","src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionSetParameters.java","src/main/java/com/azure/resourcemanager/batch/models/DiskEncryptionTarget.java","src/main/java/com/azure/resourcemanager/batch/models/DynamicVNetAssignmentScope.java","src/main/java/com/azure/resourcemanager/batch/models/ElevationLevel.java","src/main/java/com/azure/resourcemanager/batch/models/EncryptionProperties.java","src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessDefaultAction.java","src/main/java/com/azure/resourcemanager/batch/models/EndpointAccessProfile.java","src/main/java/com/azure/resourcemanager/batch/models/EndpointDependency.java","src/main/java/com/azure/resourcemanager/batch/models/EndpointDetail.java","src/main/java/com/azure/resourcemanager/batch/models/EnvironmentSetting.java","src/main/java/com/azure/resourcemanager/batch/models/FixedScaleSettings.java","src/main/java/com/azure/resourcemanager/batch/models/HostEndpointSettings.java","src/main/java/com/azure/resourcemanager/batch/models/HostEndpointSettingsModeTypes.java","src/main/java/com/azure/resourcemanager/batch/models/IPFamily.java","src/main/java/com/azure/resourcemanager/batch/models/IPTag.java","src/main/java/com/azure/resourcemanager/batch/models/ImageReference.java","src/main/java/com/azure/resourcemanager/batch/models/InboundEndpointProtocol.java","src/main/java/com/azure/resourcemanager/batch/models/InboundNatPool.java","src/main/java/com/azure/resourcemanager/batch/models/InterNodeCommunicationState.java","src/main/java/com/azure/resourcemanager/batch/models/IpAddressProvisioningType.java","src/main/java/com/azure/resourcemanager/batch/models/IpRule.java","src/main/java/com/azure/resourcemanager/batch/models/IpRuleAction.java","src/main/java/com/azure/resourcemanager/batch/models/IssueType.java","src/main/java/com/azure/resourcemanager/batch/models/JobDefaultOrder.java","src/main/java/com/azure/resourcemanager/batch/models/KeySource.java","src/main/java/com/azure/resourcemanager/batch/models/KeyVaultProperties.java","src/main/java/com/azure/resourcemanager/batch/models/KeyVaultReference.java","src/main/java/com/azure/resourcemanager/batch/models/LinuxUserConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/Locations.java","src/main/java/com/azure/resourcemanager/batch/models/LoginMode.java","src/main/java/com/azure/resourcemanager/batch/models/ManagedDisk.java","src/main/java/com/azure/resourcemanager/batch/models/MetadataItem.java","src/main/java/com/azure/resourcemanager/batch/models/MountConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/NameAvailabilityReason.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkProfile.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityGroupRule.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityGroupRuleAccess.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeterConfigurationProvisioningState.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityPerimeters.java","src/main/java/com/azure/resourcemanager/batch/models/NetworkSecurityProfile.java","src/main/java/com/azure/resourcemanager/batch/models/NfsMountConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/NodePlacementConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/NodePlacementPolicyType.java","src/main/java/com/azure/resourcemanager/batch/models/OSDisk.java","src/main/java/com/azure/resourcemanager/batch/models/Operation.java","src/main/java/com/azure/resourcemanager/batch/models/OperationDisplay.java","src/main/java/com/azure/resourcemanager/batch/models/Operations.java","src/main/java/com/azure/resourcemanager/batch/models/OutboundEnvironmentEndpoint.java","src/main/java/com/azure/resourcemanager/batch/models/PackageState.java","src/main/java/com/azure/resourcemanager/batch/models/Pool.java","src/main/java/com/azure/resourcemanager/batch/models/PoolAllocationMode.java","src/main/java/com/azure/resourcemanager/batch/models/PoolEndpointConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/PoolIdentityType.java","src/main/java/com/azure/resourcemanager/batch/models/PoolProvisioningState.java","src/main/java/com/azure/resourcemanager/batch/models/Pools.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateHeaders.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsCreateResponse.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleHeaders.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsDisableAutoScaleResponse.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsGetHeaders.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsGetResponse.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeHeaders.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsStopResizeResponse.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateHeaders.java","src/main/java/com/azure/resourcemanager/batch/models/PoolsUpdateResponse.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/batch/models/PrivateLinkServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/batch/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/batch/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/batch/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/batch/models/ProxyAgentSettings.java","src/main/java/com/azure/resourcemanager/batch/models/PublicIpAddressConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/PublicNetworkAccessType.java","src/main/java/com/azure/resourcemanager/batch/models/ResizeError.java","src/main/java/com/azure/resourcemanager/batch/models/ResizeOperationStatus.java","src/main/java/com/azure/resourcemanager/batch/models/ResourceAssociation.java","src/main/java/com/azure/resourcemanager/batch/models/ResourceAssociationAccessMode.java","src/main/java/com/azure/resourcemanager/batch/models/ResourceFile.java","src/main/java/com/azure/resourcemanager/batch/models/ResourceIdentityType.java","src/main/java/com/azure/resourcemanager/batch/models/ResourceType.java","src/main/java/com/azure/resourcemanager/batch/models/RollingUpgradePolicy.java","src/main/java/com/azure/resourcemanager/batch/models/ScaleSettings.java","src/main/java/com/azure/resourcemanager/batch/models/SecurityEncryptionTypes.java","src/main/java/com/azure/resourcemanager/batch/models/SecurityProfile.java","src/main/java/com/azure/resourcemanager/batch/models/SecurityTypes.java","src/main/java/com/azure/resourcemanager/batch/models/ServiceArtifactReference.java","src/main/java/com/azure/resourcemanager/batch/models/Severity.java","src/main/java/com/azure/resourcemanager/batch/models/SkuCapability.java","src/main/java/com/azure/resourcemanager/batch/models/StartTask.java","src/main/java/com/azure/resourcemanager/batch/models/StorageAccountType.java","src/main/java/com/azure/resourcemanager/batch/models/SupportedSku.java","src/main/java/com/azure/resourcemanager/batch/models/TaskContainerSettings.java","src/main/java/com/azure/resourcemanager/batch/models/TaskSchedulingPolicy.java","src/main/java/com/azure/resourcemanager/batch/models/UefiSettings.java","src/main/java/com/azure/resourcemanager/batch/models/UpgradeMode.java","src/main/java/com/azure/resourcemanager/batch/models/UpgradePolicy.java","src/main/java/com/azure/resourcemanager/batch/models/UserAccount.java","src/main/java/com/azure/resourcemanager/batch/models/UserAssignedIdentities.java","src/main/java/com/azure/resourcemanager/batch/models/UserIdentity.java","src/main/java/com/azure/resourcemanager/batch/models/VMDiskSecurityProfile.java","src/main/java/com/azure/resourcemanager/batch/models/VMExtension.java","src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/VirtualMachineFamilyCoreQuota.java","src/main/java/com/azure/resourcemanager/batch/models/WindowsConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/WindowsUserConfiguration.java","src/main/java/com/azure/resourcemanager/batch/models/package-info.java","src/main/java/com/azure/resourcemanager/batch/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-batch/proxy-config.json b/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-batch/proxy-config.json index 0c7b2843aebb..f82d8bf35ade 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-batch/proxy-config.json +++ b/sdk/batch/azure-resourcemanager-batch/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-batch/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.batch.implementation.ApplicationPackagesClientImpl$ApplicationPackagesService"],["com.azure.resourcemanager.batch.implementation.ApplicationsClientImpl$ApplicationsService"],["com.azure.resourcemanager.batch.implementation.BatchAccountsClientImpl$BatchAccountsService"],["com.azure.resourcemanager.batch.implementation.CertificatesClientImpl$CertificatesService"],["com.azure.resourcemanager.batch.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.batch.implementation.NetworkSecurityPerimetersClientImpl$NetworkSecurityPerimetersService"],["com.azure.resourcemanager.batch.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.batch.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.batch.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.batch.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"]] \ No newline at end of file +[["com.azure.resourcemanager.batch.implementation.ApplicationPackagesClientImpl$ApplicationPackagesService"],["com.azure.resourcemanager.batch.implementation.ApplicationsClientImpl$ApplicationsService"],["com.azure.resourcemanager.batch.implementation.BatchAccountsClientImpl$BatchAccountsService"],["com.azure.resourcemanager.batch.implementation.LocationsClientImpl$LocationsService"],["com.azure.resourcemanager.batch.implementation.NetworkSecurityPerimetersClientImpl$NetworkSecurityPerimetersService"],["com.azure.resourcemanager.batch.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.batch.implementation.PoolsClientImpl$PoolsService"],["com.azure.resourcemanager.batch.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.batch.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"]] \ No newline at end of file diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/resources/azure-resourcemanager-batch.properties b/sdk/batch/azure-resourcemanager-batch/src/main/resources/azure-resourcemanager-batch.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/resources/azure-resourcemanager-batch.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationCreateSamples.java index fd229a92e798..adf5cff00ebf 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationCreateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationCreate.json + * x-ms-original-file: 2025-06-01/ApplicationCreate.json */ /** * Sample code: ApplicationCreate. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationDeleteSamples.java index bd0af250b7f3..7194ed1c5090 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationDelete.json + * x-ms-original-file: 2025-06-01/ApplicationDelete.json */ /** * Sample code: ApplicationDelete. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationGetSamples.java index 68af795f6155..1fefdfa335e0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationGet.json + * x-ms-original-file: 2025-06-01/ApplicationGet.json */ /** * Sample code: ApplicationGet. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationListSamples.java index 91ba6c280317..5f00f9f3b41f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationListSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationList.json + * x-ms-original-file: 2025-06-01/ApplicationList.json */ /** * Sample code: ApplicationList. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageActivateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageActivateSamples.java index d8d01dde4601..cd5ad44de433 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageActivateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageActivateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,8 +11,7 @@ */ public final class ApplicationPackageActivateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageActivate.json + * x-ms-original-file: 2025-06-01/ApplicationPackageActivate.json */ /** * Sample code: ApplicationPackageActivate. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageCreateSamples.java index eb080e164434..adb796a4b8be 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationPackageCreateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageCreate.json + * x-ms-original-file: 2025-06-01/ApplicationPackageCreate.json */ /** * Sample code: ApplicationPackageCreate. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageDeleteSamples.java index af70f0368af0..8df8bcff0261 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationPackageDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageDelete.json + * x-ms-original-file: 2025-06-01/ApplicationPackageDelete.json */ /** * Sample code: ApplicationPackageDelete. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageGetSamples.java index 3625cf9cf732..9aab5498c820 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationPackageGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageGet.json + * x-ms-original-file: 2025-06-01/ApplicationPackageGet.json */ /** * Sample code: ApplicationPackageGet. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageListSamples.java index 5f09cb652b8e..deba4240764f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageListSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationPackageListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class ApplicationPackageListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationPackageList.json + * x-ms-original-file: 2025-06-01/ApplicationPackageList.json */ /** * Sample code: ApplicationPackageList. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationUpdateSamples.java index 5a534f80fcca..8f69a75350f4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/ApplicationUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,8 +11,7 @@ */ public final class ApplicationUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ApplicationUpdate.json + * x-ms-original-file: 2025-06-01/ApplicationUpdate.json */ /** * Sample code: ApplicationUpdate. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountCreateSamples.java index 37fdd3ed4730..4d0bf804ea93 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -19,8 +19,7 @@ */ public final class BatchAccountCreateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_BYOS.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_BYOS.json */ /** * Sample code: BatchAccountCreate_BYOS. @@ -33,17 +32,16 @@ public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchM .withRegion("japaneast") .withExistingResourceGroup("default-azurebatch-japaneast") .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + "/subscriptions/12345678-1234-1234-1234-123456789012/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/2024-07-01/examples/ - * BatchAccountCreate_UserAssignedIdentity.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_UserAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_UserAssignedIdentity. @@ -57,16 +55,15 @@ public static void batchAccountCreateUserAssignedIdentity(com.azure.resourcemana .withExistingResourceGroup("default-azurebatch-japaneast") .withIdentity(new BatchAccountIdentity().withType(ResourceIdentityType.USER_ASSIGNED) .withUserAssignedIdentities(mapOf( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + "/subscriptions/12345678-1234-1234-1234-123456789012/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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountCreate.json + * x-ms-original-file: 2025-06-01/PrivateBatchAccountCreate.json */ /** * Sample code: PrivateBatchAccountCreate. @@ -79,17 +76,16 @@ public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.Bat .withRegion("japaneast") .withExistingResourceGroup("default-azurebatch-japaneast") .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .withKeyVaultReference(new KeyVaultReference().withId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.KeyVault/vaults/sample") + "/subscriptions/12345678-1234-1234-1234-123456789012/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/2024-07-01/examples/ - * BatchAccountCreate_SystemAssignedIdentity.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_SystemAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_SystemAssignedIdentity. @@ -103,13 +99,12 @@ public static void batchAccountCreateSystemAssignedIdentity(com.azure.resourcema .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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountCreate_Default.json + * x-ms-original-file: 2025-06-01/BatchAccountCreate_Default.json */ /** * Sample code: BatchAccountCreate_Default. @@ -122,7 +117,7 @@ public static void batchAccountCreateDefault(com.azure.resourcemanager.batch.Bat .withRegion("japaneast") .withExistingResourceGroup("default-azurebatch-japaneast") .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .create(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountDeleteSamples.java index 6502f2860729..b315fb2ae6e2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountDelete.json + * x-ms-original-file: 2025-06-01/BatchAccountDelete.json */ /** * Sample code: BatchAccountDelete. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetByResourceGroupSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetByResourceGroupSamples.java index 6141da2f526e..63842c5a2911 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetByResourceGroupSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateBatchAccountGet.json + * x-ms-original-file: 2025-06-01/PrivateBatchAccountGet.json */ /** * Sample code: PrivateBatchAccountGet. @@ -24,8 +23,7 @@ public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchM } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountGet.json + * x-ms-original-file: 2025-06-01/BatchAccountGet.json */ /** * Sample code: BatchAccountGet. 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 index e9027fd45c36..024a0079621c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountGetDetectorSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/DetectorGet.json + * x-ms-original-file: 2025-06-01/DetectorGet.json */ /** * Sample code: GetDetector. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetKeysSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetKeysSamples.java index 2f51c11cdd09..8e8d8764a634 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetKeysSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountGetKeysSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountGetKeys.json + * x-ms-original-file: 2025-06-01/BatchAccountGetKeys.json */ /** * Sample code: BatchAccountGetKeys. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListByResourceGroupSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListByResourceGroupSamples.java index c8fc2b07999f..3e9a27849150 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListByResourceGroupSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,9 +9,7 @@ */ public final class BatchAccountListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountListByResourceGroup. - * json + * x-ms-original-file: 2025-06-01/BatchAccountListByResourceGroup.json */ /** * Sample code: BatchAccountListByResourceGroup. 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 index d1f9e823ca4a..dd90d9225337 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountListDetectorsSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/DetectorList.json + * x-ms-original-file: 2025-06-01/DetectorList.json */ /** * Sample code: ListDetectors. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java index f26fb086bcf9..98c5f6ab9f50 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListOutboundNetworkDependenciesEndpointsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * BatchAccountListOutboundNetworkDependenciesEndpoints.json + * x-ms-original-file: 2025-06-01/BatchAccountListOutboundNetworkDependenciesEndpoints.json */ /** * Sample code: ListOutboundNetworkDependencies. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListSamples.java index 57415cbab6fb..820e03b33226 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountList.json + * x-ms-original-file: 2025-06-01/BatchAccountList.json */ /** * Sample code: BatchAccountList. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountRegenerateKeySamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountRegenerateKeySamples.java index 590453390fc0..ed5af4c1792c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountRegenerateKeySamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountRegenerateKeySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,8 +12,7 @@ */ public final class BatchAccountRegenerateKeySamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountRegenerateKey.json + * x-ms-original-file: 2025-06-01/BatchAccountRegenerateKey.json */ /** * Sample code: BatchAccountRegenerateKey. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountSynchronizeAutoStorageKeysSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountSynchronizeAutoStorageKeysSamples.java index 7c880232afb4..0f36504cde00 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountSynchronizeAutoStorageKeysSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountSynchronizeAutoStorageKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class BatchAccountSynchronizeAutoStorageKeysSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * BatchAccountSynchronizeAutoStorageKeys.json + * x-ms-original-file: 2025-06-01/BatchAccountSynchronizeAutoStorageKeys.json */ /** * Sample code: BatchAccountSynchronizeAutoStorageKeys. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountUpdateSamples.java index 77046b732ed1..9cd61bfbbe84 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,8 +12,7 @@ */ public final class BatchAccountUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/BatchAccountUpdate.json + * x-ms-original-file: 2025-06-01/BatchAccountUpdate.json */ /** * Sample code: BatchAccountUpdate. @@ -27,7 +26,7 @@ public static void batchAccountUpdate(com.azure.resourcemanager.batch.BatchManag .getValue(); resource.update() .withAutoStorage(new AutoStorageBaseProperties().withStorageAccountId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Storage/storageAccounts/samplestorage")) .apply(); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCancelDeletionSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCancelDeletionSamples.java deleted file mode 100644 index f3ab3dbf82c5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCancelDeletionSamples.java +++ /dev/null @@ -1,25 +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.generated; - -/** - * Samples for Certificate CancelDeletion. - */ -public final class CertificateCancelDeletionSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCreateSamples.java deleted file mode 100644 index 067b8aa035f0..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateCreateSamples.java +++ /dev/null @@ -1,66 +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.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/2024-07-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") - .withPassword("") - .withThumbprintAlgorithm("sha1") - .withThumbprint("0a0e4f50d51beadeac1d35afc5116098e7902e6e") - .withFormat(CertificateFormat.PFX) - .create(); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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") - .withPassword("") - .create(); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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") - .withFormat(CertificateFormat.CER) - .create(); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateDeleteSamples.java deleted file mode 100644 index 8e9e9cd994ab..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateDeleteSamples.java +++ /dev/null @@ -1,25 +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.generated; - -/** - * Samples for Certificate Delete. - */ -public final class CertificateDeleteSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateGetSamples.java deleted file mode 100644 index b0ab774ac82f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateGetSamples.java +++ /dev/null @@ -1,41 +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.generated; - -/** - * Samples for Certificate Get. - */ -public final class CertificateGetSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateListByBatchAccountSamples.java deleted file mode 100644 index 07cfe8d31626..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateListByBatchAccountSamples.java +++ /dev/null @@ -1,42 +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.generated; - -/** - * Samples for Certificate ListByBatchAccount. - */ -public final class CertificateListByBatchAccountSamples { - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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'", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-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, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateUpdateSamples.java deleted file mode 100644 index 0c35dee96746..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/CertificateUpdateSamples.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.generated; - -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/2024-07-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", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withData("MIIJsgIBAzCCCW4GCSqGSIb3DQE...").withPassword("").apply(); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationCheckNameAvailabilitySamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationCheckNameAvailabilitySamples.java index 935d20e33554..f7d187f1389b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationCheckNameAvailabilitySamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationCheckNameAvailabilitySamples.java @@ -1,18 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; +import com.azure.resourcemanager.batch.models.ResourceType; /** * Samples for Location CheckNameAvailability. */ public final class LocationCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * LocationCheckNameAvailability_AlreadyExists.json + * x-ms-original-file: 2025-06-01/LocationCheckNameAvailability_AlreadyExists.json */ /** * Sample code: LocationCheckNameAvailability_AlreadyExists. @@ -23,13 +23,13 @@ public final class LocationCheckNameAvailabilitySamples { locationCheckNameAvailabilityAlreadyExists(com.azure.resourcemanager.batch.BatchManager manager) { manager.locations() .checkNameAvailabilityWithResponse("japaneast", - new CheckNameAvailabilityParameters().withName("existingaccountname"), + new CheckNameAvailabilityParameters().withName("existingaccountname") + .withType(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * LocationCheckNameAvailability_Available.json + * x-ms-original-file: 2025-06-01/LocationCheckNameAvailability_Available.json */ /** * Sample code: LocationCheckNameAvailability_Available. @@ -39,6 +39,8 @@ public final class LocationCheckNameAvailabilitySamples { public static void locationCheckNameAvailabilityAvailable(com.azure.resourcemanager.batch.BatchManager manager) { manager.locations() .checkNameAvailabilityWithResponse("japaneast", - new CheckNameAvailabilityParameters().withName("newaccountname"), com.azure.core.util.Context.NONE); + new CheckNameAvailabilityParameters().withName("newaccountname") + .withType(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationGetQuotasSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationGetQuotasSamples.java index 1dd25cb5a53a..0043f1255f3a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationGetQuotasSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationGetQuotasSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class LocationGetQuotasSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationGetQuotas.json + * x-ms-original-file: 2025-06-01/LocationGetQuotas.json */ /** * Sample code: LocationGetQuotas. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedVirtualMachineSkusSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedVirtualMachineSkusSamples.java index 6485a63421ea..a4d16447ff02 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedVirtualMachineSkusSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedVirtualMachineSkusSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,9 +9,7 @@ */ public final class LocationListSupportedVirtualMachineSkusSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/LocationListVirtualMachineSkus. - * json + * x-ms-original-file: 2025-06-01/LocationListVirtualMachineSkus.json */ /** * Sample code: LocationListVirtualMachineSkus. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterGetConfigurationSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterGetConfigurationSamples.java index dd7f1070332d..80c22a10b081 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterGetConfigurationSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterGetConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class NetworkSecurityPerimeterGetConfigurationSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationGet.json + * x-ms-original-file: 2025-06-01/NspConfigurationGet.json */ /** * Sample code: GetNspConfiguration. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterListConfigurationsSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterListConfigurationsSamples.java index a68e9e6afbb5..a79b3654af05 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterListConfigurationsSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterListConfigurationsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class NetworkSecurityPerimeterListConfigurationsSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationsList.json + * x-ms-original-file: 2025-06-01/NspConfigurationsList.json */ /** * Sample code: ListNspConfigurations. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterReconcileConfigurationSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterReconcileConfigurationSamples.java index b860fedee5fa..c999c4024bf9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterReconcileConfigurationSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterReconcileConfigurationSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class NetworkSecurityPerimeterReconcileConfigurationSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/NspConfigurationReconcile.json + * x-ms-original-file: 2025-06-01/NspConfigurationReconcile.json */ /** * Sample code: ReconcileNspConfiguration. 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 index a734a8a15207..64dfb54cc07c 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/OperationsList.json + * x-ms-original-file: 2025-06-01/OperationsList.json */ /** * Sample code: OperationsList. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolCreateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolCreateSamples.java index 8a9cb6177a96..a91210a30875 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolCreateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolCreateSamples.java @@ -1,22 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.management.serializer.SerializerFactory; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.batch.models.AutomaticOSUpgradePolicy; import com.azure.resourcemanager.batch.models.AutoScaleSettings; +import com.azure.resourcemanager.batch.models.AutomaticOSUpgradePolicy; import com.azure.resourcemanager.batch.models.BatchPoolIdentity; import com.azure.resourcemanager.batch.models.CachingType; +import com.azure.resourcemanager.batch.models.ComputeNodeFillType; +import com.azure.resourcemanager.batch.models.ComputeNodeIdentityReference; 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.DiskCustomerManagedKey; import com.azure.resourcemanager.batch.models.DiskEncryptionConfiguration; +import com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters; import com.azure.resourcemanager.batch.models.DiskEncryptionTarget; import com.azure.resourcemanager.batch.models.FixedScaleSettings; +import com.azure.resourcemanager.batch.models.IPFamily; import com.azure.resourcemanager.batch.models.ImageReference; import com.azure.resourcemanager.batch.models.InboundEndpointProtocol; import com.azure.resourcemanager.batch.models.InboundNatPool; @@ -25,7 +30,6 @@ 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.NodeCommunicationMode; import com.azure.resourcemanager.batch.models.NodePlacementConfiguration; import com.azure.resourcemanager.batch.models.NodePlacementPolicyType; import com.azure.resourcemanager.batch.models.OSDisk; @@ -34,16 +38,19 @@ import com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration; import com.azure.resourcemanager.batch.models.RollingUpgradePolicy; import com.azure.resourcemanager.batch.models.ScaleSettings; +import com.azure.resourcemanager.batch.models.SecurityEncryptionTypes; import com.azure.resourcemanager.batch.models.SecurityProfile; import com.azure.resourcemanager.batch.models.SecurityTypes; import com.azure.resourcemanager.batch.models.ServiceArtifactReference; import com.azure.resourcemanager.batch.models.StorageAccountType; +import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy; import com.azure.resourcemanager.batch.models.UefiSettings; import com.azure.resourcemanager.batch.models.UpgradeMode; import com.azure.resourcemanager.batch.models.UpgradePolicy; import com.azure.resourcemanager.batch.models.UserAssignedIdentities; -import com.azure.resourcemanager.batch.models.VirtualMachineConfiguration; +import com.azure.resourcemanager.batch.models.VMDiskSecurityProfile; 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; @@ -56,8 +63,7 @@ */ public final class PoolCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration ServiceArtifactReference. @@ -79,7 +85,7 @@ public static void createPoolVirtualMachineConfigurationServiceArtifactReference .withNodeAgentSkuId("batch.node.windows amd64") .withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(false)) .withServiceArtifactReference(new ServiceArtifactReference().withId( - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile")))) + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile")))) .withScaleSettings(new ScaleSettings() .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(2).withTargetLowPriorityNodes(0))) .withUpgradePolicy(new UpgradePolicy().withMode(UpgradeMode.AUTOMATIC) @@ -88,8 +94,7 @@ public static void createPoolVirtualMachineConfigurationServiceArtifactReference } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_SecurityProfile.json + * x-ms-original-file: 2025-06-01/PoolCreate_SecurityProfile.json */ /** * Sample code: CreatePool - SecurityProfile. @@ -117,8 +122,7 @@ public static void createPoolSecurityProfile(com.azure.resourcemanager.batch.Bat } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_Tags.json + * x-ms-original-file: 2025-06-01/PoolCreate_Tags.json */ /** * Sample code: CreatePool - Tags. @@ -129,7 +133,6 @@ public static void createPoolTags(com.azure.resourcemanager.batch.BatchManager m manager.pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") - .withTags(mapOf("TagName1", "TagValue1", "TagName2", "TagValue2")) .withVmSize("Standard_d4s_v3") .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration( new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical") @@ -142,8 +145,7 @@ public static void createPoolTags(com.azure.resourcemanager.batch.BatchManager m } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration OSDisk. @@ -172,8 +174,39 @@ public static void createPoolTags(com.azure.resourcemanager.batch.BatchManager m } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_MinimalVirtualMachineConfiguration.json + * x-ms-original-file: 2025-06-01/PoolCreate_DiskEncryptionSet_ForUserSubscriptionAccounts.json + */ + /** + * Sample code: CreatePool - disk encryption set for user subscription accounts. + * + * @param manager Entry point to BatchManager. + */ + public static void + createPoolDiskEncryptionSetForUserSubscriptionAccounts(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("Standard_D4ds_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2022-Datacenter") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64") + .withOsDisk(new OSDisk().withManagedDisk(new ManagedDisk() + .withStorageAccountType(StorageAccountType.STANDARD_LRS) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId")))) + .withSecurityProfile(new SecurityProfile().withEncryptionAtHost(false)))) + .withScaleSettings(new ScaleSettings().withFixedScale( + new FixedScaleSettings().withResizeTimeout(Duration.parse("PT15M")).withTargetDedicatedNodes(1))) + .withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK)) + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_MinimalVirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Minimal VirtualMachineConfiguration. @@ -198,8 +231,7 @@ public static void createPoolTags(com.azure.resourcemanager.batch.BatchManager m } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration Extensions. @@ -231,14 +263,46 @@ public static void createPoolVirtualMachineConfigurationExtensions( .withScaleSettings( new ScaleSettings().withAutoScale(new AutoScaleSettings().withFormula("$TargetDedicatedNodes=1") .withEvaluationInterval(Duration.parse("PT5M")))) - .withTargetNodeCommunicationMode(NodeCommunicationMode.DEFAULT) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UserAssignedIdentities - * .json + * x-ms-original-file: 2025-06-01/PoolCreate_CustomerManagedKey_ForBatchManagedAccounts.json + */ + /** + * Sample code: CreatePool - customer managed key for Batch managed accounts. + * + * @param manager Entry point to BatchManager. + */ + public static void + createPoolCustomerManagedKeyForBatchManagedAccounts(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/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", + new UserAssignedIdentities()))) + .withVmSize("Standard_D4ds_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2022-Datacenter") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64") + .withDiskEncryptionConfiguration(new DiskEncryptionConfiguration() + .withTargets(Arrays.asList(DiskEncryptionTarget.OS_DISK)) + .withCustomerManagedKey(new DiskCustomerManagedKey().withKeyUrl("fakeTokenPlaceholder") + .withIdentityReference(new ComputeNodeIdentityReference().withResourceId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1")))))) + .withScaleSettings(new ScaleSettings().withFixedScale( + new FixedScaleSettings().withResizeTimeout(Duration.parse("PT15M")).withTargetDedicatedNodes(1))) + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_UserAssignedIdentities.json */ /** * Sample code: CreatePool - UserAssignedIdentities. @@ -251,9 +315,9 @@ public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.ba .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", + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1", new UserAssignedIdentities(), - "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id2", new UserAssignedIdentities()))) .withVmSize("STANDARD_D4") .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration( @@ -268,8 +332,35 @@ public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.ba } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_UpgradePolicy.json + * x-ms-original-file: 2025-06-01/PoolCreate_AcceleratedNetworking.json + */ + /** + * Sample code: CreatePool - accelerated networking. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools() + .define("testpool") + .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") + .withVmSize("STANDARD_D1_V2") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2016-datacenter-smalldisk") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64"))) + .withScaleSettings(new ScaleSettings() + .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) + .withNetworkConfiguration(new NetworkConfiguration().withSubnetId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123") + .withEnableAcceleratedNetworking(true)) + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_UpgradePolicy.json */ /** * Sample code: CreatePool - UpgradePolicy. @@ -309,38 +400,7 @@ public static void createPoolUpgradePolicy(com.azure.resourcemanager.batch.Batch } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_AcceleratedNetworking. - * json - */ - /** - * Sample code: CreatePool - accelerated networking. - * - * @param manager Entry point to BatchManager. - */ - public static void createPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools() - .define("testpool") - .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") - .withVmSize("STANDARD_D1_V2") - .withDeploymentConfiguration( - new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() - .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") - .withOffer("WindowsServer") - .withSku("2016-datacenter-smalldisk") - .withVersion("latest")) - .withNodeAgentSkuId("batch.node.windows amd64"))) - .withScaleSettings(new ScaleSettings() - .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) - .withNetworkConfiguration(new NetworkConfiguration().withSubnetId( - "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123") - .withEnableAcceleratedNetworking(true)) - .create(); - } - - /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolCreate_VirtualMachineConfiguration.json + * x-ms-original-file: 2025-06-01/PoolCreate_VirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Full VirtualMachineConfiguration. @@ -360,15 +420,14 @@ public static void createPoolFullVirtualMachineConfiguration(com.azure.resourcem .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), + .withDataDisks(Arrays.asList(new DataDisk().withLun(0) + .withCaching(CachingType.READ_WRITE) + .withDiskSizeGB(30) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_SSD_LRS)), new DataDisk().withLun(1) .withCaching(CachingType.NONE) .withDiskSizeGB(200) - .withStorageAccountType(StorageAccountType.STANDARD_LRS))) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.PREMIUM_LRS)))) .withLicenseType("Windows_Server") .withDiskEncryptionConfiguration(new DiskEncryptionConfiguration() .withTargets(Arrays.asList(DiskEncryptionTarget.OS_DISK, DiskEncryptionTarget.TEMPORARY_DISK))) @@ -399,81 +458,130 @@ public static void createPoolFullVirtualMachineConfiguration(com.azure.resourcem } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_SharedImageGallery. - * json + * x-ms-original-file: 2025-06-01/PoolCreate_ConfidentialDiskEncryptionSet_ForUserSubscriptionAccounts.json */ /** - * Sample code: CreatePool - Custom Image. + * Sample code: CreatePool - confidential disk encryption set for user subscription accounts. * * @param manager Entry point to BatchManager. */ - public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchManager manager) { + public static void createPoolConfidentialDiskEncryptionSetForUserSubscriptionAccounts( + 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"))) + .withVmSize("Standard_DC2as_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference(new ImageReference().withPublisher("MicrosoftWindowsServer") + .withOffer("WindowsServer") + .withSku("2019-datacenter-core-g2") + .withVersion("latest")) + .withNodeAgentSkuId("batch.node.windows amd64") + .withDataDisks(Arrays.asList(new DataDisk().withLun(0) + .withDiskSizeGB(1024) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_LRS) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId"))))) + .withOsDisk(new OSDisk().withManagedDisk(new ManagedDisk() + .withStorageAccountType(StorageAccountType.STANDARD_LRS) + .withSecurityProfile(new VMDiskSecurityProfile() + .withSecurityEncryptionType(SecurityEncryptionTypes.DISK_WITH_VMGUEST_STATE) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/ConfidentialDiskEncryptionSetId"))) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/diskEncryptionSets/DiskEncryptionSetId")))) + .withSecurityProfile(new SecurityProfile().withSecurityType(SecurityTypes.CONFIDENTIAL_VM) + .withEncryptionAtHost(false) + .withUefiSettings(new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true))))) + .withScaleSettings(new ScaleSettings().withFixedScale( + new FixedScaleSettings().withResizeTimeout(Duration.parse("PT15M")).withTargetDedicatedNodes(1))) + .withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK)) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_NoPublicIPAddresses. - * json + * x-ms-original-file: 2025-06-01/PoolCreate_SharedImageGallery.json */ /** - * Sample code: CreatePool - No public IP. + * Sample code: CreatePool - Custom Image. * * @param manager Entry point to BatchManager. */ - public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager manager) { + 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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + .create(); + } + + /* + * x-ms-original-file: 2025-06-01/PoolCreate_DualStackNetworking.json + */ + /** + * Sample code: CreatePool - dual stack networking. + * + * @param manager Entry point to BatchManager. + */ + public static void createPoolDualStackNetworking(com.azure.resourcemanager.batch.BatchManager manager) { + manager.pools() + .define("dualstackpool") + .withExistingBatchAccount("default-azurebatch", "exampleacc") + .withVmSize("Standard_D4ds_v5") + .withDeploymentConfiguration( + new DeploymentConfiguration().withVirtualMachineConfiguration(new VirtualMachineConfiguration() + .withImageReference( + new ImageReference().withPublisher("Canonical").withOffer("ubuntu-24_04-lts").withSku("server")) + .withNodeAgentSkuId("batch.node.ubuntu 24.04"))) + .withScaleSettings(new ScaleSettings() + .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) + .withNetworkConfiguration(new NetworkConfiguration() + .withEndpointConfiguration(new PoolEndpointConfiguration() + .withInboundNatPools(Arrays.asList(new InboundNatPool().withName("sshpool") + .withProtocol(InboundEndpointProtocol.TCP) + .withBackendPort(22) + .withFrontendPortRangeStart(40000) + .withFrontendPortRangeEnd(40500) + .withNetworkSecurityGroupRules(Arrays.asList(new NetworkSecurityGroupRule().withPriority(1000) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("*") + .withSourcePortRanges(Arrays.asList("*"))))))) .withPublicIpAddressConfiguration( - new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES))) + new PublicIpAddressConfiguration().withIpFamilies(Arrays.asList(IPFamily.IPV4, IPFamily.IPV6)))) .create(); } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolCreate_ResourceTags.json + * x-ms-original-file: 2025-06-01/PoolCreate_NoPublicIPAddresses.json */ /** - * Sample code: CreatePool - ResourceTags. + * Sample code: CreatePool - No public IP. * * @param manager Entry point to BatchManager. */ - public static void createPoolResourceTags(com.azure.resourcemanager.batch.BatchManager manager) { + public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchManager manager) { manager.pools() .define("testpool") .withExistingBatchAccount("default-azurebatch-japaneast", "sampleacct") - .withVmSize("Standard_d4s_v3") + .withVmSize("STANDARD_D4") .withDeploymentConfiguration(new DeploymentConfiguration().withVirtualMachineConfiguration( - new VirtualMachineConfiguration().withImageReference(new ImageReference().withPublisher("Canonical") - .withOffer("UbuntuServer") - .withSku("18_04-lts-gen2") - .withVersion("latest")).withNodeAgentSkuId("batch.node.ubuntu 18.04"))) - .withScaleSettings(new ScaleSettings() - .withFixedScale(new FixedScaleSettings().withTargetDedicatedNodes(1).withTargetLowPriorityNodes(0))) - .withResourceTags(mapOf("TagName1", "TagValue1", "TagName2", "TagValue2")) + new VirtualMachineConfiguration().withImageReference(new ImageReference().withId( + "/subscriptions/12345678-1234-1234-1234-123456789012/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/12345678-1234-1234-1234-123456789012/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/2024-07-01/examples/PoolCreate_PublicIPs.json + * x-ms-original-file: 2025-06-01/PoolCreate_PublicIPs.json */ /** * Sample code: CreatePool - Public IPs. @@ -487,14 +595,14 @@ public static void createPoolPublicIPs(com.azure.resourcemanager.batch.BatchMana .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")) + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + "/subscriptions/12345678-1234-1234-1234-123456789012/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/12345678-1234-1234-1234-1234567890121/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135")))) .create(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDeleteSamples.java index e680c12e4c66..c7f7d6b5a3d1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class PoolDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDelete.json + * x-ms-original-file: 2025-06-01/PoolDelete.json */ /** * Sample code: DeletePool. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDisableAutoScaleSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDisableAutoScaleSamples.java index cc45d8b2023b..b5ece116c0b6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDisableAutoScaleSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolDisableAutoScaleSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class PoolDisableAutoScaleSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolDisableAutoScale.json + * x-ms-original-file: 2025-06-01/PoolDisableAutoScale.json */ /** * Sample code: Disable AutoScale. 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 index 4891ed642797..d8a8d98ef53a 100644 --- 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 @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class PoolGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_SecurityProfile.json + * x-ms-original-file: 2025-06-01/PoolGet_SecurityProfile.json */ /** * Sample code: GetPool - SecurityProfile. @@ -24,8 +23,7 @@ public static void getPoolSecurityProfile(com.azure.resourcemanager.batch.BatchM } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolGet_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: 2025-06-01/PoolGet_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: GetPool - VirtualMachineConfiguration Extensions. @@ -40,8 +38,7 @@ public static void getPoolSecurityProfile(com.azure.resourcemanager.batch.BatchM } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolGet_VirtualMachineConfiguration_MangedOSDisk.json + * x-ms-original-file: 2025-06-01/PoolGet_VirtualMachineConfiguration_MangedOSDisk.json */ /** * Sample code: GetPool - VirtualMachineConfiguration OSDisk. @@ -55,8 +52,7 @@ public static void getPoolVirtualMachineConfigurationOSDisk(com.azure.resourcema } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_UpgradePolicy.json + * x-ms-original-file: 2025-06-01/PoolGet_UpgradePolicy.json */ /** * Sample code: GetPool - UpgradePolicy. @@ -70,8 +66,7 @@ public static void getPoolUpgradePolicy(com.azure.resourcemanager.batch.BatchMan } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/ - * PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json + * x-ms-original-file: 2025-06-01/PoolGet_VirtualMachineConfiguration_ServiceArtifactReference.json */ /** * Sample code: GetPool - VirtualMachineConfiguration ServiceArtifactReference. @@ -86,9 +81,7 @@ public static void getPoolVirtualMachineConfigurationServiceArtifactReference( } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet_AcceleratedNetworking. - * json + * x-ms-original-file: 2025-06-01/PoolGet_AcceleratedNetworking.json */ /** * Sample code: GetPool - AcceleratedNetworking. @@ -102,7 +95,7 @@ public static void getPoolAcceleratedNetworking(com.azure.resourcemanager.batch. } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolGet.json + * x-ms-original-file: 2025-06-01/PoolGet.json */ /** * Sample code: GetPool. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolListByBatchAccountSamples.java index 98adb3c8d14b..10ccfc0c6a10 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolListByBatchAccountSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolListByBatchAccountSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,7 +9,7 @@ */ public final class PoolListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolList.json + * x-ms-original-file: 2025-06-01/PoolList.json */ /** * Sample code: ListPool. @@ -23,8 +23,7 @@ public static void listPool(com.azure.resourcemanager.batch.BatchManager manager } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolListWithFilter.json + * x-ms-original-file: 2025-06-01/PoolListWithFilter.json */ /** * Sample code: ListPoolWithFilter. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolStopResizeSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolStopResizeSamples.java index f6715d3a35f4..ab9b68691cb1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolStopResizeSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolStopResizeSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class PoolStopResizeSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolStopResize.json + * x-ms-original-file: 2025-06-01/PoolStopResize.json */ /** * Sample code: StopPoolResize. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolUpdateSamples.java index 34db4d570073..0a7b40fba928 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolUpdateSamples.java @@ -1,17 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; 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.NodeCommunicationMode; import com.azure.resourcemanager.batch.models.Pool; import com.azure.resourcemanager.batch.models.ScaleSettings; import com.azure.resourcemanager.batch.models.StartTask; @@ -23,8 +20,7 @@ */ public final class PoolUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_EnableAutoScale.json + * x-ms-original-file: 2025-06-01/PoolUpdate_EnableAutoScale.json */ /** * Sample code: UpdatePool - Enable Autoscale. @@ -42,8 +38,7 @@ public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.Bat } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_RemoveStartTask.json + * x-ms-original-file: 2025-06-01/PoolUpdate_RemoveStartTask.json */ /** * Sample code: UpdatePool - Remove Start Task. @@ -58,8 +53,7 @@ public static void updatePoolRemoveStartTask(com.azure.resourcemanager.batch.Bat } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_ResizePool.json + * x-ms-original-file: 2025-06-01/PoolUpdate_ResizePool.json */ /** * Sample code: UpdatePool - Resize Pool. @@ -80,8 +74,7 @@ public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchMan } /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PoolUpdate_OtherProperties.json + * x-ms-original-file: 2025-06-01/PoolUpdate_OtherProperties.json */ /** * Sample code: UpdatePool - Other Properties. @@ -94,16 +87,11 @@ public static void updatePoolOtherProperties(com.azure.resourcemanager.batch.Bat .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"), + "/subscriptions/12345678-1234-1234-1234-123456789012/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") + "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_5678") .withVersion("1.0"))) - .withTargetNodeCommunicationMode(NodeCommunicationMode.SIMPLIFIED) .apply(); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionDeleteSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionDeleteSamples.java index 532751dcb0f5..f8155f92e717 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionDeleteSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionDelete. - * json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionDelete.json */ /** * Sample code: PrivateEndpointConnectionDelete. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionGetSamples.java index a12162a1cd45..6539e5e91b8d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionGet.json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionGet.json */ /** * Sample code: GetPrivateEndpointConnection. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionListByBatchAccountSamples.java index 1f99392746df..9206f089f96d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionListByBatchAccountSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionListByBatchAccountSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,9 +9,7 @@ */ public final class PrivateEndpointConnectionListByBatchAccountSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionsList. - * json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionsList.json */ /** * Sample code: ListPrivateEndpointConnections. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionUpdateSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionUpdateSamples.java index 6cceeaec0e7f..99628334703c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionUpdateSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -13,9 +13,7 @@ */ public final class PrivateEndpointConnectionUpdateSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateEndpointConnectionUpdate. - * json + * x-ms-original-file: 2025-06-01/PrivateEndpointConnectionUpdate.json */ /** * Sample code: UpdatePrivateEndpointConnection. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceGetSamples.java index a26203a6ae35..6ddd9653c98f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceGetSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class PrivateLinkResourceGetSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateLinkResourceGet.json + * x-ms-original-file: 2025-06-01/PrivateLinkResourceGet.json */ /** * Sample code: GetPrivateLinkResource. diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceListByBatchAccountSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceListByBatchAccountSamples.java index 06a99d004110..2f3d4d086b54 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceListByBatchAccountSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceListByBatchAccountSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -9,8 +9,7 @@ */ public final class PrivateLinkResourceListByBatchAccountSamples { /* - * x-ms-original-file: - * specification/batch/resource-manager/Microsoft.Batch/stable/2024-07-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: 2025-06-01/PrivateLinkResourcesList.json */ /** * Sample code: ListPrivateLinkResource. diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesSubscriptionTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesSubscriptionTests.java new file mode 100644 index 000000000000..47e34eaa7eae --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesSubscriptionTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscription; +import org.junit.jupiter.api.Assertions; + +public final class AccessRulePropertiesSubscriptionTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + AccessRulePropertiesSubscription model + = BinaryData.fromString("{\"id\":\"yuvvfonkp\"}").toObject(AccessRulePropertiesSubscription.class); + Assertions.assertEquals("yuvvfonkp", model.id()); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesSubscriptionsItemTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesSubscriptionsItemTests.java deleted file mode 100644 index b6c9f11549d4..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesSubscriptionsItemTests.java +++ /dev/null @@ -1,26 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscriptionsItem; -import org.junit.jupiter.api.Assertions; - -public final class AccessRulePropertiesSubscriptionsItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessRulePropertiesSubscriptionsItem model = BinaryData.fromString("{\"id\":\"qddrihpfhoqcaae\"}") - .toObject(AccessRulePropertiesSubscriptionsItem.class); - Assertions.assertEquals("qddrihpfhoqcaae", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessRulePropertiesSubscriptionsItem model - = new AccessRulePropertiesSubscriptionsItem().withId("qddrihpfhoqcaae"); - model = BinaryData.fromObject(model).toObject(AccessRulePropertiesSubscriptionsItem.class); - Assertions.assertEquals("qddrihpfhoqcaae", model.id()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesTests.java index d68c6ab339bf..c8d06625c7f2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRulePropertiesTests.java @@ -1,62 +1,28 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.AccessRuleDirection; import com.azure.resourcemanager.batch.models.AccessRuleProperties; -import com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscriptionsItem; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter; -import java.util.Arrays; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class AccessRulePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessRuleProperties model = BinaryData.fromString( - "{\"direction\":\"Outbound\",\"addressPrefixes\":[\"fhjxakvvjgs\",\"ordilmywwtkgkxny\",\"dabg\",\"vudtjuewbcihx\"],\"subscriptions\":[{\"id\":\"c\"},{\"id\":\"xccybvpa\"}],\"networkSecurityPerimeters\":[{\"id\":\"udzpxgwjplmagstc\",\"perimeterGuid\":\"b722075a-1908-4073-b451-253007625fbb\",\"location\":\"pfkyrkdbdgiogsj\"},{\"id\":\"nwqjnoba\",\"perimeterGuid\":\"7e43d43a-c203-4d50-bf36-7542c82975ea\",\"location\":\"ddviacegfnmntfpm\"}],\"fullyQualifiedDomainNames\":[\"mfnczd\",\"vvbalx\",\"l\",\"chp\"],\"emailAddresses\":[\"zevwrdnhfukuv\",\"jcswsmys\"],\"phoneNumbers\":[\"uqypfcvle\",\"chpqbmfpjba\",\"widf\",\"xsspuunnoxyhk\"]}") + "{\"direction\":\"Outbound\",\"addressPrefixes\":[\"apeewchpxlkt\",\"kuziycsle\",\"ufuztcktyhjtq\"],\"subscriptions\":[{\"id\":\"zulwmmrqzzrrj\"},{\"id\":\"gl\"},{\"id\":\"zgkrvqe\"},{\"id\":\"toepryu\"}],\"networkSecurityPerimeters\":[{\"id\":\"tpzdmovzvfvaawzq\",\"perimeterGuid\":\"f\",\"location\":\"z\"},{\"id\":\"iglaecx\",\"perimeterGuid\":\"t\",\"location\":\"okpvzm\"},{\"id\":\"t\",\"perimeterGuid\":\"dgxobfircl\",\"location\":\"kciayzri\"}],\"fullyQualifiedDomainNames\":[\"yawfvjlboxq\"],\"emailAddresses\":[\"lmxhomdyn\",\"dwdigumb\",\"raauzzpt\"],\"phoneNumbers\":[\"ysdzhez\",\"wva\"]}") .toObject(AccessRuleProperties.class); Assertions.assertEquals(AccessRuleDirection.OUTBOUND, model.direction()); - Assertions.assertEquals("fhjxakvvjgs", model.addressPrefixes().get(0)); - Assertions.assertEquals("c", model.subscriptions().get(0).id()); - Assertions.assertEquals("udzpxgwjplmagstc", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals(UUID.fromString("b722075a-1908-4073-b451-253007625fbb"), - model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("pfkyrkdbdgiogsj", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("mfnczd", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("zevwrdnhfukuv", model.emailAddresses().get(0)); - Assertions.assertEquals("uqypfcvle", model.phoneNumbers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessRuleProperties model = new AccessRuleProperties().withDirection(AccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("fhjxakvvjgs", "ordilmywwtkgkxny", "dabg", "vudtjuewbcihx")) - .withSubscriptions(Arrays.asList(new AccessRulePropertiesSubscriptionsItem().withId("c"), - new AccessRulePropertiesSubscriptionsItem().withId("xccybvpa"))) - .withNetworkSecurityPerimeters(Arrays.asList( - new NetworkSecurityPerimeter().withId("udzpxgwjplmagstc") - .withPerimeterGuid(UUID.fromString("b722075a-1908-4073-b451-253007625fbb")) - .withLocation("pfkyrkdbdgiogsj"), - new NetworkSecurityPerimeter().withId("nwqjnoba") - .withPerimeterGuid(UUID.fromString("7e43d43a-c203-4d50-bf36-7542c82975ea")) - .withLocation("ddviacegfnmntfpm"))) - .withFullyQualifiedDomainNames(Arrays.asList("mfnczd", "vvbalx", "l", "chp")) - .withEmailAddresses(Arrays.asList("zevwrdnhfukuv", "jcswsmys")) - .withPhoneNumbers(Arrays.asList("uqypfcvle", "chpqbmfpjba", "widf", "xsspuunnoxyhk")); - model = BinaryData.fromObject(model).toObject(AccessRuleProperties.class); - Assertions.assertEquals(AccessRuleDirection.OUTBOUND, model.direction()); - Assertions.assertEquals("fhjxakvvjgs", model.addressPrefixes().get(0)); - Assertions.assertEquals("c", model.subscriptions().get(0).id()); - Assertions.assertEquals("udzpxgwjplmagstc", model.networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals(UUID.fromString("b722075a-1908-4073-b451-253007625fbb"), - model.networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("pfkyrkdbdgiogsj", model.networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("mfnczd", model.fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("zevwrdnhfukuv", model.emailAddresses().get(0)); - Assertions.assertEquals("uqypfcvle", model.phoneNumbers().get(0)); + Assertions.assertEquals("apeewchpxlkt", model.addressPrefixes().get(0)); + Assertions.assertEquals("zulwmmrqzzrrj", model.subscriptions().get(0).id()); + Assertions.assertEquals("tpzdmovzvfvaawzq", model.networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("f", model.networkSecurityPerimeters().get(0).perimeterGuid()); + Assertions.assertEquals("z", model.networkSecurityPerimeters().get(0).location()); + Assertions.assertEquals("yawfvjlboxq", model.fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("lmxhomdyn", model.emailAddresses().get(0)); + Assertions.assertEquals("ysdzhez", model.phoneNumbers().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRuleTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRuleTests.java index 817663d9717a..d383f4a6d0d0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRuleTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AccessRuleTests.java @@ -1,61 +1,29 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.AccessRule; import com.azure.resourcemanager.batch.models.AccessRuleDirection; -import com.azure.resourcemanager.batch.models.AccessRuleProperties; -import com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscriptionsItem; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter; -import java.util.Arrays; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class AccessRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AccessRule model = BinaryData.fromString( - "{\"name\":\"gzukxitmm\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"x\"],\"subscriptions\":[{\"id\":\"rxcpjuisavo\"}],\"networkSecurityPerimeters\":[{\"id\":\"fvazivjlfrqttba\",\"perimeterGuid\":\"94378cbc-6a02-46fe-b45a-1fcde6eabef3\",\"location\":\"atnwxyiopi\"}],\"fullyQualifiedDomainNames\":[\"qfkuvscxkdmli\",\"ovibrxkp\"],\"emailAddresses\":[\"azur\"],\"phoneNumbers\":[\"bgo\",\"rb\"]}}") + "{\"name\":\"gfnmntfpmvmemfnc\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"alxlllchp\"],\"subscriptions\":[{\"id\":\"evwrdnhfuk\"},{\"id\":\"sjcswsmystuluqyp\"}],\"networkSecurityPerimeters\":[{\"id\":\"er\",\"perimeterGuid\":\"pqbmfpjbab\",\"location\":\"dfc\"},{\"id\":\"spuunnoxyhkxgq\",\"perimeterGuid\":\"rihpfhoq\",\"location\":\"a\"},{\"id\":\"dao\",\"perimeterGuid\":\"jvlpjxxkzbr\",\"location\":\"geivsiykzkdncj\"},{\"id\":\"onbzoggculapzwy\",\"perimeterGuid\":\"gogtqxepnylbf\",\"location\":\"jlyjtlvofq\"}],\"fullyQualifiedDomainNames\":[\"fcibyfmowuxrkj\",\"vdwxfzwi\",\"vwzjbhyz\"],\"emailAddresses\":[\"rkambt\",\"negvmnvuqe\",\"vldspa\",\"tjb\"],\"phoneNumbers\":[\"mflvest\",\"jlxr\"]}}") .toObject(AccessRule.class); - Assertions.assertEquals("gzukxitmm", model.name()); - Assertions.assertEquals(AccessRuleDirection.OUTBOUND, model.properties().direction()); - Assertions.assertEquals("x", model.properties().addressPrefixes().get(0)); - Assertions.assertEquals("rxcpjuisavo", model.properties().subscriptions().get(0).id()); - Assertions.assertEquals("fvazivjlfrqttba", model.properties().networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals(UUID.fromString("94378cbc-6a02-46fe-b45a-1fcde6eabef3"), - model.properties().networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("atnwxyiopi", model.properties().networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("qfkuvscxkdmli", model.properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("azur", model.properties().emailAddresses().get(0)); - Assertions.assertEquals("bgo", model.properties().phoneNumbers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessRule model = new AccessRule().withName("gzukxitmm") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("x")) - .withSubscriptions(Arrays.asList(new AccessRulePropertiesSubscriptionsItem().withId("rxcpjuisavo"))) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeter().withId("fvazivjlfrqttba") - .withPerimeterGuid(UUID.fromString("94378cbc-6a02-46fe-b45a-1fcde6eabef3")) - .withLocation("atnwxyiopi"))) - .withFullyQualifiedDomainNames(Arrays.asList("qfkuvscxkdmli", "ovibrxkp")) - .withEmailAddresses(Arrays.asList("azur")) - .withPhoneNumbers(Arrays.asList("bgo", "rb"))); - model = BinaryData.fromObject(model).toObject(AccessRule.class); - Assertions.assertEquals("gzukxitmm", model.name()); - Assertions.assertEquals(AccessRuleDirection.OUTBOUND, model.properties().direction()); - Assertions.assertEquals("x", model.properties().addressPrefixes().get(0)); - Assertions.assertEquals("rxcpjuisavo", model.properties().subscriptions().get(0).id()); - Assertions.assertEquals("fvazivjlfrqttba", model.properties().networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals(UUID.fromString("94378cbc-6a02-46fe-b45a-1fcde6eabef3"), - model.properties().networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("atnwxyiopi", model.properties().networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("qfkuvscxkdmli", model.properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("azur", model.properties().emailAddresses().get(0)); - Assertions.assertEquals("bgo", model.properties().phoneNumbers().get(0)); + Assertions.assertEquals("gfnmntfpmvmemfnc", model.name()); + Assertions.assertEquals(AccessRuleDirection.INBOUND, model.properties().direction()); + Assertions.assertEquals("alxlllchp", model.properties().addressPrefixes().get(0)); + Assertions.assertEquals("evwrdnhfuk", model.properties().subscriptions().get(0).id()); + Assertions.assertEquals("er", model.properties().networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("pqbmfpjbab", model.properties().networkSecurityPerimeters().get(0).perimeterGuid()); + Assertions.assertEquals("dfc", model.properties().networkSecurityPerimeters().get(0).location()); + Assertions.assertEquals("fcibyfmowuxrkj", model.properties().fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("rkambt", model.properties().emailAddresses().get(0)); + Assertions.assertEquals("mflvest", model.properties().phoneNumbers().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ActivateApplicationPackageParametersTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ActivateApplicationPackageParametersTests.java index 54a7398a2a69..0f8331b74400 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ActivateApplicationPackageParametersTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ActivateApplicationPackageParametersTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,15 +11,16 @@ public final class ActivateApplicationPackageParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ActivateApplicationPackageParameters model - = BinaryData.fromString("{\"format\":\"ugpbkw\"}").toObject(ActivateApplicationPackageParameters.class); - Assertions.assertEquals("ugpbkw", model.format()); + ActivateApplicationPackageParameters model = BinaryData.fromString("{\"format\":\"lpbuxwgipwhonowk\"}") + .toObject(ActivateApplicationPackageParameters.class); + Assertions.assertEquals("lpbuxwgipwhonowk", model.format()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ActivateApplicationPackageParameters model = new ActivateApplicationPackageParameters().withFormat("ugpbkw"); + ActivateApplicationPackageParameters model + = new ActivateApplicationPackageParameters().withFormat("lpbuxwgipwhonowk"); model = BinaryData.fromObject(model).toObject(ActivateApplicationPackageParameters.class); - Assertions.assertEquals("ugpbkw", model.format()); + Assertions.assertEquals("lpbuxwgipwhonowk", model.format()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationInnerTests.java index bdc8b3f10c55..d89c2768c628 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -14,26 +14,26 @@ public final class ApplicationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"qfprwzwbn\",\"allowUpdates\":true,\"defaultVersion\":\"nwui\"},\"etag\":\"a\",\"tags\":{\"hr\":\"fizuckyf\",\"zwdzuh\":\"idf\",\"wxmnteiwao\":\"ymwisdkft\"},\"id\":\"vkmijcmmxdcuf\",\"name\":\"fsrpymzidnse\",\"type\":\"cxtbzsg\"}") + "{\"properties\":{\"displayName\":\"wankixzbi\",\"allowUpdates\":true,\"defaultVersion\":\"uttmrywnuzoqft\"},\"etag\":\"qzrnkcqvyxlwhz\",\"tags\":{\"nwvlryavwhheunmm\":\"cohoq\",\"koklya\":\"hgyxzkonoc\",\"ewrmjmwvvjektc\":\"uconuqszfkbey\"},\"id\":\"enhwlrs\",\"name\":\"frzpwvlqdqgb\",\"type\":\"qylihkaetckt\"}") .toObject(ApplicationInner.class); - Assertions.assertEquals("fizuckyf", model.tags().get("hr")); - Assertions.assertEquals("qfprwzwbn", model.displayName()); - Assertions.assertEquals(true, model.allowUpdates()); - Assertions.assertEquals("nwui", model.defaultVersion()); + Assertions.assertEquals("cohoq", model.tags().get("nwvlryavwhheunmm")); + Assertions.assertEquals("wankixzbi", model.displayName()); + Assertions.assertTrue(model.allowUpdates()); + Assertions.assertEquals("uttmrywnuzoqft", model.defaultVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationInner model - = new ApplicationInner().withTags(mapOf("hr", "fizuckyf", "zwdzuh", "idf", "wxmnteiwao", "ymwisdkft")) - .withDisplayName("qfprwzwbn") - .withAllowUpdates(true) - .withDefaultVersion("nwui"); + ApplicationInner model = new ApplicationInner() + .withTags(mapOf("nwvlryavwhheunmm", "cohoq", "koklya", "hgyxzkonoc", "ewrmjmwvvjektc", "uconuqszfkbey")) + .withDisplayName("wankixzbi") + .withAllowUpdates(true) + .withDefaultVersion("uttmrywnuzoqft"); model = BinaryData.fromObject(model).toObject(ApplicationInner.class); - Assertions.assertEquals("fizuckyf", model.tags().get("hr")); - Assertions.assertEquals("qfprwzwbn", model.displayName()); - Assertions.assertEquals(true, model.allowUpdates()); - Assertions.assertEquals("nwui", model.defaultVersion()); + Assertions.assertEquals("cohoq", model.tags().get("nwvlryavwhheunmm")); + Assertions.assertEquals("wankixzbi", model.displayName()); + Assertions.assertTrue(model.allowUpdates()); + Assertions.assertEquals("uttmrywnuzoqft", model.defaultVersion()); } // Use "Map.of" if available diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageInnerTests.java index 45616ba83c0d..706598fc69ee 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -14,17 +14,17 @@ public final class ApplicationPackageInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationPackageInner model = BinaryData.fromString( - "{\"properties\":{\"state\":\"Active\",\"format\":\"uqktap\",\"storageUrl\":\"wgcu\",\"storageUrlExpiry\":\"2021-09-03T10:30:33Z\",\"lastActivationTime\":\"2021-10-20T23:01:02Z\"},\"etag\":\"dosvqwhbmdgbbjf\",\"tags\":{\"q\":\"mbmbexppbh\",\"algbquxigjyjg\":\"rolfpfp\",\"lnerkujysvleju\":\"jaoyfhrtx\"},\"id\":\"fqawrlyxw\",\"name\":\"kcprbnw\",\"type\":\"xgjvtbv\"}") + "{\"properties\":{\"state\":\"Pending\",\"format\":\"uesnzwdejbavo\",\"storageUrl\":\"zdmohctbqvu\",\"storageUrlExpiry\":\"2021-02-11T14:48:18Z\",\"lastActivationTime\":\"2021-10-27T15:38:07Z\"},\"etag\":\"nvowgujju\",\"tags\":{\"dyggdtjixhbku\":\"kcglhslaz\",\"fyexfwhy\":\"fqweykhmene\"},\"id\":\"i\",\"name\":\"vyvdcs\",\"type\":\"tynnaamdectehfi\"}") .toObject(ApplicationPackageInner.class); - Assertions.assertEquals("mbmbexppbh", model.tags().get("q")); + Assertions.assertEquals("kcglhslaz", model.tags().get("dyggdtjixhbku")); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationPackageInner model = new ApplicationPackageInner() - .withTags(mapOf("q", "mbmbexppbh", "algbquxigjyjg", "rolfpfp", "lnerkujysvleju", "jaoyfhrtx")); + ApplicationPackageInner model + = new ApplicationPackageInner().withTags(mapOf("dyggdtjixhbku", "kcglhslaz", "fyexfwhy", "fqweykhmene")); model = BinaryData.fromObject(model).toObject(ApplicationPackageInner.class); - Assertions.assertEquals("mbmbexppbh", model.tags().get("q")); + Assertions.assertEquals("kcglhslaz", model.tags().get("dyggdtjixhbku")); } // Use "Map.of" if available diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagePropertiesTests.java index d1816834ddfe..fb94cd4e597b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagePropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,7 +11,7 @@ public final class ApplicationPackagePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationPackageProperties model = BinaryData.fromString( - "{\"state\":\"Pending\",\"format\":\"zdn\",\"storageUrl\":\"jq\",\"storageUrlExpiry\":\"2021-02-25T06:26:56Z\",\"lastActivationTime\":\"2021-02-09T18:19:16Z\"}") + "{\"state\":\"Pending\",\"format\":\"eypvhezrkg\",\"storageUrl\":\"c\",\"storageUrlExpiry\":\"2021-06-04T03:18:37Z\",\"lastActivationTime\":\"2021-01-31T01:02:03Z\"}") .toObject(ApplicationPackageProperties.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageReferenceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageReferenceTests.java index 967c3a8cd49e..8ee373d02ee2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageReferenceTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,18 +11,18 @@ public final class ApplicationPackageReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ApplicationPackageReference model = BinaryData.fromString("{\"id\":\"gbjcntujitcjed\",\"version\":\"wwa\"}") + ApplicationPackageReference model = BinaryData.fromString("{\"id\":\"paslthaqfxssmwu\",\"version\":\"bdsrez\"}") .toObject(ApplicationPackageReference.class); - Assertions.assertEquals("gbjcntujitcjed", model.id()); - Assertions.assertEquals("wwa", model.version()); + Assertions.assertEquals("paslthaqfxssmwu", model.id()); + Assertions.assertEquals("bdsrez", model.version()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ApplicationPackageReference model - = new ApplicationPackageReference().withId("gbjcntujitcjed").withVersion("wwa"); + = new ApplicationPackageReference().withId("paslthaqfxssmwu").withVersion("bdsrez"); model = BinaryData.fromObject(model).toObject(ApplicationPackageReference.class); - Assertions.assertEquals("gbjcntujitcjed", model.id()); - Assertions.assertEquals("wwa", model.version()); + Assertions.assertEquals("paslthaqfxssmwu", model.id()); + Assertions.assertEquals("bdsrez", model.version()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesActivateWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesActivateWithResponseMockTests.java index 6fc8f192be8f..6b5abb1a72f9 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesActivateWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesActivateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; @@ -22,21 +22,20 @@ public final class ApplicationPackagesActivateWithResponseMockTests { @Test public void testActivateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Pending\",\"format\":\"juwasqvdaeyyguxa\",\"storageUrl\":\"sqzhzbezkg\",\"storageUrlExpiry\":\"2021-11-26T20:56:36Z\",\"lastActivationTime\":\"2021-06-24T15:18:16Z\"},\"etag\":\"asi\",\"tags\":{\"wa\":\"yvvjskgfmo\",\"tjeaahhvjhh\":\"pqg\",\"bbjjidjksyxk\":\"akz\",\"euaulxu\":\"xvxevblbjednljla\"},\"id\":\"smjbnkppxyn\",\"name\":\"nlsvxeiz\",\"type\":\"gwklnsr\"}"; + = "{\"properties\":{\"state\":\"Pending\",\"format\":\"mjkavlgorbmft\",\"storageUrl\":\"dtzfjltfvnzcy\",\"storageUrlExpiry\":\"2021-04-05T23:27:31Z\",\"lastActivationTime\":\"2021-04-05T22:22:59Z\"},\"etag\":\"opv\",\"tags\":{\"edsvqwthmk\":\"bzqgqqi\",\"dhohsdtmcdzsuf\":\"ibcysihsgqc\",\"pcvhdbevwqqxeys\":\"ohdxbzlmcmu\"},\"id\":\"nqzi\",\"name\":\"kfkbgbzbowxeqocl\",\"type\":\"mygvkzqkj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationPackage response = manager.applicationPackages() - .activateWithResponse("lkzmegnitgvkxl", "yqdrf", "gcealzxwh", "ansym", - new ActivateApplicationPackageParameters().withFormat("yqhlwigdivbkbx"), - com.azure.core.util.Context.NONE) + .activateWithResponse("nlj", "nmgixh", "mavmq", "oudorhcgyyp", + new ActivateApplicationPackageParameters().withFormat("otwypundmb"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("yvvjskgfmo", response.tags().get("wa")); + Assertions.assertEquals("bzqgqqi", response.tags().get("edsvqwthmk")); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesCreateWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesCreateWithResponseMockTests.java index f12d103c07d3..4f51648e09dc 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesCreateWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesCreateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.ApplicationPackage; @@ -23,22 +23,22 @@ public final class ApplicationPackagesCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Active\",\"format\":\"a\",\"storageUrl\":\"qxnmwmqt\",\"storageUrlExpiry\":\"2021-05-22T17:44:07Z\",\"lastActivationTime\":\"2021-09-10T15:52:26Z\"},\"etag\":\"ddtvqctt\",\"tags\":{\"zaapmudqmeqwi\":\"jaeukmrsieekpn\",\"znrtffyaqit\":\"pibudqwyxebeybpm\"},\"id\":\"hheioqaqhvseuf\",\"name\":\"qyrxp\",\"type\":\"lcgqlsismj\"}"; + = "{\"properties\":{\"state\":\"Pending\",\"format\":\"dbn\",\"storageUrl\":\"ehol\",\"storageUrlExpiry\":\"2021-06-22T19:10:38Z\",\"lastActivationTime\":\"2021-04-16T07:06:36Z\"},\"etag\":\"ubwefqs\",\"tags\":{\"wexjkmfxapjwogq\":\"aqtferr\"},\"id\":\"o\",\"name\":\"pud\",\"type\":\"dabtqwp\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationPackage response = manager.applicationPackages() - .define("qtgdqohmcwsl") - .withExistingApplication("iftxfkf", "egprhptil", "ucb") - .withTags(mapOf("lhjlmuoyxprimr", "kjpdnjzhajo", "eislstvasylwx", "opteecj", "eoohguufuzboyj", "zaum")) + .define("gnzvdfbzdixzm") + .withExistingApplication("eokbze", "ezrxcczurtleipqx", "kwv") + .withTags(mapOf("hppr", "neqvcwwyyurmo")) .create(); - Assertions.assertEquals("jaeukmrsieekpn", response.tags().get("zaapmudqmeqwi")); + Assertions.assertEquals("aqtferr", response.tags().get("wexjkmfxapjwogq")); } // Use "Map.of" if available diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesDeleteWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesDeleteWithResponseMockTests.java index a602d10f3db5..3fac8d0ea62c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesDeleteWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.applicationPackages() - .deleteWithResponse("ffeycx", "ktp", "ymerteeammxq", "ekkkzd", com.azure.core.util.Context.NONE); + .deleteWithResponse("evy", "yhsgz", "czbgomfgbeg", "qgleohibetnluank", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesGetWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesGetWithResponseMockTests.java index da5caf9bcf7a..90012db650d8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesGetWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.ApplicationPackage; @@ -21,20 +21,19 @@ public final class ApplicationPackagesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"state\":\"Pending\",\"format\":\"zeexavoxtfgle\",\"storageUrl\":\"m\",\"storageUrlExpiry\":\"2021-09-11T05:37:48Z\",\"lastActivationTime\":\"2021-06-07T09:18:40Z\"},\"etag\":\"pqtgsfjac\",\"tags\":{\"xvodhtnsir\":\"hhxud\",\"gzrcxfailcfxwmdb\":\"dhzmmesckdlp\",\"lnacgcc\":\"xdfgsftufqobr\",\"kizvytn\":\"knh\"},\"id\":\"zvulj\",\"name\":\"aaeranokqgukk\",\"type\":\"qnvb\"}"; + = "{\"properties\":{\"state\":\"Pending\",\"format\":\"rngifl\",\"storageUrl\":\"pasccbi\",\"storageUrlExpiry\":\"2021-02-19T12:22:52Z\",\"lastActivationTime\":\"2021-07-29T06:48:21Z\"},\"etag\":\"yjdfqwmky\",\"tags\":{\"lzo\":\"fdvruz\",\"fnmdxotn\":\"hpc\"},\"id\":\"dgug\",\"name\":\"yzihgrkyuizabsn\",\"type\":\"fpphoj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ApplicationPackage response = manager.applicationPackages() - .getWithResponse("rtkgdojbmxvavref", "eesvecu", "jpxtxsuwprtuj", "sawddjibabxvi", - com.azure.core.util.Context.NONE) + .getWithResponse("boxjumvq", "olihrra", "ouau", "rjtloq", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hhxud", response.tags().get("xvodhtnsir")); + Assertions.assertEquals("fdvruz", response.tags().get("lzo")); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesListMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesListMockTests.java index d7ba6a1db61d..480df72e81d5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesListMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.ApplicationPackage; @@ -22,18 +22,18 @@ public final class ApplicationPackagesListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"state\":\"Active\",\"format\":\"fnwmbtmvpdvj\",\"storageUrl\":\"ttzaefed\",\"storageUrlExpiry\":\"2021-08-06T13:46:48Z\",\"lastActivationTime\":\"2021-09-29T04:01:44Z\"},\"etag\":\"phkmcrjdqnsdfz\",\"tags\":{\"ylkdghrje\":\"tg\",\"bwnhhtql\":\"utlwxezwzhok\",\"pifhpfeoajvgcxtx\":\"ehgpp\"},\"id\":\"csheafidltugsr\",\"name\":\"smkss\",\"type\":\"h\"}]}"; + = "{\"value\":[{\"properties\":{\"state\":\"Active\",\"format\":\"veh\",\"storageUrl\":\"uyxoaf\",\"storageUrlExpiry\":\"2021-03-08T11:58:40Z\",\"lastActivationTime\":\"2021-05-13T08:39:20Z\"},\"etag\":\"faey\",\"tags\":{\"eyhlqhykprl\":\"mfgvxirpghriypo\"},\"id\":\"znuciqdsm\",\"name\":\"xiitdfuxt\",\"type\":\"asiibmiybnnust\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.applicationPackages() - .list("oylaxxul", "disdosfjbjsvgj", "whryvycytdcl", 513530726, com.azure.core.util.Context.NONE); + .list("rfxeeebtij", "acvbmqz", "qqxlajr", 99469711, com.azure.core.util.Context.NONE); - Assertions.assertEquals("tg", response.iterator().next().tags().get("ylkdghrje")); + Assertions.assertEquals("mfgvxirpghriypo", response.iterator().next().tags().get("eyhlqhykprl")); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPropertiesTests.java index a870d63f510e..1d5337b6789d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,21 +12,21 @@ public final class ApplicationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ApplicationProperties model = BinaryData - .fromString("{\"displayName\":\"c\",\"allowUpdates\":true,\"defaultVersion\":\"wmdwzjeiachboo\"}") + .fromString("{\"displayName\":\"civfsnkymuctq\",\"allowUpdates\":true,\"defaultVersion\":\"ebrjcxe\"}") .toObject(ApplicationProperties.class); - Assertions.assertEquals("c", model.displayName()); - Assertions.assertEquals(true, model.allowUpdates()); - Assertions.assertEquals("wmdwzjeiachboo", model.defaultVersion()); + Assertions.assertEquals("civfsnkymuctq", model.displayName()); + Assertions.assertTrue(model.allowUpdates()); + Assertions.assertEquals("ebrjcxe", model.defaultVersion()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ApplicationProperties model = new ApplicationProperties().withDisplayName("c") + ApplicationProperties model = new ApplicationProperties().withDisplayName("civfsnkymuctq") .withAllowUpdates(true) - .withDefaultVersion("wmdwzjeiachboo"); + .withDefaultVersion("ebrjcxe"); model = BinaryData.fromObject(model).toObject(ApplicationProperties.class); - Assertions.assertEquals("c", model.displayName()); - Assertions.assertEquals(true, model.allowUpdates()); - Assertions.assertEquals("wmdwzjeiachboo", model.defaultVersion()); + Assertions.assertEquals("civfsnkymuctq", model.displayName()); + Assertions.assertTrue(model.allowUpdates()); + Assertions.assertEquals("ebrjcxe", model.defaultVersion()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsCreateWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsCreateWithResponseMockTests.java index 6b786aa5c9ef..be7ff8ce2a5e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsCreateWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsCreateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.Application; @@ -23,29 +23,28 @@ public final class ApplicationsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"kyuizabsnmfpp\",\"allowUpdates\":false,\"defaultVersion\":\"evy\"},\"etag\":\"hsgz\",\"tags\":{\"gleohi\":\"bgomfgbegl\",\"eebtijvacvb\":\"etnluankrrfx\",\"evehjkuyxoaf\":\"qzbqqxlajrnwxa\"},\"id\":\"aoqltfaey\",\"name\":\"inmfgvxirp\",\"type\":\"hriypoqeyhlqhy\"}"; + = "{\"properties\":{\"displayName\":\"fmd\",\"allowUpdates\":false,\"defaultVersion\":\"egizv\"},\"etag\":\"felisdjub\",\"tags\":{\"bsazgakg\":\"qigkx\",\"apvu\":\"cyrcmjdmspo\"},\"id\":\"ylnio\",\"name\":\"rz\",\"type\":\"bzjedmstk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Application response = manager.applications() - .define("wcyyufmhruncu") - .withExistingBatchAccount("ijpstte", "oqq") - .withTags(mapOf("jumvqqolihrraio", "cgegydcwbo", "fuojrngif", "aubrjtloq", "dfqwmkyoq", "rzpasccbiuimzdly", - "lzo", "fdvruz")) - .withDisplayName("spkcdqzh") - .withAllowUpdates(false) - .withDefaultVersion("dunqnd") + .define("gzwywak") + .withExistingBatchAccount("s", "sphaivmxyasflvg") + .withTags(mapOf("jlzqnhc", "yxonsupe", "bgsxgnxfyqonmpq", "sqltnzo", "iqxeiiqbimht", "xwdofdb")) + .withDisplayName("knsmjblmljhlnymz") + .withAllowUpdates(true) + .withDefaultVersion("ryuzcbmqqv") .create(); - Assertions.assertEquals("bgomfgbegl", response.tags().get("gleohi")); - Assertions.assertEquals("kyuizabsnmfpp", response.displayName()); - Assertions.assertEquals(false, response.allowUpdates()); - Assertions.assertEquals("evy", response.defaultVersion()); + Assertions.assertEquals("qigkx", response.tags().get("bsazgakg")); + Assertions.assertEquals("fmd", response.displayName()); + Assertions.assertFalse(response.allowUpdates()); + Assertions.assertEquals("egizv", response.defaultVersion()); } // Use "Map.of" if available diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsDeleteWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsDeleteWithResponseMockTests.java index ec83db486479..c25fadbc7fea 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsDeleteWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testDeleteWithResponse() throws Exception { BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.applications() - .deleteWithResponse("frddgamquhiosrsj", "ivfcdisyirnx", "hcz", com.azure.core.util.Context.NONE); + .deleteWithResponse("kyrioovzid", "xwaabzmifrygznmm", "xrizkzobgop", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsGetWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsGetWithResponseMockTests.java index 2982ad9f6d61..9063d4064137 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsGetWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.Application; @@ -21,22 +21,22 @@ public final class ApplicationsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"displayName\":\"onzlr\",\"allowUpdates\":true,\"defaultVersion\":\"wncvjtszcofiz\"},\"etag\":\"tdhgbjkvrelj\",\"tags\":{\"lpmjerb\":\"urvzmlovuanashc\",\"cxjmonfdgnwncyp\":\"kelvidizozsdb\"},\"id\":\"uwwltvuqjctz\",\"name\":\"nkeifz\",\"type\":\"hmkdasvfl\"}"; + = "{\"properties\":{\"displayName\":\"daultxijjumfq\",\"allowUpdates\":false,\"defaultVersion\":\"nqnm\"},\"etag\":\"ngz\",\"tags\":{\"uik\":\"xtbjwgnyfusfzsv\",\"l\":\"hajqglcfh\",\"nzrdpsovwxz\":\"qryxyn\"},\"id\":\"tgoe\",\"name\":\"ybbabpfhvfsl\",\"type\":\"vntjlrigjk\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); Application response = manager.applications() - .getWithResponse("xrxzbujrtr", "qvwre", "khgn", com.azure.core.util.Context.NONE) + .getWithResponse("yawbzasqbu", "ljgkyex", "oguyaip", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("urvzmlovuanashc", response.tags().get("lpmjerb")); - Assertions.assertEquals("onzlr", response.displayName()); - Assertions.assertEquals(true, response.allowUpdates()); - Assertions.assertEquals("wncvjtszcofiz", response.defaultVersion()); + Assertions.assertEquals("xtbjwgnyfusfzsv", response.tags().get("uik")); + Assertions.assertEquals("daultxijjumfq", response.displayName()); + Assertions.assertFalse(response.allowUpdates()); + Assertions.assertEquals("nqnm", response.defaultVersion()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsListMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsListMockTests.java index ea5daed0741a..3abc1b99a62b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsListMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.Application; @@ -22,21 +22,21 @@ public final class ApplicationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"d\",\"allowUpdates\":true,\"defaultVersion\":\"bwjl\"},\"etag\":\"zbfhfovvac\",\"tags\":{\"muaslzkw\":\"tuodxeszabbelaw\",\"hnomdrkywuh\":\"rwoycqucwyh\",\"lniexz\":\"svfuurutlwexxwl\",\"tybbwwpgda\":\"rzpgep\"},\"id\":\"chzyvlixqnrk\",\"name\":\"xkjibnxmy\",\"type\":\"uxswqrntvl\"}]}"; + = "{\"value\":[{\"properties\":{\"displayName\":\"u\",\"allowUpdates\":true,\"defaultVersion\":\"wfmvigorqjbt\"},\"etag\":\"h\",\"tags\":{\"ckpzvcpopmxeln\":\"lkafhonqjuje\"},\"id\":\"ltyjedexxmlfmk\",\"name\":\"scazuawxtzxpu\",\"type\":\"mwabzxrvxc\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.applications().list("hbxcu", "chxgs", 581977719, com.azure.core.util.Context.NONE); + PagedIterable response = manager.applications() + .list("lhslnelxieixyn", "lxecwcrojphslh", 1950919365, com.azure.core.util.Context.NONE); - Assertions.assertEquals("tuodxeszabbelaw", response.iterator().next().tags().get("muaslzkw")); - Assertions.assertEquals("d", response.iterator().next().displayName()); - Assertions.assertEquals(true, response.iterator().next().allowUpdates()); - Assertions.assertEquals("bwjl", response.iterator().next().defaultVersion()); + Assertions.assertEquals("lkafhonqjuje", response.iterator().next().tags().get("ckpzvcpopmxeln")); + Assertions.assertEquals("u", response.iterator().next().displayName()); + Assertions.assertTrue(response.iterator().next().allowUpdates()); + Assertions.assertEquals("wfmvigorqjbt", response.iterator().next().defaultVersion()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoScaleSettingsTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoScaleSettingsTests.java index 1e56f09be004..4800dd8cf1ca 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoScaleSettingsTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,18 +12,19 @@ public final class AutoScaleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AutoScaleSettings model = BinaryData.fromString("{\"formula\":\"xozap\",\"evaluationInterval\":\"PT3H57M21S\"}") - .toObject(AutoScaleSettings.class); - Assertions.assertEquals("xozap", model.formula()); - Assertions.assertEquals(Duration.parse("PT3H57M21S"), model.evaluationInterval()); + AutoScaleSettings model + = BinaryData.fromString("{\"formula\":\"dtbnnha\",\"evaluationInterval\":\"PT60H30M48S\"}") + .toObject(AutoScaleSettings.class); + Assertions.assertEquals("dtbnnha", model.formula()); + Assertions.assertEquals(Duration.parse("PT60H30M48S"), model.evaluationInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AutoScaleSettings model - = new AutoScaleSettings().withFormula("xozap").withEvaluationInterval(Duration.parse("PT3H57M21S")); + = new AutoScaleSettings().withFormula("dtbnnha").withEvaluationInterval(Duration.parse("PT60H30M48S")); model = BinaryData.fromObject(model).toObject(AutoScaleSettings.class); - Assertions.assertEquals("xozap", model.formula()); - Assertions.assertEquals(Duration.parse("PT3H57M21S"), model.evaluationInterval()); + Assertions.assertEquals("dtbnnha", model.formula()); + Assertions.assertEquals(Duration.parse("PT60H30M48S"), model.evaluationInterval()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoStorageBasePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoStorageBasePropertiesTests.java index d66860a75c12..c44963d61944 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoStorageBasePropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoStorageBasePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -14,21 +14,23 @@ public final class AutoStorageBasePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutoStorageBaseProperties model = BinaryData.fromString( - "{\"storageAccountId\":\"btcqq\",\"authenticationMode\":\"StorageKeys\",\"nodeIdentityReference\":{\"resourceId\":\"hqgnufooojywif\"}}") + "{\"storageAccountId\":\"vmgxsab\",\"authenticationMode\":\"BatchAccountManagedIdentity\",\"nodeIdentityReference\":{\"resourceId\":\"ujitcjcz\"}}") .toObject(AutoStorageBaseProperties.class); - Assertions.assertEquals("btcqq", model.storageAccountId()); - Assertions.assertEquals(AutoStorageAuthenticationMode.STORAGE_KEYS, model.authenticationMode()); - Assertions.assertEquals("hqgnufooojywif", model.nodeIdentityReference().resourceId()); + Assertions.assertEquals("vmgxsab", model.storageAccountId()); + Assertions.assertEquals(AutoStorageAuthenticationMode.BATCH_ACCOUNT_MANAGED_IDENTITY, + model.authenticationMode()); + Assertions.assertEquals("ujitcjcz", model.nodeIdentityReference().resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AutoStorageBaseProperties model = new AutoStorageBaseProperties().withStorageAccountId("btcqq") - .withAuthenticationMode(AutoStorageAuthenticationMode.STORAGE_KEYS) - .withNodeIdentityReference(new ComputeNodeIdentityReference().withResourceId("hqgnufooojywif")); + AutoStorageBaseProperties model = new AutoStorageBaseProperties().withStorageAccountId("vmgxsab") + .withAuthenticationMode(AutoStorageAuthenticationMode.BATCH_ACCOUNT_MANAGED_IDENTITY) + .withNodeIdentityReference(new ComputeNodeIdentityReference().withResourceId("ujitcjcz")); model = BinaryData.fromObject(model).toObject(AutoStorageBaseProperties.class); - Assertions.assertEquals("btcqq", model.storageAccountId()); - Assertions.assertEquals(AutoStorageAuthenticationMode.STORAGE_KEYS, model.authenticationMode()); - Assertions.assertEquals("hqgnufooojywif", model.nodeIdentityReference().resourceId()); + Assertions.assertEquals("vmgxsab", model.storageAccountId()); + Assertions.assertEquals(AutoStorageAuthenticationMode.BATCH_ACCOUNT_MANAGED_IDENTITY, + model.authenticationMode()); + Assertions.assertEquals("ujitcjcz", model.nodeIdentityReference().resourceId()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoUserSpecificationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoUserSpecificationTests.java index 8e96c414e957..39b7b066f765 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoUserSpecificationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoUserSpecificationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutomaticOSUpgradePolicyTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutomaticOSUpgradePolicyTests.java index 913d67411231..9a522b82dfc8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutomaticOSUpgradePolicyTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutomaticOSUpgradePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,24 +12,24 @@ public final class AutomaticOSUpgradePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AutomaticOSUpgradePolicy model = BinaryData.fromString( - "{\"disableAutomaticRollback\":true,\"enableAutomaticOSUpgrade\":true,\"useRollingUpgradePolicy\":true,\"osRollingUpgradeDeferral\":false}") + "{\"disableAutomaticRollback\":true,\"enableAutomaticOSUpgrade\":false,\"useRollingUpgradePolicy\":true,\"osRollingUpgradeDeferral\":false}") .toObject(AutomaticOSUpgradePolicy.class); - Assertions.assertEquals(true, model.disableAutomaticRollback()); - Assertions.assertEquals(true, model.enableAutomaticOSUpgrade()); - Assertions.assertEquals(true, model.useRollingUpgradePolicy()); - Assertions.assertEquals(false, model.osRollingUpgradeDeferral()); + Assertions.assertTrue(model.disableAutomaticRollback()); + Assertions.assertFalse(model.enableAutomaticOSUpgrade()); + Assertions.assertTrue(model.useRollingUpgradePolicy()); + Assertions.assertFalse(model.osRollingUpgradeDeferral()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AutomaticOSUpgradePolicy model = new AutomaticOSUpgradePolicy().withDisableAutomaticRollback(true) - .withEnableAutomaticOSUpgrade(true) + .withEnableAutomaticOSUpgrade(false) .withUseRollingUpgradePolicy(true) .withOsRollingUpgradeDeferral(false); model = BinaryData.fromObject(model).toObject(AutomaticOSUpgradePolicy.class); - Assertions.assertEquals(true, model.disableAutomaticRollback()); - Assertions.assertEquals(true, model.enableAutomaticOSUpgrade()); - Assertions.assertEquals(true, model.useRollingUpgradePolicy()); - Assertions.assertEquals(false, model.osRollingUpgradeDeferral()); + Assertions.assertTrue(model.disableAutomaticRollback()); + Assertions.assertFalse(model.enableAutomaticOSUpgrade()); + Assertions.assertTrue(model.useRollingUpgradePolicy()); + Assertions.assertFalse(model.osRollingUpgradeDeferral()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AzureProxyResourceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AzureProxyResourceTests.java deleted file mode 100644 index a29763f41cb5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AzureProxyResourceTests.java +++ /dev/null @@ -1,41 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.AzureProxyResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AzureProxyResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureProxyResource model = BinaryData.fromString( - "{\"etag\":\"sntnbybkzgcw\",\"tags\":{\"vkocrcjdkwtn\":\"lxxwrljdouskc\",\"gls\":\"xbnjbiksq\",\"pee\":\"ainqpjwnzlljfm\"},\"id\":\"vmgxsab\",\"name\":\"yqduujit\",\"type\":\"jczdzevndh\"}") - .toObject(AzureProxyResource.class); - Assertions.assertEquals("lxxwrljdouskc", model.tags().get("vkocrcjdkwtn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureProxyResource model = new AzureProxyResource() - .withTags(mapOf("vkocrcjdkwtn", "lxxwrljdouskc", "gls", "xbnjbiksq", "pee", "ainqpjwnzlljfm")); - model = BinaryData.fromObject(model).toObject(AzureProxyResource.class); - Assertions.assertEquals("lxxwrljdouskc", model.tags().get("vkocrcjdkwtn")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountIdentityTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountIdentityTests.java index eedee1de3447..083793dbc8a3 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountIdentityTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -16,7 +16,7 @@ public final class BatchAccountIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BatchAccountIdentity model = BinaryData.fromString( - "{\"principalId\":\"rcryuanzwuxzdxta\",\"tenantId\":\"lhmwhfpmrqobm\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"kohdbiha\":{\"principalId\":\"ryrtihfxtijbpzv\",\"clientId\":\"wzsymglzufcy\"},\"git\":{\"principalId\":\"fhfcb\",\"clientId\":\"s\"},\"n\":{\"principalId\":\"qhabifpikxwcz\",\"clientId\":\"scnpqxuhivy\"},\"grtfwvu\":{\"principalId\":\"b\",\"clientId\":\"rkxvdum\"}}}") + "{\"principalId\":\"kvwrwjfeu\",\"tenantId\":\"hutje\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ozwyiftyhxhuro\":{\"principalId\":\"dhugjzzdatqxhocd\",\"clientId\":\"ablgphuticndvk\"}}}") .toObject(BatchAccountIdentity.class); Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); } @@ -24,9 +24,7 @@ public void testDeserialize() throws Exception { @org.junit.jupiter.api.Test public void testSerialize() throws Exception { BatchAccountIdentity model = new BatchAccountIdentity().withType(ResourceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("kohdbiha", new UserAssignedIdentities(), "git", new UserAssignedIdentities(), "n", - new UserAssignedIdentities(), "grtfwvu", new UserAssignedIdentities())); + .withUserAssignedIdentities(mapOf("ozwyiftyhxhuro", new UserAssignedIdentities())); model = BinaryData.fromObject(model).toObject(BatchAccountIdentity.class); Assertions.assertEquals(ResourceIdentityType.USER_ASSIGNED, model.type()); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountKeysInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountKeysInnerTests.java index c262a2a997a8..5568ef6d120d 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountKeysInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountKeysInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,14 +11,7 @@ public final class BatchAccountKeysInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BatchAccountKeysInner model = BinaryData - .fromString( - "{\"accountName\":\"ibmadgakeqsrxy\",\"primary\":\"qqedqytbciqfou\",\"secondary\":\"mmnkzsmodmgl\"}") + .fromString("{\"accountName\":\"tbzsgfyccs\",\"primary\":\"wmdwzjeiachboo\",\"secondary\":\"lnrosfqp\"}") .toObject(BatchAccountKeysInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchAccountKeysInner model = new BatchAccountKeysInner(); - model = BinaryData.fromObject(model).toObject(BatchAccountKeysInner.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsDeleteMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsDeleteMockTests.java index 5ebe5988af47..9dbf1d0887ef 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsDeleteMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.batchAccounts().delete("s", "wn", com.azure.core.util.Context.NONE); + manager.batchAccounts().delete("etpwbralll", "bphbqzmizakakank", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetDetectorWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetDetectorWithResponseMockTests.java index f66b34a67f3e..5c7eda7a7533 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetDetectorWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetDetectorWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.DetectorResponse; @@ -21,20 +21,20 @@ public final class BatchAccountsGetDetectorWithResponseMockTests { @Test public void testGetDetectorWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"value\":\"fiwrxgkn\"},\"etag\":\"vyi\",\"tags\":{\"fvpgshoxgsg\":\"o\",\"gzdjtxvzf\":\"p\"},\"id\":\"bqvgaqv\",\"name\":\"gafcqu\",\"type\":\"rdve\"}"; + = "{\"properties\":{\"value\":\"jtszcof\"},\"etag\":\"e\",\"tags\":{\"murvzm\":\"hgbjkvrelje\",\"anashc\":\"ov\",\"kelvidizozsdb\":\"lpmjerb\"},\"id\":\"xjmonf\",\"name\":\"gnwncypuuwwlt\",\"type\":\"uqj\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); DetectorResponse response = manager.batchAccounts() - .getDetectorWithResponse("juhdqazkmtgguwpi", "r", "jcivmmg", com.azure.core.util.Context.NONE) + .getDetectorWithResponse("h", "nlnzonzlrpi", "yw", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("o", response.tags().get("fvpgshoxgsg")); - Assertions.assertEquals("fiwrxgkn", response.value()); + Assertions.assertEquals("hgbjkvrelje", response.tags().get("murvzm")); + Assertions.assertEquals("jtszcof", response.value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetKeysWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetKeysWithResponseMockTests.java index 0fbd188dc384..e2325581fa2e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetKeysWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetKeysWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.BatchAccountKeys; @@ -19,18 +19,17 @@ public final class BatchAccountsGetKeysWithResponseMockTests { @Test public void testGetKeysWithResponse() throws Exception { - String responseStr - = "{\"accountName\":\"qbeitpkxztmoob\",\"primary\":\"ft\",\"secondary\":\"gfcwqmpimaqxzhem\"}"; + String responseStr = "{\"accountName\":\"bpmzzn\",\"primary\":\"ff\",\"secondary\":\"qitmhheioqaqhv\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BatchAccountKeys response = manager.batchAccounts() - .getKeysWithResponse("ehvvib", "xjjs", com.azure.core.util.Context.NONE) + .getKeysWithResponse("udqmeqwigpibudq", "yxeb", com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListDetectorsMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListDetectorsMockTests.java index 65e7249fa8ce..139cf9f96202 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListDetectorsMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListDetectorsMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.DetectorResponse; @@ -22,19 +22,19 @@ public final class BatchAccountsListDetectorsMockTests { @Test public void testListDetectors() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"value\":\"fajnjwltlwtjjguk\"},\"etag\":\"lhsnvkcdmx\",\"tags\":{\"aaomylweazu\":\"oaimlnw\",\"hwwn\":\"cse\",\"ousnfepgfewe\":\"jhlfzswpchwahf\",\"hdjhlimmbcx\":\"wlyxgncxyk\"},\"id\":\"h\",\"name\":\"cporxvxcjz\",\"type\":\"qizxfpxtgqscjavf\"}]}"; + = "{\"value\":[{\"properties\":{\"value\":\"mkdasv\"},\"etag\":\"yhbxcudchxgs\",\"tags\":{\"vizbfhfo\":\"ldforobwj\",\"bbelawumuaslzk\":\"vacqpbtuodxesz\",\"mdr\":\"rrwoycqucwyhahn\"},\"id\":\"wuhpsvfuur\",\"name\":\"tlwexxwlalniexz\",\"type\":\"rzpgep\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.batchAccounts().listDetectors("yhohujswtwkozzwc", "lkb", com.azure.core.util.Context.NONE); + = manager.batchAccounts().listDetectors("tzenk", "if", com.azure.core.util.Context.NONE); - Assertions.assertEquals("oaimlnw", response.iterator().next().tags().get("aaomylweazu")); - Assertions.assertEquals("fajnjwltlwtjjguk", response.iterator().next().value()); + Assertions.assertEquals("ldforobwj", response.iterator().next().tags().get("vizbfhfo")); + Assertions.assertEquals("mkdasv", response.iterator().next().value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListOutboundNetworkDependenciesEndpointsMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListOutboundNetworkDependenciesEndpointsMockTests.java index fd24eac526ac..c1f370fa88b7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListOutboundNetworkDependenciesEndpointsMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListOutboundNetworkDependenciesEndpointsMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.OutboundEnvironmentEndpoint; @@ -21,17 +21,17 @@ public final class BatchAccountsListOutboundNetworkDependenciesEndpointsMockTest @Test public void testListOutboundNetworkDependenciesEndpoints() throws Exception { String responseStr - = "{\"value\":[{\"category\":\"uqgsj\",\"endpoints\":[{\"domainName\":\"dxgketwzhhzjhfj\",\"description\":\"vvmu\",\"endpointDetails\":[{\"port\":476538973},{\"port\":1059094634}]},{\"domainName\":\"sx\",\"description\":\"hfbuzjyihsasbhud\",\"endpointDetails\":[{\"port\":719606175},{\"port\":651460177},{\"port\":840782124}]},{\"domainName\":\"ynsqyrpfoobr\",\"description\":\"tyms\",\"endpointDetails\":[{\"port\":46352269},{\"port\":1753734199},{\"port\":1999198955}]}]}]}"; + = "{\"value\":[{\"category\":\"os\",\"endpoints\":[{\"domainName\":\"ivfcdisyirnx\",\"description\":\"czexrxzbujrtrhqv\",\"endpointDetails\":[{\"port\":1039920222}]}]}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.batchAccounts() - .listOutboundNetworkDependenciesEndpoints("nwsdtutnwlduyc", "uzhyrmewipmvekdx", + .listOutboundNetworkDependenciesEndpoints("eufuqyrxpdlcgql", "ismjqfrddgamqu", com.azure.core.util.Context.NONE); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsSynchronizeAutoStorageKeysWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsSynchronizeAutoStorageKeysWithResponseMockTests.java index c0eced889978..e0d4d1d03221 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsSynchronizeAutoStorageKeysWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsSynchronizeAutoStorageKeysWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,10 @@ public void testSynchronizeAutoStorageKeysWithResponse() throws Exception { BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); manager.batchAccounts() - .synchronizeAutoStorageKeysWithResponse("zhyrpeto", "e", com.azure.core.util.Context.NONE); + .synchronizeAutoStorageKeysWithResponse("bxyijddtvq", "ttadijae", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchLocationQuotaInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchLocationQuotaInnerTests.java index dd86defcc88a..7a699e2729d0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchLocationQuotaInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchLocationQuotaInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,12 +11,6 @@ public final class BatchLocationQuotaInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BatchLocationQuotaInner model - = BinaryData.fromString("{\"accountQuota\":20476621}").toObject(BatchLocationQuotaInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchLocationQuotaInner model = new BatchLocationQuotaInner(); - model = BinaryData.fromObject(model).toObject(BatchLocationQuotaInner.class); + = BinaryData.fromString("{\"accountQuota\":783935050}").toObject(BatchLocationQuotaInner.class); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchPoolIdentityTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchPoolIdentityTests.java index b48313472da5..ba3e6cefc738 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchPoolIdentityTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchPoolIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -16,17 +16,18 @@ public final class BatchPoolIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BatchPoolIdentity model = BinaryData.fromString( - "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"kaivwit\":{\"principalId\":\"xicslfao\",\"clientId\":\"piyylhalnswhccsp\"}}}") + "{\"type\":\"None\",\"userAssignedIdentities\":{\"vdnkfxusem\":{\"principalId\":\"sccyajguqf\",\"clientId\":\"ygz\"},\"celve\":{\"principalId\":\"zrmuhapfcqdps\",\"clientId\":\"qvpsvuoymg\"},\"edkowepbqpcrfk\":{\"principalId\":\"ypql\",\"clientId\":\"eokerqwkyhkobopg\"}}}") .toObject(BatchPoolIdentity.class); - Assertions.assertEquals(PoolIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(PoolIdentityType.NONE, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BatchPoolIdentity model = new BatchPoolIdentity().withType(PoolIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("kaivwit", new UserAssignedIdentities())); + BatchPoolIdentity model = new BatchPoolIdentity().withType(PoolIdentityType.NONE) + .withUserAssignedIdentities(mapOf("vdnkfxusem", new UserAssignedIdentities(), "celve", + new UserAssignedIdentities(), "edkowepbqpcrfk", new UserAssignedIdentities())); model = BinaryData.fromObject(model).toObject(BatchPoolIdentity.class); - Assertions.assertEquals(PoolIdentityType.USER_ASSIGNED, model.type()); + Assertions.assertEquals(PoolIdentityType.NONE, model.type()); } // Use "Map.of" if available diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateBasePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateBasePropertiesTests.java deleted file mode 100644 index 24acfd0e0fb2..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateBasePropertiesTests.java +++ /dev/null @@ -1,33 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.CertificateBaseProperties; -import com.azure.resourcemanager.batch.models.CertificateFormat; -import org.junit.jupiter.api.Assertions; - -public final class CertificateBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificateBaseProperties model = BinaryData - .fromString("{\"thumbprintAlgorithm\":\"imoryocfsfksym\",\"thumbprint\":\"ys\",\"format\":\"Pfx\"}") - .toObject(CertificateBaseProperties.class); - Assertions.assertEquals("imoryocfsfksym", model.thumbprintAlgorithm()); - Assertions.assertEquals("ys", model.thumbprint()); - Assertions.assertEquals(CertificateFormat.PFX, model.format()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificateBaseProperties model = new CertificateBaseProperties().withThumbprintAlgorithm("imoryocfsfksym") - .withThumbprint("ys") - .withFormat(CertificateFormat.PFX); - model = BinaryData.fromObject(model).toObject(CertificateBaseProperties.class); - Assertions.assertEquals("imoryocfsfksym", model.thumbprintAlgorithm()); - Assertions.assertEquals("ys", model.thumbprint()); - Assertions.assertEquals(CertificateFormat.PFX, model.format()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateReferenceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateReferenceTests.java deleted file mode 100644 index 0e7a5bcd6c91..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateReferenceTests.java +++ /dev/null @@ -1,38 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.CertificateReference; -import com.azure.resourcemanager.batch.models.CertificateStoreLocation; -import com.azure.resourcemanager.batch.models.CertificateVisibility; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CertificateReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificateReference model = BinaryData.fromString( - "{\"id\":\"u\",\"storeLocation\":\"CurrentUser\",\"storeName\":\"qlgkfbtn\",\"visibility\":[\"StartTask\",\"Task\"]}") - .toObject(CertificateReference.class); - Assertions.assertEquals("u", model.id()); - Assertions.assertEquals(CertificateStoreLocation.CURRENT_USER, model.storeLocation()); - Assertions.assertEquals("qlgkfbtn", model.storeName()); - Assertions.assertEquals(CertificateVisibility.START_TASK, model.visibility().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificateReference model = new CertificateReference().withId("u") - .withStoreLocation(CertificateStoreLocation.CURRENT_USER) - .withStoreName("qlgkfbtn") - .withVisibility(Arrays.asList(CertificateVisibility.START_TASK, CertificateVisibility.TASK)); - model = BinaryData.fromObject(model).toObject(CertificateReference.class); - Assertions.assertEquals("u", model.id()); - Assertions.assertEquals(CertificateStoreLocation.CURRENT_USER, model.storeLocation()); - Assertions.assertEquals("qlgkfbtn", model.storeName()); - Assertions.assertEquals(CertificateVisibility.START_TASK, model.visibility().get(0)); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificatesDeleteMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificatesDeleteMockTests.java deleted file mode 100644 index 5caf64d243bc..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificatesDeleteMockTests.java +++ /dev/null @@ -1,33 +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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.batch.BatchManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - BatchManager manager = BatchManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.certificates().delete("bzdixzmq", "noda", "opqhewjptmc", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityParametersTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityParametersTests.java index 413c9636f9b3..0d1b37c20366 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityParametersTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityParametersTests.java @@ -1,25 +1,30 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; +import com.azure.resourcemanager.batch.models.ResourceType; import org.junit.jupiter.api.Assertions; public final class CheckNameAvailabilityParametersTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckNameAvailabilityParameters model - = BinaryData.fromString("{\"name\":\"vhezrkgqhcj\"}").toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("vhezrkgqhcj", model.name()); + = BinaryData.fromString("{\"name\":\"a\",\"type\":\"Microsoft.Batch/batchAccounts\"}") + .toObject(CheckNameAvailabilityParameters.class); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - CheckNameAvailabilityParameters model = new CheckNameAvailabilityParameters().withName("vhezrkgqhcj"); + CheckNameAvailabilityParameters model + = new CheckNameAvailabilityParameters().withName("a").withType(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS); model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("vhezrkgqhcj", model.name()); + Assertions.assertEquals("a", model.name()); + Assertions.assertEquals(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS, model.type()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityResultInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityResultInnerTests.java index 650d94b2c57e..303311e3b015 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityResultInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityResultInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,13 +11,7 @@ public final class CheckNameAvailabilityResultInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { CheckNameAvailabilityResultInner model - = BinaryData.fromString("{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"mkqsleyyv\"}") + = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"ch\"}") .toObject(CheckNameAvailabilityResultInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResultInner model = new CheckNameAvailabilityResultInner(); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResultInner.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ComputeNodeIdentityReferenceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ComputeNodeIdentityReferenceTests.java index f9ba169cb693..17af4f83728c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ComputeNodeIdentityReferenceTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ComputeNodeIdentityReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,14 +12,14 @@ public final class ComputeNodeIdentityReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ComputeNodeIdentityReference model - = BinaryData.fromString("{\"resourceId\":\"esaagdfm\"}").toObject(ComputeNodeIdentityReference.class); - Assertions.assertEquals("esaagdfm", model.resourceId()); + = BinaryData.fromString("{\"resourceId\":\"evndh\"}").toObject(ComputeNodeIdentityReference.class); + Assertions.assertEquals("evndh", model.resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ComputeNodeIdentityReference model = new ComputeNodeIdentityReference().withResourceId("esaagdfm"); + ComputeNodeIdentityReference model = new ComputeNodeIdentityReference().withResourceId("evndh"); model = BinaryData.fromObject(model).toObject(ComputeNodeIdentityReference.class); - Assertions.assertEquals("esaagdfm", model.resourceId()); + Assertions.assertEquals("evndh", model.resourceId()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ContainerHostBatchBindMountEntryTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ContainerHostBatchBindMountEntryTests.java index 5babcb15ddf9..c62117373c06 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ContainerHostBatchBindMountEntryTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ContainerHostBatchBindMountEntryTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -15,7 +15,7 @@ public void testDeserialize() throws Exception { ContainerHostBatchBindMountEntry model = BinaryData.fromString("{\"source\":\"Startup\",\"isReadOnly\":true}") .toObject(ContainerHostBatchBindMountEntry.class); Assertions.assertEquals(ContainerHostDataPath.STARTUP, model.source()); - Assertions.assertEquals(true, model.isReadOnly()); + Assertions.assertTrue(model.isReadOnly()); } @org.junit.jupiter.api.Test @@ -24,6 +24,6 @@ public void testSerialize() throws Exception { = new ContainerHostBatchBindMountEntry().withSource(ContainerHostDataPath.STARTUP).withIsReadOnly(true); model = BinaryData.fromObject(model).toObject(ContainerHostBatchBindMountEntry.class); Assertions.assertEquals(ContainerHostDataPath.STARTUP, model.source()); - Assertions.assertEquals(true, model.isReadOnly()); + Assertions.assertTrue(model.isReadOnly()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DataDiskTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DataDiskTests.java index 2e3158176dcb..af16fff70fc1 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DataDiskTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DataDiskTests.java @@ -1,37 +1,54 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.CachingType; import com.azure.resourcemanager.batch.models.DataDisk; +import com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters; +import com.azure.resourcemanager.batch.models.ManagedDisk; +import com.azure.resourcemanager.batch.models.SecurityEncryptionTypes; import com.azure.resourcemanager.batch.models.StorageAccountType; +import com.azure.resourcemanager.batch.models.VMDiskSecurityProfile; import org.junit.jupiter.api.Assertions; public final class DataDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DataDisk model = BinaryData.fromString( - "{\"lun\":2043531661,\"caching\":\"ReadWrite\",\"diskSizeGB\":900444322,\"storageAccountType\":\"StandardSSD_LRS\"}") + "{\"lun\":1397433575,\"caching\":\"None\",\"diskSizeGB\":1403476628,\"managedDisk\":{\"storageAccountType\":\"StandardSSD_LRS\",\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\",\"diskEncryptionSet\":{\"id\":\"bq\"}},\"diskEncryptionSet\":{\"id\":\"vmkcx\"}}}") .toObject(DataDisk.class); - Assertions.assertEquals(2043531661, model.lun()); - Assertions.assertEquals(CachingType.READ_WRITE, model.caching()); - Assertions.assertEquals(900444322, model.diskSizeGB()); - Assertions.assertEquals(StorageAccountType.STANDARD_SSD_LRS, model.storageAccountType()); + Assertions.assertEquals(1397433575, model.lun()); + Assertions.assertEquals(CachingType.NONE, model.caching()); + Assertions.assertEquals(1403476628, model.diskSizeGB()); + Assertions.assertEquals(StorageAccountType.STANDARD_SSD_LRS, model.managedDisk().storageAccountType()); + Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, + model.managedDisk().securityProfile().securityEncryptionType()); + Assertions.assertEquals("bq", model.managedDisk().securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("vmkcx", model.managedDisk().diskEncryptionSet().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - DataDisk model = new DataDisk().withLun(2043531661) - .withCaching(CachingType.READ_WRITE) - .withDiskSizeGB(900444322) - .withStorageAccountType(StorageAccountType.STANDARD_SSD_LRS); + DataDisk model + = new DataDisk().withLun(1397433575) + .withCaching(CachingType.NONE) + .withDiskSizeGB(1403476628) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_SSD_LRS) + .withSecurityProfile(new VMDiskSecurityProfile() + .withSecurityEncryptionType(SecurityEncryptionTypes.NON_PERSISTED_TPM) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("bq"))) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("vmkcx"))); model = BinaryData.fromObject(model).toObject(DataDisk.class); - Assertions.assertEquals(2043531661, model.lun()); - Assertions.assertEquals(CachingType.READ_WRITE, model.caching()); - Assertions.assertEquals(900444322, model.diskSizeGB()); - Assertions.assertEquals(StorageAccountType.STANDARD_SSD_LRS, model.storageAccountType()); + Assertions.assertEquals(1397433575, model.lun()); + Assertions.assertEquals(CachingType.NONE, model.caching()); + Assertions.assertEquals(1403476628, model.diskSizeGB()); + Assertions.assertEquals(StorageAccountType.STANDARD_SSD_LRS, model.managedDisk().storageAccountType()); + Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, + model.managedDisk().securityProfile().securityEncryptionType()); + Assertions.assertEquals("bq", model.managedDisk().securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("vmkcx", model.managedDisk().diskEncryptionSet().id()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorListResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorListResultTests.java index a12a444385ea..1546194556de 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorListResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorListResultTests.java @@ -1,49 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; -import com.azure.resourcemanager.batch.models.DetectorListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.batch.implementation.models.DetectorListResult; import org.junit.jupiter.api.Assertions; public final class DetectorListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DetectorListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"value\":\"atkpnp\"},\"etag\":\"exxbczwtr\",\"tags\":{\"yokacspkw\":\"qzbqjvsov\",\"rkcciwwzjuqk\":\"hzdobpxjmflbvvnc\"},\"id\":\"rsa\",\"name\":\"iwkuofos\",\"type\":\"ghsauuimjmvxied\"}],\"nextLink\":\"gidyjrrf\"}") + "{\"value\":[{\"properties\":{\"value\":\"fcyddg\"},\"etag\":\"jthjqkwpyei\",\"tags\":{\"pbobjo\":\"qciwqvhkhixuigdt\"},\"id\":\"m\",\"name\":\"w\",\"type\":\"a\"},{\"properties\":{\"value\":\"hrzayvvtpgvdf\"},\"etag\":\"otkftutqxlngx\",\"tags\":{\"xkrxdqmi\":\"gug\",\"abhjybi\":\"tthzrvqd\",\"ktzlcuiywg\":\"ehoqfbowskan\",\"nhzgpphrcgyn\":\"ywgndrv\"},\"id\":\"cpecfvmmcoofs\",\"name\":\"lzevgbmqjqab\",\"type\":\"y\"},{\"properties\":{\"value\":\"vkwlzuvccfwnf\"},\"etag\":\"acfi\",\"tags\":{\"qbqqwxr\":\"ebxetqgtzxdp\"},\"id\":\"eallnwsubisnj\",\"name\":\"mpmngnzscxaqwoo\",\"type\":\"hcbonqvpkvlr\"},{\"properties\":{\"value\":\"ea\"},\"etag\":\"ipheoflokeyyien\",\"tags\":{\"jumasx\":\"lwtgrhpdj\",\"qyeg\":\"zj\",\"hejjz\":\"alhbx\"},\"id\":\"dudgwdslfhot\",\"name\":\"mcy\",\"type\":\"pwlbjnpg\"}],\"nextLink\":\"ftadehxnltyfs\"}") .toObject(DetectorListResult.class); - Assertions.assertEquals("qzbqjvsov", model.value().get(0).tags().get("yokacspkw")); - Assertions.assertEquals("atkpnp", model.value().get(0).value()); - Assertions.assertEquals("gidyjrrf", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DetectorListResult model = new DetectorListResult().withValue(Arrays.asList( - new DetectorResponseInner().withTags(mapOf("yokacspkw", "qzbqjvsov", "rkcciwwzjuqk", "hzdobpxjmflbvvnc")) - .withValue("atkpnp"))) - .withNextLink("gidyjrrf"); - model = BinaryData.fromObject(model).toObject(DetectorListResult.class); - Assertions.assertEquals("qzbqjvsov", model.value().get(0).tags().get("yokacspkw")); - Assertions.assertEquals("atkpnp", model.value().get(0).value()); - Assertions.assertEquals("gidyjrrf", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("qciwqvhkhixuigdt", model.value().get(0).tags().get("pbobjo")); + Assertions.assertEquals("fcyddg", model.value().get(0).value()); + Assertions.assertEquals("ftadehxnltyfs", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponseInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponseInnerTests.java index 18f07db724c4..637c8e08d2ba 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponseInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponseInnerTests.java @@ -1,44 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class DetectorResponseInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DetectorResponseInner model = BinaryData.fromString( - "{\"properties\":{\"value\":\"osvexcsonpclhoc\"},\"etag\":\"slkevle\",\"tags\":{\"ithlvmezyvshxm\":\"fbuhfmvfaxkffe\",\"gigr\":\"sbbzo\"},\"id\":\"wburvjxxjnspydpt\",\"name\":\"oenkouknvudwti\",\"type\":\"kbldngkpocipa\"}") + "{\"properties\":{\"value\":\"k\"},\"etag\":\"kdkexxp\",\"tags\":{\"jpgd\":\"mxaxc\"},\"id\":\"ocjjxhvpmouexh\",\"name\":\"zxibqeoj\",\"type\":\"xqbzvddntwnd\"}") .toObject(DetectorResponseInner.class); - Assertions.assertEquals("fbuhfmvfaxkffe", model.tags().get("ithlvmezyvshxm")); - Assertions.assertEquals("osvexcsonpclhoc", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DetectorResponseInner model - = new DetectorResponseInner().withTags(mapOf("ithlvmezyvshxm", "fbuhfmvfaxkffe", "gigr", "sbbzo")) - .withValue("osvexcsonpclhoc"); - model = BinaryData.fromObject(model).toObject(DetectorResponseInner.class); - Assertions.assertEquals("fbuhfmvfaxkffe", model.tags().get("ithlvmezyvshxm")); - Assertions.assertEquals("osvexcsonpclhoc", model.value()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("mxaxc", model.tags().get("jpgd")); + Assertions.assertEquals("k", model.value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponsePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponsePropertiesTests.java index a41cb617c90f..c072b133f12f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponsePropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponsePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,14 +12,7 @@ public final class DetectorResponsePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { DetectorResponseProperties model - = BinaryData.fromString("{\"value\":\"xoegukgjnpiucgy\"}").toObject(DetectorResponseProperties.class); - Assertions.assertEquals("xoegukgjnpiucgy", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DetectorResponseProperties model = new DetectorResponseProperties().withValue("xoegukgjnpiucgy"); - model = BinaryData.fromObject(model).toObject(DetectorResponseProperties.class); - Assertions.assertEquals("xoegukgjnpiucgy", model.value()); + = BinaryData.fromString("{\"value\":\"cbtwnpzaoqvuh\"}").toObject(DetectorResponseProperties.class); + Assertions.assertEquals("cbtwnpzaoqvuh", model.value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiffDiskSettingsTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiffDiskSettingsTests.java index 4cafef77f734..b96bb505a902 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiffDiskSettingsTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiffDiskSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionConfigurationTests.java deleted file mode 100644 index 98773f0b5564..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionConfigurationTests.java +++ /dev/null @@ -1,30 +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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.DiskEncryptionConfiguration; -import com.azure.resourcemanager.batch.models.DiskEncryptionTarget; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiskEncryptionConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiskEncryptionConfiguration model - = BinaryData.fromString("{\"targets\":[\"TemporaryDisk\",\"OsDisk\",\"TemporaryDisk\",\"TemporaryDisk\"]}") - .toObject(DiskEncryptionConfiguration.class); - Assertions.assertEquals(DiskEncryptionTarget.TEMPORARY_DISK, model.targets().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiskEncryptionConfiguration model = new DiskEncryptionConfiguration() - .withTargets(Arrays.asList(DiskEncryptionTarget.TEMPORARY_DISK, DiskEncryptionTarget.OS_DISK, - DiskEncryptionTarget.TEMPORARY_DISK, DiskEncryptionTarget.TEMPORARY_DISK)); - model = BinaryData.fromObject(model).toObject(DiskEncryptionConfiguration.class); - Assertions.assertEquals(DiskEncryptionTarget.TEMPORARY_DISK, model.targets().get(0)); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionSetParametersTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionSetParametersTests.java new file mode 100644 index 000000000000..de03077eb452 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionSetParametersTests.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters; +import org.junit.jupiter.api.Assertions; + +public final class DiskEncryptionSetParametersTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + DiskEncryptionSetParameters model + = BinaryData.fromString("{\"id\":\"bahwfl\"}").toObject(DiskEncryptionSetParameters.class); + Assertions.assertEquals("bahwfl", model.id()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + DiskEncryptionSetParameters model = new DiskEncryptionSetParameters().withId("bahwfl"); + model = BinaryData.fromObject(model).toObject(DiskEncryptionSetParameters.class); + Assertions.assertEquals("bahwfl", model.id()); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointAccessProfileTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointAccessProfileTests.java index ef52a89fd074..518aeaff76c6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointAccessProfileTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointAccessProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -8,26 +8,28 @@ import com.azure.resourcemanager.batch.models.EndpointAccessDefaultAction; import com.azure.resourcemanager.batch.models.EndpointAccessProfile; import com.azure.resourcemanager.batch.models.IpRule; +import com.azure.resourcemanager.batch.models.IpRuleAction; import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class EndpointAccessProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EndpointAccessProfile model = BinaryData.fromString( - "{\"defaultAction\":\"Allow\",\"ipRules\":[{\"value\":\"eupewnwreitjz\"},{\"value\":\"flusarhmof\"},{\"value\":\"qhsmyurkdtml\"}]}") + EndpointAccessProfile model = BinaryData + .fromString("{\"defaultAction\":\"Allow\",\"ipRules\":[{\"action\":\"Allow\",\"value\":\"ljlahbcryf\"}]}") .toObject(EndpointAccessProfile.class); Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals("eupewnwreitjz", model.ipRules().get(0).value()); + Assertions.assertEquals(IpRuleAction.ALLOW, model.ipRules().get(0).action()); + Assertions.assertEquals("ljlahbcryf", model.ipRules().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { EndpointAccessProfile model = new EndpointAccessProfile().withDefaultAction(EndpointAccessDefaultAction.ALLOW) - .withIpRules(Arrays.asList(new IpRule().withValue("eupewnwreitjz"), new IpRule().withValue("flusarhmof"), - new IpRule().withValue("qhsmyurkdtml"))); + .withIpRules(Arrays.asList(new IpRule().withAction(IpRuleAction.ALLOW).withValue("ljlahbcryf"))); model = BinaryData.fromObject(model).toObject(EndpointAccessProfile.class); Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals("eupewnwreitjz", model.ipRules().get(0).value()); + Assertions.assertEquals(IpRuleAction.ALLOW, model.ipRules().get(0).action()); + Assertions.assertEquals("ljlahbcryf", model.ipRules().get(0).value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDependencyTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDependencyTests.java index cd4960605d67..9331d43b183b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDependencyTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDependencyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,13 +11,7 @@ public final class EndpointDependencyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { EndpointDependency model = BinaryData.fromString( - "{\"domainName\":\"bsystawfsdjpvk\",\"description\":\"bjxbkzbzk\",\"endpointDetails\":[{\"port\":1155079568}]}") + "{\"domainName\":\"odgmaajrmvdjwz\",\"description\":\"ovmclwhijcoejct\",\"endpointDetails\":[{\"port\":21849341},{\"port\":2038129581},{\"port\":1712979680}]}") .toObject(EndpointDependency.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDependency model = new EndpointDependency(); - model = BinaryData.fromObject(model).toObject(EndpointDependency.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDetailTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDetailTests.java index f4ff72a94b08..5592e18991f4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDetailTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDetailTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -10,12 +10,6 @@ public final class EndpointDetailTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EndpointDetail model = BinaryData.fromString("{\"port\":576283685}").toObject(EndpointDetail.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointDetail model = new EndpointDetail(); - model = BinaryData.fromObject(model).toObject(EndpointDetail.class); + EndpointDetail model = BinaryData.fromString("{\"port\":1302368966}").toObject(EndpointDetail.class); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EnvironmentSettingTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EnvironmentSettingTests.java index faf15b89457a..97c68d103dc0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EnvironmentSettingTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EnvironmentSettingTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,17 +11,17 @@ public final class EnvironmentSettingTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - EnvironmentSetting model - = BinaryData.fromString("{\"name\":\"dknnqvsazn\",\"value\":\"tor\"}").toObject(EnvironmentSetting.class); - Assertions.assertEquals("dknnqvsazn", model.name()); - Assertions.assertEquals("tor", model.value()); + EnvironmentSetting model = BinaryData.fromString("{\"name\":\"ystawfsdjpvkvp\",\"value\":\"xbkzbzkdvncj\"}") + .toObject(EnvironmentSetting.class); + Assertions.assertEquals("ystawfsdjpvkvp", model.name()); + Assertions.assertEquals("xbkzbzkdvncj", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - EnvironmentSetting model = new EnvironmentSetting().withName("dknnqvsazn").withValue("tor"); + EnvironmentSetting model = new EnvironmentSetting().withName("ystawfsdjpvkvp").withValue("xbkzbzkdvncj"); model = BinaryData.fromObject(model).toObject(EnvironmentSetting.class); - Assertions.assertEquals("dknnqvsazn", model.name()); - Assertions.assertEquals("tor", model.value()); + Assertions.assertEquals("ystawfsdjpvkvp", model.name()); + Assertions.assertEquals("xbkzbzkdvncj", model.value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/FixedScaleSettingsTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/FixedScaleSettingsTests.java index 718adb1c74a4..d3370cd1720b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/FixedScaleSettingsTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/FixedScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -14,24 +14,24 @@ public final class FixedScaleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { FixedScaleSettings model = BinaryData.fromString( - "{\"resizeTimeout\":\"PT47H12M31S\",\"targetDedicatedNodes\":1729730350,\"targetLowPriorityNodes\":484454898,\"nodeDeallocationOption\":\"TaskCompletion\"}") + "{\"resizeTimeout\":\"PT18H31M30S\",\"targetDedicatedNodes\":1150957892,\"targetLowPriorityNodes\":641169008,\"nodeDeallocationOption\":\"TaskCompletion\"}") .toObject(FixedScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT47H12M31S"), model.resizeTimeout()); - Assertions.assertEquals(1729730350, model.targetDedicatedNodes()); - Assertions.assertEquals(484454898, model.targetLowPriorityNodes()); + Assertions.assertEquals(Duration.parse("PT18H31M30S"), model.resizeTimeout()); + Assertions.assertEquals(1150957892, model.targetDedicatedNodes()); + Assertions.assertEquals(641169008, model.targetLowPriorityNodes()); Assertions.assertEquals(ComputeNodeDeallocationOption.TASK_COMPLETION, model.nodeDeallocationOption()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - FixedScaleSettings model = new FixedScaleSettings().withResizeTimeout(Duration.parse("PT47H12M31S")) - .withTargetDedicatedNodes(1729730350) - .withTargetLowPriorityNodes(484454898) + FixedScaleSettings model = new FixedScaleSettings().withResizeTimeout(Duration.parse("PT18H31M30S")) + .withTargetDedicatedNodes(1150957892) + .withTargetLowPriorityNodes(641169008) .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION); model = BinaryData.fromObject(model).toObject(FixedScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT47H12M31S"), model.resizeTimeout()); - Assertions.assertEquals(1729730350, model.targetDedicatedNodes()); - Assertions.assertEquals(484454898, model.targetLowPriorityNodes()); + Assertions.assertEquals(Duration.parse("PT18H31M30S"), model.resizeTimeout()); + Assertions.assertEquals(1150957892, model.targetDedicatedNodes()); + Assertions.assertEquals(641169008, model.targetLowPriorityNodes()); Assertions.assertEquals(ComputeNodeDeallocationOption.TASK_COMPLETION, model.nodeDeallocationOption()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/HostEndpointSettingsTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/HostEndpointSettingsTests.java new file mode 100644 index 000000000000..ed1697deb194 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/HostEndpointSettingsTests.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.HostEndpointSettings; +import com.azure.resourcemanager.batch.models.HostEndpointSettingsModeTypes; +import org.junit.jupiter.api.Assertions; + +public final class HostEndpointSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + HostEndpointSettings model + = BinaryData.fromString("{\"mode\":\"Audit\",\"inVMAccessControlProfileReferenceId\":\"mabiknsorgjhxb\"}") + .toObject(HostEndpointSettings.class); + Assertions.assertEquals(HostEndpointSettingsModeTypes.AUDIT, model.mode()); + Assertions.assertEquals("mabiknsorgjhxb", model.inVMAccessControlProfileReferenceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + HostEndpointSettings model = new HostEndpointSettings().withMode(HostEndpointSettingsModeTypes.AUDIT) + .withInVMAccessControlProfileReferenceId("mabiknsorgjhxb"); + model = BinaryData.fromObject(model).toObject(HostEndpointSettings.class); + Assertions.assertEquals(HostEndpointSettingsModeTypes.AUDIT, model.mode()); + Assertions.assertEquals("mabiknsorgjhxb", model.inVMAccessControlProfileReferenceId()); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IPTagTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IPTagTests.java new file mode 100644 index 000000000000..74104f859bbc --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IPTagTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.IPTag; +import org.junit.jupiter.api.Assertions; + +public final class IPTagTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + IPTag model + = BinaryData.fromString("{\"ipTagType\":\"cybxa\",\"tag\":\"gszufoxciqopid\"}").toObject(IPTag.class); + Assertions.assertEquals("cybxa", model.ipTagType()); + Assertions.assertEquals("gszufoxciqopid", model.tag()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + IPTag model = new IPTag().withIpTagType("cybxa").withTag("gszufoxciqopid"); + model = BinaryData.fromObject(model).toObject(IPTag.class); + Assertions.assertEquals("cybxa", model.ipTagType()); + Assertions.assertEquals("gszufoxciqopid", model.tag()); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ImageReferenceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ImageReferenceTests.java index 5bc1f684f323..6fa8926a8379 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ImageReferenceTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ImageReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,33 +12,33 @@ public final class ImageReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ImageReference model = BinaryData.fromString( - "{\"publisher\":\"dneu\",\"offer\":\"fphsdyhtozfikdow\",\"sku\":\"uuvxz\",\"version\":\"lvithhqzonosgg\",\"id\":\"c\",\"sharedGalleryImageId\":\"fwdsj\",\"communityGalleryImageId\":\"aljutiiswac\"}") + "{\"publisher\":\"kzzlvmbmpaxmodf\",\"offer\":\"efyw\",\"sku\":\"pfvmwyhrfou\",\"version\":\"taakc\",\"id\":\"iyzvqtmnub\",\"sharedGalleryImageId\":\"kpzksmondjmq\",\"communityGalleryImageId\":\"vypomgkopkwho\"}") .toObject(ImageReference.class); - Assertions.assertEquals("dneu", model.publisher()); - Assertions.assertEquals("fphsdyhtozfikdow", model.offer()); - Assertions.assertEquals("uuvxz", model.sku()); - Assertions.assertEquals("lvithhqzonosgg", model.version()); - Assertions.assertEquals("c", model.id()); - Assertions.assertEquals("fwdsj", model.sharedGalleryImageId()); - Assertions.assertEquals("aljutiiswac", model.communityGalleryImageId()); + Assertions.assertEquals("kzzlvmbmpaxmodf", model.publisher()); + Assertions.assertEquals("efyw", model.offer()); + Assertions.assertEquals("pfvmwyhrfou", model.sku()); + Assertions.assertEquals("taakc", model.version()); + Assertions.assertEquals("iyzvqtmnub", model.id()); + Assertions.assertEquals("kpzksmondjmq", model.sharedGalleryImageId()); + Assertions.assertEquals("vypomgkopkwho", model.communityGalleryImageId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ImageReference model = new ImageReference().withPublisher("dneu") - .withOffer("fphsdyhtozfikdow") - .withSku("uuvxz") - .withVersion("lvithhqzonosgg") - .withId("c") - .withSharedGalleryImageId("fwdsj") - .withCommunityGalleryImageId("aljutiiswac"); + ImageReference model = new ImageReference().withPublisher("kzzlvmbmpaxmodf") + .withOffer("efyw") + .withSku("pfvmwyhrfou") + .withVersion("taakc") + .withId("iyzvqtmnub") + .withSharedGalleryImageId("kpzksmondjmq") + .withCommunityGalleryImageId("vypomgkopkwho"); model = BinaryData.fromObject(model).toObject(ImageReference.class); - Assertions.assertEquals("dneu", model.publisher()); - Assertions.assertEquals("fphsdyhtozfikdow", model.offer()); - Assertions.assertEquals("uuvxz", model.sku()); - Assertions.assertEquals("lvithhqzonosgg", model.version()); - Assertions.assertEquals("c", model.id()); - Assertions.assertEquals("fwdsj", model.sharedGalleryImageId()); - Assertions.assertEquals("aljutiiswac", model.communityGalleryImageId()); + Assertions.assertEquals("kzzlvmbmpaxmodf", model.publisher()); + Assertions.assertEquals("efyw", model.offer()); + Assertions.assertEquals("pfvmwyhrfou", model.sku()); + Assertions.assertEquals("taakc", model.version()); + Assertions.assertEquals("iyzvqtmnub", model.id()); + Assertions.assertEquals("kpzksmondjmq", model.sharedGalleryImageId()); + Assertions.assertEquals("vypomgkopkwho", model.communityGalleryImageId()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/InboundNatPoolTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/InboundNatPoolTests.java index 835a588bd013..f25e439e573a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/InboundNatPoolTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/InboundNatPoolTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -16,54 +16,41 @@ public final class InboundNatPoolTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { InboundNatPool model = BinaryData.fromString( - "{\"name\":\"xagl\",\"protocol\":\"TCP\",\"backendPort\":1902797615,\"frontendPortRangeStart\":2121024844,\"frontendPortRangeEnd\":1837530813,\"networkSecurityGroupRules\":[{\"priority\":1951928736,\"access\":\"Allow\",\"sourceAddressPrefix\":\"tx\",\"sourcePortRanges\":[\"skfc\",\"tq\",\"miekkezzikhlyfjh\",\"gqggebdunygae\"]},{\"priority\":624778524,\"access\":\"Allow\",\"sourceAddressPrefix\":\"bqfatpxllrxcyjmo\",\"sourcePortRanges\":[\"uvarmywdmjsjq\"]},{\"priority\":1963231743,\"access\":\"Allow\",\"sourceAddressPrefix\":\"hyxxrwlycoduhpk\",\"sourcePortRanges\":[\"ymareqnajxqugj\",\"ky\"]},{\"priority\":1538408928,\"access\":\"Deny\",\"sourceAddressPrefix\":\"eddgssofw\",\"sourcePortRanges\":[\"qal\",\"rmnjijpx\",\"cqqudf\",\"byxbaaabjy\"]}]}") + "{\"name\":\"xqtvcofu\",\"protocol\":\"TCP\",\"backendPort\":1364369199,\"frontendPortRangeStart\":573023383,\"frontendPortRangeEnd\":2052668715,\"networkSecurityGroupRules\":[{\"priority\":264333959,\"access\":\"Allow\",\"sourceAddressPrefix\":\"gdknnqv\",\"sourcePortRanges\":[\"nqntorudsgsahm\",\"yc\"]}]}") .toObject(InboundNatPool.class); - Assertions.assertEquals("xagl", model.name()); + Assertions.assertEquals("xqtvcofu", model.name()); Assertions.assertEquals(InboundEndpointProtocol.TCP, model.protocol()); - Assertions.assertEquals(1902797615, model.backendPort()); - Assertions.assertEquals(2121024844, model.frontendPortRangeStart()); - Assertions.assertEquals(1837530813, model.frontendPortRangeEnd()); - Assertions.assertEquals(1951928736, model.networkSecurityGroupRules().get(0).priority()); + Assertions.assertEquals(1364369199, model.backendPort()); + Assertions.assertEquals(573023383, model.frontendPortRangeStart()); + Assertions.assertEquals(2052668715, model.frontendPortRangeEnd()); + Assertions.assertEquals(264333959, model.networkSecurityGroupRules().get(0).priority()); Assertions.assertEquals(NetworkSecurityGroupRuleAccess.ALLOW, model.networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("tx", model.networkSecurityGroupRules().get(0).sourceAddressPrefix()); - Assertions.assertEquals("skfc", model.networkSecurityGroupRules().get(0).sourcePortRanges().get(0)); + Assertions.assertEquals("gdknnqv", model.networkSecurityGroupRules().get(0).sourceAddressPrefix()); + Assertions.assertEquals("nqntorudsgsahm", model.networkSecurityGroupRules().get(0).sourcePortRanges().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - InboundNatPool model = new InboundNatPool().withName("xagl") + InboundNatPool model = new InboundNatPool().withName("xqtvcofu") .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(1902797615) - .withFrontendPortRangeStart(2121024844) - .withFrontendPortRangeEnd(1837530813) - .withNetworkSecurityGroupRules(Arrays.asList( - new NetworkSecurityGroupRule().withPriority(1951928736) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("tx") - .withSourcePortRanges(Arrays.asList("skfc", "tq", "miekkezzikhlyfjh", "gqggebdunygae")), - new NetworkSecurityGroupRule().withPriority(624778524) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("bqfatpxllrxcyjmo") - .withSourcePortRanges(Arrays.asList("uvarmywdmjsjq")), - new NetworkSecurityGroupRule().withPriority(1963231743) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("hyxxrwlycoduhpk") - .withSourcePortRanges(Arrays.asList("ymareqnajxqugj", "ky")), - new NetworkSecurityGroupRule().withPriority(1538408928) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("eddgssofw") - .withSourcePortRanges(Arrays.asList("qal", "rmnjijpx", "cqqudf", "byxbaaabjy")))); + .withBackendPort(1364369199) + .withFrontendPortRangeStart(573023383) + .withFrontendPortRangeEnd(2052668715) + .withNetworkSecurityGroupRules(Arrays.asList(new NetworkSecurityGroupRule().withPriority(264333959) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("gdknnqv") + .withSourcePortRanges(Arrays.asList("nqntorudsgsahm", "yc")))); model = BinaryData.fromObject(model).toObject(InboundNatPool.class); - Assertions.assertEquals("xagl", model.name()); + Assertions.assertEquals("xqtvcofu", model.name()); Assertions.assertEquals(InboundEndpointProtocol.TCP, model.protocol()); - Assertions.assertEquals(1902797615, model.backendPort()); - Assertions.assertEquals(2121024844, model.frontendPortRangeStart()); - Assertions.assertEquals(1837530813, model.frontendPortRangeEnd()); - Assertions.assertEquals(1951928736, model.networkSecurityGroupRules().get(0).priority()); + Assertions.assertEquals(1364369199, model.backendPort()); + Assertions.assertEquals(573023383, model.frontendPortRangeStart()); + Assertions.assertEquals(2052668715, model.frontendPortRangeEnd()); + Assertions.assertEquals(264333959, model.networkSecurityGroupRules().get(0).priority()); Assertions.assertEquals(NetworkSecurityGroupRuleAccess.ALLOW, model.networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("tx", model.networkSecurityGroupRules().get(0).sourceAddressPrefix()); - Assertions.assertEquals("skfc", model.networkSecurityGroupRules().get(0).sourcePortRanges().get(0)); + Assertions.assertEquals("gdknnqv", model.networkSecurityGroupRules().get(0).sourceAddressPrefix()); + Assertions.assertEquals("nqntorudsgsahm", model.networkSecurityGroupRules().get(0).sourcePortRanges().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IpRuleTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IpRuleTests.java index fd886ab42073..f65571033291 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IpRuleTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IpRuleTests.java @@ -1,24 +1,27 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.IpRule; +import com.azure.resourcemanager.batch.models.IpRuleAction; import org.junit.jupiter.api.Assertions; public final class IpRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - IpRule model = BinaryData.fromString("{\"value\":\"he\"}").toObject(IpRule.class); - Assertions.assertEquals("he", model.value()); + IpRule model = BinaryData.fromString("{\"action\":\"Allow\",\"value\":\"fdosyg\"}").toObject(IpRule.class); + Assertions.assertEquals(IpRuleAction.ALLOW, model.action()); + Assertions.assertEquals("fdosyg", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - IpRule model = new IpRule().withValue("he"); + IpRule model = new IpRule().withAction(IpRuleAction.ALLOW).withValue("fdosyg"); model = BinaryData.fromObject(model).toObject(IpRule.class); - Assertions.assertEquals("he", model.value()); + Assertions.assertEquals(IpRuleAction.ALLOW, model.action()); + Assertions.assertEquals("fdosyg", model.value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/KeyVaultReferenceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/KeyVaultReferenceTests.java index e43ce6276e06..74e6cbe054eb 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/KeyVaultReferenceTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/KeyVaultReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,16 +12,16 @@ public final class KeyVaultReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { KeyVaultReference model - = BinaryData.fromString("{\"id\":\"lzl\",\"url\":\"j\"}").toObject(KeyVaultReference.class); - Assertions.assertEquals("lzl", model.id()); - Assertions.assertEquals("j", model.url()); + = BinaryData.fromString("{\"id\":\"h\",\"url\":\"jwyahuxinpmqnja\"}").toObject(KeyVaultReference.class); + Assertions.assertEquals("h", model.id()); + Assertions.assertEquals("jwyahuxinpmqnja", model.url()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - KeyVaultReference model = new KeyVaultReference().withId("lzl").withUrl("j"); + KeyVaultReference model = new KeyVaultReference().withId("h").withUrl("jwyahuxinpmqnja"); model = BinaryData.fromObject(model).toObject(KeyVaultReference.class); - Assertions.assertEquals("lzl", model.id()); - Assertions.assertEquals("j", model.url()); + Assertions.assertEquals("h", model.id()); + Assertions.assertEquals("jwyahuxinpmqnja", model.url()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationPackagesResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationPackagesResultTests.java index 8c737c6013c6..7e825ad24929 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationPackagesResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationPackagesResultTests.java @@ -1,47 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.ApplicationPackageInner; -import com.azure.resourcemanager.batch.models.ListApplicationPackagesResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.batch.implementation.models.ListApplicationPackagesResult; import org.junit.jupiter.api.Assertions; public final class ListApplicationPackagesResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListApplicationPackagesResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"state\":\"Pending\",\"format\":\"jrmvdjwzrlo\",\"storageUrl\":\"clwhijcoejctbz\",\"storageUrlExpiry\":\"2021-04-25T10:37:50Z\",\"lastActivationTime\":\"2021-02-04T17:33:10Z\"},\"etag\":\"cbkbfkg\",\"tags\":{\"xaxcfjpgddtocjjx\":\"kexxppof\",\"eojnxqbzvddn\":\"vpmouexhdzxib\",\"aoqvuh\":\"wndeicbtwnp\"},\"id\":\"hcffcyddglmjthjq\",\"name\":\"wpyeicxmqciwqvh\",\"type\":\"hix\"}],\"nextLink\":\"gdtopbobjogh\"}") + "{\"value\":[{\"properties\":{\"state\":\"Active\",\"format\":\"sle\",\"storageUrl\":\"vxyqjpkcattpngjc\",\"storageUrlExpiry\":\"2021-11-04T06:11:04Z\",\"lastActivationTime\":\"2021-06-08T09:19:17Z\"},\"etag\":\"pjhvmdajvnys\",\"tags\":{\"canoaeupf\":\"q\",\"tuo\":\"yhltrpmopjmcm\",\"dpuozmyz\":\"thfuiuaodsfcpkvx\"},\"id\":\"agfuaxbezyiu\",\"name\":\"kktwhrdxw\",\"type\":\"ywqsmbsurexim\"},{\"properties\":{\"state\":\"Pending\",\"format\":\"fsfksymddyst\",\"storageUrl\":\"iuxhqyudxorr\",\"storageUrlExpiry\":\"2021-02-18T08:47:19Z\",\"lastActivationTime\":\"2021-06-17T06:36:49Z\"},\"etag\":\"zvyifqrvkdvj\",\"tags\":{\"vdfwatkpn\":\"rm\"},\"id\":\"lexxbczwtru\",\"name\":\"iqzbq\",\"type\":\"vsovmyokac\"},{\"properties\":{\"state\":\"Pending\",\"format\":\"hzdobpxjmflbvvnc\",\"storageUrl\":\"kcciwwzjuqkhr\",\"storageUrlExpiry\":\"2021-05-22T18:36:22Z\",\"lastActivationTime\":\"2021-10-14T07:23:56Z\"},\"etag\":\"uo\",\"tags\":{\"sauuimj\":\"kg\",\"rfbyaosvexcso\":\"vxieduugidyj\",\"vleggzfbuhfmvfax\":\"pclhocohslk\"},\"id\":\"feiithlvmez\",\"name\":\"v\",\"type\":\"hxmzsbbzoggig\"},{\"properties\":{\"state\":\"Active\",\"format\":\"rvjx\",\"storageUrl\":\"nspydptkoenkoukn\",\"storageUrlExpiry\":\"2021-02-16T10:50:56Z\",\"lastActivationTime\":\"2021-04-09T12:14:42Z\"},\"etag\":\"ukbldngkpo\",\"tags\":{\"npiucgygevqznty\":\"azyxoegukg\",\"dpydn\":\"mrbpizcdrqj\",\"sjttgzfbish\":\"yhxdeoejzicwi\"},\"id\":\"khaj\",\"name\":\"eyeam\",\"type\":\"p\"}],\"nextLink\":\"g\"}") .toObject(ListApplicationPackagesResult.class); - Assertions.assertEquals("kexxppof", model.value().get(0).tags().get("xaxcfjpgddtocjjx")); - Assertions.assertEquals("gdtopbobjogh", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListApplicationPackagesResult model = new ListApplicationPackagesResult() - .withValue(Arrays.asList(new ApplicationPackageInner().withTags( - mapOf("xaxcfjpgddtocjjx", "kexxppof", "eojnxqbzvddn", "vpmouexhdzxib", "aoqvuh", "wndeicbtwnp")))) - .withNextLink("gdtopbobjogh"); - model = BinaryData.fromObject(model).toObject(ListApplicationPackagesResult.class); - Assertions.assertEquals("kexxppof", model.value().get(0).tags().get("xaxcfjpgddtocjjx")); - Assertions.assertEquals("gdtopbobjogh", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("q", model.value().get(0).tags().get("canoaeupf")); + Assertions.assertEquals("g", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationsResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationsResultTests.java index e65a34ce36f6..9d0b6e4acb3f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationsResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationsResultTests.java @@ -1,59 +1,23 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.ApplicationInner; -import com.azure.resourcemanager.batch.models.ListApplicationsResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.batch.implementation.models.ListApplicationsResult; import org.junit.jupiter.api.Assertions; public final class ListApplicationsResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListApplicationsResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"osfqpteehzzv\",\"allowUpdates\":false,\"defaultVersion\":\"rimz\"},\"etag\":\"pvswjdkirso\",\"tags\":{\"nohjt\":\"xhcr\",\"soifiyipjxsqw\":\"kwh\"},\"id\":\"gr\",\"name\":\"bznorcjxvsnby\",\"type\":\"qabnmoc\"},{\"properties\":{\"displayName\":\"shurzafbljjgpbto\",\"allowUpdates\":true,\"defaultVersion\":\"klj\"},\"etag\":\"bqidtqaj\",\"tags\":{\"kudjkrlkhb\":\"l\",\"locx\":\"hfepgzgqex\",\"aierhhb\":\"c\"},\"id\":\"sglumma\",\"name\":\"tjaodxobnb\",\"type\":\"xkqpxo\"}],\"nextLink\":\"jionpimexgstxgc\"}") + "{\"value\":[{\"properties\":{\"displayName\":\"utttxfvjrbirp\",\"allowUpdates\":true,\"defaultVersion\":\"c\"},\"etag\":\"ahfn\",\"tags\":{\"j\":\"yq\",\"gvcl\":\"uujqgidokgjljyo\",\"jhtxfvgxbfsmxne\":\"bgsncghkjeszzhb\",\"rbmpukgri\":\"mpvecxgodebfqk\"},\"id\":\"lzlfbxzpuz\",\"name\":\"cispnqzahmgkbr\",\"type\":\"yydhibnuqqk\"},{\"properties\":{\"displayName\":\"a\",\"allowUpdates\":true,\"defaultVersion\":\"tqagnbuynh\"},\"etag\":\"gg\",\"tags\":{\"vpnazzm\":\"fsiarbutr\"},\"id\":\"runmp\",\"name\":\"ttdbhrbnl\",\"type\":\"nkxmyskpbhenbtk\"},{\"properties\":{\"displayName\":\"w\",\"allowUpdates\":false,\"defaultVersion\":\"rsyn\"},\"etag\":\"idybyxczf\",\"tags\":{\"fkts\":\"aaxdbabphlwrq\",\"nyyazttbtwwrqpue\":\"hsucoc\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\"},\"id\":\"yoxa\",\"name\":\"pdkzjancuxr\",\"type\":\"d\"}],\"nextLink\":\"avxbniwdjswztsdb\"}") .toObject(ListApplicationsResult.class); - Assertions.assertEquals("xhcr", model.value().get(0).tags().get("nohjt")); - Assertions.assertEquals("osfqpteehzzv", model.value().get(0).displayName()); - Assertions.assertEquals(false, model.value().get(0).allowUpdates()); - Assertions.assertEquals("rimz", model.value().get(0).defaultVersion()); - Assertions.assertEquals("jionpimexgstxgc", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListApplicationsResult model = new ListApplicationsResult().withValue(Arrays.asList( - new ApplicationInner().withTags(mapOf("nohjt", "xhcr", "soifiyipjxsqw", "kwh")) - .withDisplayName("osfqpteehzzv") - .withAllowUpdates(false) - .withDefaultVersion("rimz"), - new ApplicationInner().withTags(mapOf("kudjkrlkhb", "l", "locx", "hfepgzgqex", "aierhhb", "c")) - .withDisplayName("shurzafbljjgpbto") - .withAllowUpdates(true) - .withDefaultVersion("klj"))) - .withNextLink("jionpimexgstxgc"); - model = BinaryData.fromObject(model).toObject(ListApplicationsResult.class); - Assertions.assertEquals("xhcr", model.value().get(0).tags().get("nohjt")); - Assertions.assertEquals("osfqpteehzzv", model.value().get(0).displayName()); - Assertions.assertEquals(false, model.value().get(0).allowUpdates()); - Assertions.assertEquals("rimz", model.value().get(0).defaultVersion()); - Assertions.assertEquals("jionpimexgstxgc", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("yq", model.value().get(0).tags().get("j")); + Assertions.assertEquals("utttxfvjrbirp", model.value().get(0).displayName()); + Assertions.assertTrue(model.value().get(0).allowUpdates()); + Assertions.assertEquals("c", model.value().get(0).defaultVersion()); + Assertions.assertEquals("avxbniwdjswztsdb", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateEndpointConnectionsResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateEndpointConnectionsResultTests.java index 4dd9b3bbd6f7..f8f5bff14d0f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateEndpointConnectionsResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateEndpointConnectionsResultTests.java @@ -1,61 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.batch.models.ListPrivateEndpointConnectionsResult; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; +import com.azure.resourcemanager.batch.implementation.models.ListPrivateEndpointConnectionsResult; import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class ListPrivateEndpointConnectionsResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListPrivateEndpointConnectionsResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"ttkphywpnvjtoqne\"},\"groupIds\":[\"lfplp\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"scrpabgyepsbjt\",\"actionsRequired\":\"qugxywpmueefjzwf\"}},\"etag\":\"q\",\"tags\":{\"cq\":\"dsuyonobgla\"},\"id\":\"tcc\",\"name\":\"g\",\"type\":\"udxytlmoyrx\"}],\"nextLink\":\"fudwpznt\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Creating\",\"privateEndpoint\":{\"id\":\"khfxobbcswsrt\"},\"groupIds\":[\"plrbpbewtghf\",\"blcg\",\"xzvlvqhjkbegib\",\"nmxiebwwaloayqc\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"zjuzgwyz\",\"actionsRequired\":\"txon\"}},\"etag\":\"ts\",\"tags\":{\"uvriuhprwm\":\"cbpwxqpsrknft\",\"bexrmcq\":\"yvxqtayriwwroy\",\"e\":\"bycnojvkn\",\"zhpvgqzcjrvxd\":\"qsgzvahapj\"},\"id\":\"lmwlxkvugfhzo\",\"name\":\"awjvzunluthnnp\",\"type\":\"nxipeil\"},{\"properties\":{\"provisioningState\":\"Cancelled\",\"privateEndpoint\":{\"id\":\"jxdultskzbbtdzu\"},\"groupIds\":[\"ekg\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"uh\",\"actionsRequired\":\"p\"}},\"etag\":\"jyofdxluusdtto\",\"tags\":{\"smv\":\"boekqvkel\",\"aln\":\"xwyjsflhhc\"},\"id\":\"xisxyawjoyaqcsl\",\"name\":\"jpkiidzyexznelix\",\"type\":\"nr\"}],\"nextLink\":\"folhbnxknal\"}") .toObject(ListPrivateEndpointConnectionsResult.class); - Assertions.assertEquals("dsuyonobgla", model.value().get(0).tags().get("cq")); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, + Assertions.assertEquals("cbpwxqpsrknft", model.value().get(0).tags().get("uvriuhprwm")); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("scrpabgyepsbjt", - model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("fudwpznt", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListPrivateEndpointConnectionsResult model - = new ListPrivateEndpointConnectionsResult() - .withValue( - Arrays.asList(new PrivateEndpointConnectionInner().withTags(mapOf("cq", "dsuyonobgla")) - .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("scrpabgyepsbjt")))) - .withNextLink("fudwpznt"); - model = BinaryData.fromObject(model).toObject(ListPrivateEndpointConnectionsResult.class); - Assertions.assertEquals("dsuyonobgla", model.value().get(0).tags().get("cq")); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, - model.value().get(0).privateLinkServiceConnectionState().status()); - Assertions.assertEquals("scrpabgyepsbjt", - model.value().get(0).privateLinkServiceConnectionState().description()); - Assertions.assertEquals("fudwpznt", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("zjuzgwyz", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals("folhbnxknal", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateLinkResourcesResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateLinkResourcesResultTests.java index 12eebd088fc8..ff8edf1823de 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateLinkResourcesResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateLinkResourcesResultTests.java @@ -1,52 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.batch.models.ListPrivateLinkResourcesResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.resourcemanager.batch.implementation.models.ListPrivateLinkResourcesResult; import org.junit.jupiter.api.Assertions; public final class ListPrivateLinkResourcesResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ListPrivateLinkResourcesResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"ntypmrbpizcdrqj\",\"requiredMembers\":[\"ydnfyhxdeoejz\"],\"requiredZoneNames\":[\"ifsjttgzfbishcb\"]},\"etag\":\"ajdeyeamdphaga\",\"tags\":{\"ow\":\"uxwgipwho\",\"injep\":\"gshwankixz\"},\"id\":\"ttmrywnuzoqf\",\"name\":\"iyqzrnk\",\"type\":\"qvyxlwhzlsicoho\"},{\"properties\":{\"groupId\":\"wvl\",\"requiredMembers\":[\"vwhheunmmqhgyx\",\"konocu\",\"oklyaxuconuq\"],\"requiredZoneNames\":[\"kbeype\",\"rmjmwvvjektc\"]},\"etag\":\"enhwlrs\",\"tags\":{\"qdqgbi\":\"zpwv\",\"fcivfsnkym\":\"ylihkaetckt\",\"jf\":\"ctq\",\"fuwutttxf\":\"ebrjcxe\"},\"id\":\"jrbirphxepcyv\",\"name\":\"hfnljkyq\",\"type\":\"j\"},{\"properties\":{\"groupId\":\"j\",\"requiredMembers\":[\"dokgjl\",\"yoxgvcltbgsnc\"],\"requiredZoneNames\":[\"jeszzhbijhtxfv\",\"xbf\"]},\"etag\":\"xnehmpvec\",\"tags\":{\"flz\":\"debfqkkrbmpukgri\",\"qzahmgkbrp\":\"fbxzpuzycisp\",\"hibnuqqkpika\":\"y\",\"buynhijggm\":\"rgvtqag\"},\"id\":\"bfs\",\"name\":\"arbu\",\"type\":\"rcvpnazzmhjrunmp\"},{\"properties\":{\"groupId\":\"dbhrbnlankxm\",\"requiredMembers\":[\"pbh\"],\"requiredZoneNames\":[\"tkcxywnytnrsy\",\"lqidyby\",\"czfc\",\"haaxdbabphl\"]},\"etag\":\"qlfktsths\",\"tags\":{\"wwrq\":\"cmnyyazttb\",\"ywbiexzfeyueax\":\"uedck\",\"wbhqwal\":\"bxu\",\"kzjancuxrhdwbav\":\"uzyoxaep\"},\"id\":\"bniwdj\",\"name\":\"wz\",\"type\":\"s\"}],\"nextLink\":\"pgn\"}") + "{\"value\":[{\"properties\":{\"groupId\":\"ywpnvjt\",\"requiredMembers\":[\"ermclfplphoxuscr\",\"abgy\"],\"requiredZoneNames\":[\"bjtazqugxywpmu\"]},\"etag\":\"fjz\",\"tags\":{\"glaocq\":\"kqujidsuyono\",\"g\":\"tcc\",\"wfudwpzntxhdzhl\":\"udxytlmoyrx\"},\"id\":\"jbhckfrlhr\",\"name\":\"sbkyvpycanuzbp\",\"type\":\"kafkuwbcrnwbm\"},{\"properties\":{\"groupId\":\"seyvj\",\"requiredMembers\":[\"tslhspkdeem\"],\"requiredZoneNames\":[\"mx\"]},\"etag\":\"kv\",\"tags\":{\"ahaquh\":\"lmqkrhahvlj\",\"aex\":\"dhmdua\"},\"id\":\"vfadmws\",\"name\":\"crgvxpvgom\",\"type\":\"lf\"},{\"properties\":{\"groupId\":\"gwb\",\"requiredMembers\":[\"e\",\"dawkzbali\",\"urqhaka\",\"hashsfwxosow\"],\"requiredZoneNames\":[\"ugicjooxdjebw\",\"ucww\",\"vo\"]},\"etag\":\"vmeueci\",\"tags\":{\"ueiotwmcdyt\":\"zceuojgjrw\",\"it\":\"x\",\"hniskxfbkpyc\":\"nrjawgqwg\",\"l\":\"klwndnhjdauwhv\"},\"id\":\"btdhxujznbm\",\"name\":\"ow\",\"type\":\"wpr\"}],\"nextLink\":\"lve\"}") .toObject(ListPrivateLinkResourcesResult.class); - Assertions.assertEquals("uxwgipwho", model.value().get(0).tags().get("ow")); - Assertions.assertEquals("pgn", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListPrivateLinkResourcesResult model = new ListPrivateLinkResourcesResult().withValue( - Arrays.asList(new PrivateLinkResourceInner().withTags(mapOf("ow", "uxwgipwho", "injep", "gshwankixz")), - new PrivateLinkResourceInner().withTags( - mapOf("qdqgbi", "zpwv", "fcivfsnkym", "ylihkaetckt", "jf", "ctq", "fuwutttxf", "ebrjcxe")), - new PrivateLinkResourceInner().withTags(mapOf("flz", "debfqkkrbmpukgri", "qzahmgkbrp", "fbxzpuzycisp", - "hibnuqqkpika", "y", "buynhijggm", "rgvtqag")), - new PrivateLinkResourceInner().withTags(mapOf("wwrq", "cmnyyazttb", "ywbiexzfeyueax", "uedck", - "wbhqwal", "bxu", "kzjancuxrhdwbav", "uzyoxaep")))) - .withNextLink("pgn"); - model = BinaryData.fromObject(model).toObject(ListPrivateLinkResourcesResult.class); - Assertions.assertEquals("uxwgipwho", model.value().get(0).tags().get("ow")); - Assertions.assertEquals("pgn", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("kqujidsuyono", model.value().get(0).tags().get("glaocq")); + Assertions.assertEquals("lve", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java index 507a4c35de86..72c269f705b0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityResult; +import com.azure.resourcemanager.batch.models.ResourceType; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; import org.junit.jupiter.api.Test; @@ -20,18 +21,20 @@ public final class LocationsCheckNameAvailabilityWithResponseMockTests { @Test public void testCheckNameAvailabilityWithResponse() throws Exception { - String responseStr = "{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"jltfvnzcyjtotpv\"}"; + String responseStr = "{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"kydiwf\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); CheckNameAvailabilityResult response = manager.locations() - .checkNameAvailabilityWithResponse("pundmbxhug", - new CheckNameAvailabilityParameters().withName("mjkavlgorbmft"), com.azure.core.util.Context.NONE) + .checkNameAvailabilityWithResponse("otjewlpxuzzjgnre", + new CheckNameAvailabilityParameters().withName("qyhqo") + .withType(ResourceType.MICROSOFT_BATCH_BATCH_ACCOUNTS), + com.azure.core.util.Context.NONE) .getValue(); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsGetQuotasWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsGetQuotasWithResponseMockTests.java index 7075e866881b..b8145a2a2001 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsGetQuotasWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsGetQuotasWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.BatchLocationQuota; @@ -19,17 +19,17 @@ public final class LocationsGetQuotasWithResponseMockTests { @Test public void testGetQuotasWithResponse() throws Exception { - String responseStr = "{\"accountQuota\":2036221070}"; + String responseStr = "{\"accountQuota\":2108240379}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BatchLocationQuota response - = manager.locations().getQuotasWithResponse("prlpy", com.azure.core.util.Context.NONE).getValue(); + = manager.locations().getQuotasWithResponse("mtkhlowkxxpvbr", com.azure.core.util.Context.NONE).getValue(); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedVirtualMachineSkusMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedVirtualMachineSkusMockTests.java index 124ea0405630..4988a4ad9452 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedVirtualMachineSkusMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedVirtualMachineSkusMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.SupportedSku; @@ -21,17 +21,17 @@ public final class LocationsListSupportedVirtualMachineSkusMockTests { @Test public void testListSupportedVirtualMachineSkus() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"ybnnustg\",\"familyName\":\"jh\",\"capabilities\":[{\"name\":\"xhcmavmqfoudo\",\"value\":\"cgyypro\"}],\"batchSupportEndOfLife\":\"2021-01-30T18:16:52Z\"}]}"; + = "{\"value\":[{\"name\":\"ychunsjlpjrtwszh\",\"familyName\":\"uic\",\"capabilities\":[{\"name\":\"rrmhwrbfdp\",\"value\":\"lubhvjg\"},{\"name\":\"ocu\",\"value\":\"lw\"},{\"name\":\"memhooclutnpq\",\"value\":\"mczjkm\"},{\"name\":\"kyujxsglhsrrr\",\"value\":\"jylmbkzudnigr\"}],\"batchSupportEndOfLife\":\"2021-06-14T14:38:58Z\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.locations() - .listSupportedVirtualMachineSkus("ciqdsme", 1994491974, "itdfuxtyasiib", com.azure.core.util.Context.NONE); + .listSupportedVirtualMachineSkus("mzsyzfhotl", 1472660607, "k", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ManagedDiskTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ManagedDiskTests.java index e8db3db95692..a96fd6c7e9e8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ManagedDiskTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ManagedDiskTests.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters; import com.azure.resourcemanager.batch.models.ManagedDisk; import com.azure.resourcemanager.batch.models.SecurityEncryptionTypes; import com.azure.resourcemanager.batch.models.StorageAccountType; @@ -15,21 +16,27 @@ public final class ManagedDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedDisk model = BinaryData.fromString( - "{\"storageAccountType\":\"Premium_LRS\",\"securityProfile\":{\"securityEncryptionType\":\"VMGuestStateOnly\"}}") + "{\"storageAccountType\":\"Premium_LRS\",\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\",\"diskEncryptionSet\":{\"id\":\"lxprglyatddckcbc\"}},\"diskEncryptionSet\":{\"id\":\"jrjxgciqibrhosx\"}}") .toObject(ManagedDisk.class); Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, + Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, model.securityProfile().securityEncryptionType()); + Assertions.assertEquals("lxprglyatddckcbc", model.securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("jrjxgciqibrhosx", model.diskEncryptionSet().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ManagedDisk model = new ManagedDisk().withStorageAccountType(StorageAccountType.PREMIUM_LRS) .withSecurityProfile( - new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY)); + new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.NON_PERSISTED_TPM) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("lxprglyatddckcbc"))) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("jrjxgciqibrhosx")); model = BinaryData.fromObject(model).toObject(ManagedDisk.class); Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, + Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, model.securityProfile().securityEncryptionType()); + Assertions.assertEquals("lxprglyatddckcbc", model.securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("jrjxgciqibrhosx", model.diskEncryptionSet().id()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/MetadataItemTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/MetadataItemTests.java index c584447d74c6..ff2b57c61d1b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/MetadataItemTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/MetadataItemTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,17 +11,17 @@ public final class MetadataItemTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - MetadataItem model = BinaryData.fromString("{\"name\":\"amxjezwlw\",\"value\":\"wxuqlcvydypatdoo\"}") - .toObject(MetadataItem.class); - Assertions.assertEquals("amxjezwlw", model.name()); - Assertions.assertEquals("wxuqlcvydypatdoo", model.value()); + MetadataItem model + = BinaryData.fromString("{\"name\":\"rvexztvb\",\"value\":\"qgsfraoyzkoow\"}").toObject(MetadataItem.class); + Assertions.assertEquals("rvexztvb", model.name()); + Assertions.assertEquals("qgsfraoyzkoow", model.value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MetadataItem model = new MetadataItem().withName("amxjezwlw").withValue("wxuqlcvydypatdoo"); + MetadataItem model = new MetadataItem().withName("rvexztvb").withValue("qgsfraoyzkoow"); model = BinaryData.fromObject(model).toObject(MetadataItem.class); - Assertions.assertEquals("amxjezwlw", model.name()); - Assertions.assertEquals("wxuqlcvydypatdoo", model.value()); + Assertions.assertEquals("rvexztvb", model.name()); + Assertions.assertEquals("qgsfraoyzkoow", model.value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkConfigurationTests.java index c93a4ec8c33a..c1d49c375dd3 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkConfigurationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkConfigurationTests.java @@ -1,11 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope; +import com.azure.resourcemanager.batch.models.IPFamily; +import com.azure.resourcemanager.batch.models.IPTag; import com.azure.resourcemanager.batch.models.InboundEndpointProtocol; import com.azure.resourcemanager.batch.models.InboundNatPool; import com.azure.resourcemanager.batch.models.IpAddressProvisioningType; @@ -21,30 +23,30 @@ public final class NetworkConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkConfiguration model = BinaryData.fromString( - "{\"subnetId\":\"sdqrhzoymibmrq\",\"dynamicVnetAssignmentScope\":\"none\",\"endpointConfiguration\":{\"inboundNatPools\":[{\"name\":\"wfluszdt\",\"protocol\":\"TCP\",\"backendPort\":569809127,\"frontendPortRangeStart\":24536782,\"frontendPortRangeEnd\":1802230973,\"networkSecurityGroupRules\":[{\"priority\":695674314,\"access\":\"Allow\",\"sourceAddressPrefix\":\"voqacpiexpbt\",\"sourcePortRanges\":[\"bwoenwashrt\"]},{\"priority\":2130378751,\"access\":\"Deny\",\"sourceAddressPrefix\":\"cnqxwbpokulpi\",\"sourcePortRanges\":[\"aasipqi\",\"obyu\"]}]},{\"name\":\"erpqlpqwcciuqg\",\"protocol\":\"UDP\",\"backendPort\":1924773766,\"frontendPortRangeStart\":1287443771,\"frontendPortRangeEnd\":164113652,\"networkSecurityGroupRules\":[{\"priority\":2060302961,\"access\":\"Deny\",\"sourceAddressPrefix\":\"btkuwhh\",\"sourcePortRanges\":[\"k\",\"joxafnndlpi\",\"hkoymkcdyhbp\",\"kpw\"]},{\"priority\":722591670,\"access\":\"Deny\",\"sourceAddressPrefix\":\"q\",\"sourcePortRanges\":[\"vq\",\"ovljxywsu\",\"syrsndsytgadgvra\"]},{\"priority\":890415173,\"access\":\"Allow\",\"sourceAddressPrefix\":\"neqn\",\"sourcePortRanges\":[\"rwlqu\",\"ijfqkacewiipfp\",\"bjibwwiftohq\",\"vpuvks\"]}]}]},\"publicIPAddressConfiguration\":{\"provision\":\"UserManaged\",\"ipAddressIds\":[\"nynfsynljphuo\"]},\"enableAcceleratedNetworking\":true}") + "{\"subnetId\":\"u\",\"dynamicVnetAssignmentScope\":\"none\",\"endpointConfiguration\":{\"inboundNatPools\":[{\"name\":\"wggxkallat\",\"protocol\":\"TCP\",\"backendPort\":1280357892,\"frontendPortRangeStart\":1349569778,\"frontendPortRangeEnd\":142716776,\"networkSecurityGroupRules\":[{\"priority\":1750624466,\"access\":\"Deny\",\"sourceAddressPrefix\":\"cjzkzivgvvcna\",\"sourcePortRanges\":[\"yrnxxmueedn\",\"rdvstkwqqtch\"]},{\"priority\":646701908,\"access\":\"Deny\",\"sourceAddressPrefix\":\"mfmtdaaygdvw\",\"sourcePortRanges\":[\"iohgwxrtfud\",\"epxgyqagvr\",\"mnpkukghimdblxg\"]},{\"priority\":261614569,\"access\":\"Allow\",\"sourceAddressPrefix\":\"fnjhfjxwmszkkfo\",\"sourcePortRanges\":[\"yfkzik\",\"jawneaiv\",\"wczelpci\"]}]},{\"name\":\"elsfeaen\",\"protocol\":\"TCP\",\"backendPort\":1417911120,\"frontendPortRangeStart\":1449386799,\"frontendPortRangeEnd\":1448389214,\"networkSecurityGroupRules\":[{\"priority\":463401012,\"access\":\"Deny\",\"sourceAddressPrefix\":\"dxbjhwuaanozj\",\"sourcePortRanges\":[\"hyoulpjr\"]}]}]},\"publicIPAddressConfiguration\":{\"provision\":\"UserManaged\",\"ipAddressIds\":[\"vimjwos\",\"tx\",\"tcs\",\"fcktqumiekke\"],\"ipFamilies\":[\"IPv4\"],\"ipTags\":[{\"ipTagType\":\"fjhdg\",\"tag\":\"gebdunygaeq\"}]},\"enableAcceleratedNetworking\":true}") .toObject(NetworkConfiguration.class); - Assertions.assertEquals("sdqrhzoymibmrq", model.subnetId()); + Assertions.assertEquals("u", model.subnetId()); Assertions.assertEquals(DynamicVNetAssignmentScope.NONE, model.dynamicVnetAssignmentScope()); - Assertions.assertEquals("wfluszdt", model.endpointConfiguration().inboundNatPools().get(0).name()); + Assertions.assertEquals("wggxkallat", model.endpointConfiguration().inboundNatPools().get(0).name()); Assertions.assertEquals(InboundEndpointProtocol.TCP, model.endpointConfiguration().inboundNatPools().get(0).protocol()); - Assertions.assertEquals(569809127, model.endpointConfiguration().inboundNatPools().get(0).backendPort()); - Assertions.assertEquals(24536782, + Assertions.assertEquals(1280357892, model.endpointConfiguration().inboundNatPools().get(0).backendPort()); + Assertions.assertEquals(1349569778, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeStart()); - Assertions.assertEquals(1802230973, + Assertions.assertEquals(142716776, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeEnd()); - Assertions.assertEquals(695674314, + Assertions.assertEquals(1750624466, model.endpointConfiguration().inboundNatPools().get(0).networkSecurityGroupRules().get(0).priority()); - Assertions.assertEquals(NetworkSecurityGroupRuleAccess.ALLOW, + Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.endpointConfiguration().inboundNatPools().get(0).networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("voqacpiexpbt", + Assertions.assertEquals("cjzkzivgvvcna", model.endpointConfiguration() .inboundNatPools() .get(0) .networkSecurityGroupRules() .get(0) .sourceAddressPrefix()); - Assertions.assertEquals("bwoenwashrt", + Assertions.assertEquals("yrnxxmueedn", model.endpointConfiguration() .inboundNatPools() .get(0) @@ -54,75 +56,74 @@ public void testDeserialize() throws Exception { .get(0)); Assertions.assertEquals(IpAddressProvisioningType.USER_MANAGED, model.publicIpAddressConfiguration().provision()); - Assertions.assertEquals("nynfsynljphuo", model.publicIpAddressConfiguration().ipAddressIds().get(0)); - Assertions.assertEquals(true, model.enableAcceleratedNetworking()); + Assertions.assertEquals("vimjwos", model.publicIpAddressConfiguration().ipAddressIds().get(0)); + Assertions.assertEquals(IPFamily.IPV4, model.publicIpAddressConfiguration().ipFamilies().get(0)); + Assertions.assertEquals("fjhdg", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("gebdunygaeq", model.publicIpAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertTrue(model.enableAcceleratedNetworking()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkConfiguration model = new NetworkConfiguration().withSubnetId("sdqrhzoymibmrq") + NetworkConfiguration model = new NetworkConfiguration().withSubnetId("u") .withDynamicVnetAssignmentScope(DynamicVNetAssignmentScope.NONE) .withEndpointConfiguration(new PoolEndpointConfiguration().withInboundNatPools(Arrays.asList( - new InboundNatPool().withName("wfluszdt") + new InboundNatPool().withName("wggxkallat") .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(569809127) - .withFrontendPortRangeStart(24536782) - .withFrontendPortRangeEnd(1802230973) + .withBackendPort(1280357892) + .withFrontendPortRangeStart(1349569778) + .withFrontendPortRangeEnd(142716776) .withNetworkSecurityGroupRules(Arrays.asList( - new NetworkSecurityGroupRule().withPriority(695674314) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("voqacpiexpbt") - .withSourcePortRanges(Arrays.asList("bwoenwashrt")), - new NetworkSecurityGroupRule().withPriority(2130378751) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("cnqxwbpokulpi") - .withSourcePortRanges(Arrays.asList("aasipqi", "obyu")))), - new InboundNatPool().withName("erpqlpqwcciuqg") - .withProtocol(InboundEndpointProtocol.UDP) - .withBackendPort(1924773766) - .withFrontendPortRangeStart(1287443771) - .withFrontendPortRangeEnd(164113652) - .withNetworkSecurityGroupRules(Arrays.asList( - new NetworkSecurityGroupRule().withPriority(2060302961) + new NetworkSecurityGroupRule().withPriority(1750624466) .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("btkuwhh") - .withSourcePortRanges(Arrays.asList("k", "joxafnndlpi", "hkoymkcdyhbp", "kpw")), - new NetworkSecurityGroupRule().withPriority(722591670) + .withSourceAddressPrefix("cjzkzivgvvcna") + .withSourcePortRanges(Arrays.asList("yrnxxmueedn", "rdvstkwqqtch")), + new NetworkSecurityGroupRule().withPriority(646701908) .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("q") - .withSourcePortRanges(Arrays.asList("vq", "ovljxywsu", "syrsndsytgadgvra")), - new NetworkSecurityGroupRule().withPriority(890415173) + .withSourceAddressPrefix("mfmtdaaygdvw") + .withSourcePortRanges(Arrays.asList("iohgwxrtfud", "epxgyqagvr", "mnpkukghimdblxg")), + new NetworkSecurityGroupRule().withPriority(261614569) .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("neqn") - .withSourcePortRanges( - Arrays.asList("rwlqu", "ijfqkacewiipfp", "bjibwwiftohq", "vpuvks"))))))) + .withSourceAddressPrefix("fnjhfjxwmszkkfo") + .withSourcePortRanges(Arrays.asList("yfkzik", "jawneaiv", "wczelpci")))), + new InboundNatPool().withName("elsfeaen") + .withProtocol(InboundEndpointProtocol.TCP) + .withBackendPort(1417911120) + .withFrontendPortRangeStart(1449386799) + .withFrontendPortRangeEnd(1448389214) + .withNetworkSecurityGroupRules(Arrays.asList(new NetworkSecurityGroupRule().withPriority(463401012) + .withAccess(NetworkSecurityGroupRuleAccess.DENY) + .withSourceAddressPrefix("dxbjhwuaanozj") + .withSourcePortRanges(Arrays.asList("hyoulpjr"))))))) .withPublicIpAddressConfiguration( new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.USER_MANAGED) - .withIpAddressIds(Arrays.asList("nynfsynljphuo"))) + .withIpAddressIds(Arrays.asList("vimjwos", "tx", "tcs", "fcktqumiekke")) + .withIpFamilies(Arrays.asList(IPFamily.IPV4)) + .withIpTags(Arrays.asList(new IPTag().withIpTagType("fjhdg").withTag("gebdunygaeq")))) .withEnableAcceleratedNetworking(true); model = BinaryData.fromObject(model).toObject(NetworkConfiguration.class); - Assertions.assertEquals("sdqrhzoymibmrq", model.subnetId()); + Assertions.assertEquals("u", model.subnetId()); Assertions.assertEquals(DynamicVNetAssignmentScope.NONE, model.dynamicVnetAssignmentScope()); - Assertions.assertEquals("wfluszdt", model.endpointConfiguration().inboundNatPools().get(0).name()); + Assertions.assertEquals("wggxkallat", model.endpointConfiguration().inboundNatPools().get(0).name()); Assertions.assertEquals(InboundEndpointProtocol.TCP, model.endpointConfiguration().inboundNatPools().get(0).protocol()); - Assertions.assertEquals(569809127, model.endpointConfiguration().inboundNatPools().get(0).backendPort()); - Assertions.assertEquals(24536782, + Assertions.assertEquals(1280357892, model.endpointConfiguration().inboundNatPools().get(0).backendPort()); + Assertions.assertEquals(1349569778, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeStart()); - Assertions.assertEquals(1802230973, + Assertions.assertEquals(142716776, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeEnd()); - Assertions.assertEquals(695674314, + Assertions.assertEquals(1750624466, model.endpointConfiguration().inboundNatPools().get(0).networkSecurityGroupRules().get(0).priority()); - Assertions.assertEquals(NetworkSecurityGroupRuleAccess.ALLOW, + Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.endpointConfiguration().inboundNatPools().get(0).networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("voqacpiexpbt", + Assertions.assertEquals("cjzkzivgvvcna", model.endpointConfiguration() .inboundNatPools() .get(0) .networkSecurityGroupRules() .get(0) .sourceAddressPrefix()); - Assertions.assertEquals("bwoenwashrt", + Assertions.assertEquals("yrnxxmueedn", model.endpointConfiguration() .inboundNatPools() .get(0) @@ -132,7 +133,10 @@ public void testSerialize() throws Exception { .get(0)); Assertions.assertEquals(IpAddressProvisioningType.USER_MANAGED, model.publicIpAddressConfiguration().provision()); - Assertions.assertEquals("nynfsynljphuo", model.publicIpAddressConfiguration().ipAddressIds().get(0)); - Assertions.assertEquals(true, model.enableAcceleratedNetworking()); + Assertions.assertEquals("vimjwos", model.publicIpAddressConfiguration().ipAddressIds().get(0)); + Assertions.assertEquals(IPFamily.IPV4, model.publicIpAddressConfiguration().ipFamilies().get(0)); + Assertions.assertEquals("fjhdg", model.publicIpAddressConfiguration().ipTags().get(0).ipTagType()); + Assertions.assertEquals("gebdunygaeq", model.publicIpAddressConfiguration().ipTags().get(0).tag()); + Assertions.assertTrue(model.enableAcceleratedNetworking()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkProfileTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkProfileTests.java index 8e7ca702f1c0..9fb80b20f8a7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkProfileTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkProfileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -8,6 +8,7 @@ import com.azure.resourcemanager.batch.models.EndpointAccessDefaultAction; import com.azure.resourcemanager.batch.models.EndpointAccessProfile; import com.azure.resourcemanager.batch.models.IpRule; +import com.azure.resourcemanager.batch.models.IpRuleAction; import com.azure.resourcemanager.batch.models.NetworkProfile; import java.util.Arrays; import org.junit.jupiter.api.Assertions; @@ -16,26 +17,33 @@ public final class NetworkProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkProfile model = BinaryData.fromString( - "{\"accountAccess\":{\"defaultAction\":\"Deny\",\"ipRules\":[{\"value\":\"wmrvktsizntocipa\"}]},\"nodeManagementAccess\":{\"defaultAction\":\"Allow\",\"ipRules\":[{\"value\":\"s\"},{\"value\":\"ucmpoyfd\"},{\"value\":\"fogknygjofjdde\"}]}}") + "{\"accountAccess\":{\"defaultAction\":\"Deny\",\"ipRules\":[{\"action\":\"Allow\",\"value\":\"prozvcputegjvwmf\"},{\"action\":\"Allow\",\"value\":\"t\"},{\"action\":\"Allow\",\"value\":\"mdvpjhulsu\"}]},\"nodeManagementAccess\":{\"defaultAction\":\"Deny\",\"ipRules\":[{\"action\":\"Allow\",\"value\":\"zkrwfn\"},{\"action\":\"Allow\",\"value\":\"odjpslwejd\"},{\"action\":\"Allow\",\"value\":\"wryoqpsoacc\"}]}}") .toObject(NetworkProfile.class); Assertions.assertEquals(EndpointAccessDefaultAction.DENY, model.accountAccess().defaultAction()); - Assertions.assertEquals("wmrvktsizntocipa", model.accountAccess().ipRules().get(0).value()); - Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.nodeManagementAccess().defaultAction()); - Assertions.assertEquals("s", model.nodeManagementAccess().ipRules().get(0).value()); + Assertions.assertEquals(IpRuleAction.ALLOW, model.accountAccess().ipRules().get(0).action()); + Assertions.assertEquals("prozvcputegjvwmf", model.accountAccess().ipRules().get(0).value()); + Assertions.assertEquals(EndpointAccessDefaultAction.DENY, model.nodeManagementAccess().defaultAction()); + Assertions.assertEquals(IpRuleAction.ALLOW, model.nodeManagementAccess().ipRules().get(0).action()); + Assertions.assertEquals("zkrwfn", model.nodeManagementAccess().ipRules().get(0).value()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { NetworkProfile model = new NetworkProfile() .withAccountAccess(new EndpointAccessProfile().withDefaultAction(EndpointAccessDefaultAction.DENY) - .withIpRules(Arrays.asList(new IpRule().withValue("wmrvktsizntocipa")))) - .withNodeManagementAccess(new EndpointAccessProfile().withDefaultAction(EndpointAccessDefaultAction.ALLOW) - .withIpRules(Arrays.asList(new IpRule().withValue("s"), new IpRule().withValue("ucmpoyfd"), - new IpRule().withValue("fogknygjofjdde")))); + .withIpRules(Arrays.asList(new IpRule().withAction(IpRuleAction.ALLOW).withValue("prozvcputegjvwmf"), + new IpRule().withAction(IpRuleAction.ALLOW).withValue("t"), + new IpRule().withAction(IpRuleAction.ALLOW).withValue("mdvpjhulsu")))) + .withNodeManagementAccess(new EndpointAccessProfile().withDefaultAction(EndpointAccessDefaultAction.DENY) + .withIpRules(Arrays.asList(new IpRule().withAction(IpRuleAction.ALLOW).withValue("zkrwfn"), + new IpRule().withAction(IpRuleAction.ALLOW).withValue("odjpslwejd"), + new IpRule().withAction(IpRuleAction.ALLOW).withValue("wryoqpsoacc")))); model = BinaryData.fromObject(model).toObject(NetworkProfile.class); Assertions.assertEquals(EndpointAccessDefaultAction.DENY, model.accountAccess().defaultAction()); - Assertions.assertEquals("wmrvktsizntocipa", model.accountAccess().ipRules().get(0).value()); - Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.nodeManagementAccess().defaultAction()); - Assertions.assertEquals("s", model.nodeManagementAccess().ipRules().get(0).value()); + Assertions.assertEquals(IpRuleAction.ALLOW, model.accountAccess().ipRules().get(0).action()); + Assertions.assertEquals("prozvcputegjvwmf", model.accountAccess().ipRules().get(0).value()); + Assertions.assertEquals(EndpointAccessDefaultAction.DENY, model.nodeManagementAccess().defaultAction()); + Assertions.assertEquals(IpRuleAction.ALLOW, model.nodeManagementAccess().ipRules().get(0).action()); + Assertions.assertEquals("zkrwfn", model.nodeManagementAccess().ipRules().get(0).value()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityGroupRuleTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityGroupRuleTests.java index 1a1040758318..5143f88d132b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityGroupRuleTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityGroupRuleTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -14,24 +14,24 @@ public final class NetworkSecurityGroupRuleTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityGroupRule model = BinaryData.fromString( - "{\"priority\":1515133247,\"access\":\"Deny\",\"sourceAddressPrefix\":\"ffimrzrtuzqogsex\",\"sourcePortRanges\":[\"fdnw\",\"wmewzsyy\",\"euzsoi\",\"judpfrxt\"]}") + "{\"priority\":830439521,\"access\":\"Deny\",\"sourceAddressPrefix\":\"uwjuetaeburuvdmo\",\"sourcePortRanges\":[\"zlxwabmqoefkifr\"]}") .toObject(NetworkSecurityGroupRule.class); - Assertions.assertEquals(1515133247, model.priority()); + Assertions.assertEquals(830439521, model.priority()); Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.access()); - Assertions.assertEquals("ffimrzrtuzqogsex", model.sourceAddressPrefix()); - Assertions.assertEquals("fdnw", model.sourcePortRanges().get(0)); + Assertions.assertEquals("uwjuetaeburuvdmo", model.sourceAddressPrefix()); + Assertions.assertEquals("zlxwabmqoefkifr", model.sourcePortRanges().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NetworkSecurityGroupRule model = new NetworkSecurityGroupRule().withPriority(1515133247) + NetworkSecurityGroupRule model = new NetworkSecurityGroupRule().withPriority(830439521) .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("ffimrzrtuzqogsex") - .withSourcePortRanges(Arrays.asList("fdnw", "wmewzsyy", "euzsoi", "judpfrxt")); + .withSourceAddressPrefix("uwjuetaeburuvdmo") + .withSourcePortRanges(Arrays.asList("zlxwabmqoefkifr")); model = BinaryData.fromObject(model).toObject(NetworkSecurityGroupRule.class); - Assertions.assertEquals(1515133247, model.priority()); + Assertions.assertEquals(830439521, model.priority()); Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.access()); - Assertions.assertEquals("ffimrzrtuzqogsex", model.sourceAddressPrefix()); - Assertions.assertEquals("fdnw", model.sourcePortRanges().get(0)); + Assertions.assertEquals("uwjuetaeburuvdmo", model.sourceAddressPrefix()); + Assertions.assertEquals("zlxwabmqoefkifr", model.sourcePortRanges().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationInnerTests.java index 39d3cec98d3b..2c2db97cd8ff 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationInnerTests.java @@ -1,135 +1,41 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.batch.models.AccessRule; import com.azure.resourcemanager.batch.models.AccessRuleDirection; -import com.azure.resourcemanager.batch.models.AccessRuleProperties; -import com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscriptionsItem; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationProperties; -import com.azure.resourcemanager.batch.models.NetworkSecurityProfile; -import com.azure.resourcemanager.batch.models.ResourceAssociation; import com.azure.resourcemanager.batch.models.ResourceAssociationAccessMode; -import java.util.Arrays; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityPerimeterConfigurationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Accepted\",\"provisioningIssues\":[{\"name\":\"fkbw\",\"properties\":{\"issueType\":\"Unknown\",\"severity\":\"Error\",\"description\":\"dw\",\"suggestedResourceIds\":[\"qek\"],\"suggestedAccessRules\":[{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"tjsyin\",\"perimeterGuid\":\"cb8920f0-f01e-432b-95cc-bfcab92d38f8\",\"location\":\"qatmtdhtmdvy\"},\"resourceAssociation\":{\"name\":\"kdgszywkbirr\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"hkjoqr\",\"accessRulesVersion\":115190409,\"accessRules\":[{\"name\":\"jinrvgoupmfiibfg\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"vrwxkv\",\"kkgll\",\"wjygvjayvblmhvk\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"yhgsopbyrqufe\",\"xuvw\"],\"emailAddresses\":[\"nhlmctlpdng\",\"tvgbmhrixkwmy\"],\"phoneNumbers\":[\"jvegrhbpnaixexcc\",\"dreaxh\",\"exdrrvqahqkg\",\"tpwijnh\"]}},{\"name\":\"svfycxzbfv\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"mtg\",\"qp\",\"y\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"myhgfipnsxkmc\"],\"emailAddresses\":[\"krrjrea\",\"xt\"],\"phoneNumbers\":[\"mhjglikkxwslolb\"]}},{\"name\":\"vuzlm\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"tgp\",\"crpw\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"gbrn\",\"w\"],\"emailAddresses\":[\"pn\"],\"phoneNumbers\":[\"zejjoqk\"]}},{\"name\":\"fhsxttaugz\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"pxdtnkdmkq\",\"jlwuenvrkp\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"ebqaaysjkixqtnq\",\"tezlwff\",\"iakp\"],\"emailAddresses\":[\"qmt\",\"d\",\"tmmjihyeozph\"],\"phoneNumbers\":[\"uyqncygupkvipmd\",\"cwxqu\",\"evzhfsto\"]}}],\"diagnosticSettingsVersion\":1386174682,\"enabledLogCategories\":[\"ujbypelmcuvhixb\",\"xyfwnylrcool\",\"ttpkiwkkbnujrywv\",\"y\"]}},\"id\":\"fpncurdo\",\"name\":\"wiithtywub\",\"type\":\"cbihwqk\"}") + "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"vmtgjqppy\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"myhgfipnsxkmc\",\"suggestedResourceIds\":[\"krrjrea\",\"xt\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"hjglikk\",\"properties\":{\"issueType\":\"Unknown\",\"severity\":\"Error\",\"description\":\"qpvuzlmvfelf\",\"suggestedResourceIds\":[\"plcrpwjxeznoig\",\"rnjwmw\",\"pn\",\"saz\"],\"suggestedAccessRules\":[{},{},{}]}},{\"name\":\"qkagfhsxt\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Error\",\"description\":\"faazpxdtnkdmkqjj\",\"suggestedResourceIds\":[\"envrkpyouaibrebq\",\"aysjkixqtnqttez\"],\"suggestedAccessRules\":[{},{}]}},{\"name\":\"fiakpjpqqm\",\"properties\":{\"issueType\":\"Unknown\",\"severity\":\"Warning\",\"description\":\"jihy\",\"suggestedResourceIds\":[\"phvwauyqncygu\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"mdscwxqupev\",\"perimeterGuid\":\"f\",\"location\":\"otxhojujby\"},\"resourceAssociation\":{\"name\":\"mc\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"bjx\",\"accessRulesVersion\":12838706,\"accessRules\":[{\"name\":\"r\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"tpkiwkkbnujry\",\"vtylbfpncu\",\"doiwi\",\"thtywub\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"knfd\",\"twjchrdg\"],\"emailAddresses\":[\"xum\",\"ctondz\",\"luudfdlwggytsb\"],\"phoneNumbers\":[\"vvt\",\"seinqfiuf\",\"qknp\",\"rgnepttwqmsniffc\"]}}],\"diagnosticSettingsVersion\":2032190732,\"enabledLogCategories\":[\"ojlpijnkrxf\"]}},\"id\":\"dhcrati\",\"name\":\"zronasxift\",\"type\":\"zq\"}") .toObject(NetworkSecurityPerimeterConfigurationInner.class); - Assertions.assertEquals("tjsyin", model.properties().networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("cb8920f0-f01e-432b-95cc-bfcab92d38f8"), - model.properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("qatmtdhtmdvy", model.properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("kdgszywkbirr", model.properties().resourceAssociation().name()); - Assertions.assertEquals(ResourceAssociationAccessMode.ENFORCED, + Assertions.assertEquals("mdscwxqupev", model.properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("f", model.properties().networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("otxhojujby", model.properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("mc", model.properties().resourceAssociation().name()); + Assertions.assertEquals(ResourceAssociationAccessMode.LEARNING, model.properties().resourceAssociation().accessMode()); - Assertions.assertEquals("hkjoqr", model.properties().profile().name()); - Assertions.assertEquals(115190409, model.properties().profile().accessRulesVersion()); - Assertions.assertEquals("jinrvgoupmfiibfg", model.properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(AccessRuleDirection.INBOUND, + Assertions.assertEquals("bjx", model.properties().profile().name()); + Assertions.assertEquals(12838706, model.properties().profile().accessRulesVersion()); + Assertions.assertEquals("r", model.properties().profile().accessRules().get(0).name()); + Assertions.assertEquals(AccessRuleDirection.OUTBOUND, model.properties().profile().accessRules().get(0).properties().direction()); - Assertions.assertEquals("vrwxkv", + Assertions.assertEquals("tpkiwkkbnujry", model.properties().profile().accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("yhgsopbyrqufe", + Assertions.assertEquals("knfd", model.properties().profile().accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("nhlmctlpdng", + Assertions.assertEquals("xum", model.properties().profile().accessRules().get(0).properties().emailAddresses().get(0)); - Assertions.assertEquals("jvegrhbpnaixexcc", + Assertions.assertEquals("vvt", model.properties().profile().accessRules().get(0).properties().phoneNumbers().get(0)); - Assertions.assertEquals(1386174682, model.properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("ujbypelmcuvhixb", model.properties().profile().enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationInner model = new NetworkSecurityPerimeterConfigurationInner() - .withProperties(new NetworkSecurityPerimeterConfigurationProperties() - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeter().withId("tjsyin") - .withPerimeterGuid(UUID.fromString("cb8920f0-f01e-432b-95cc-bfcab92d38f8")) - .withLocation("qatmtdhtmdvy")) - .withResourceAssociation(new ResourceAssociation().withName("kdgszywkbirr") - .withAccessMode(ResourceAssociationAccessMode.ENFORCED)) - .withProfile(new NetworkSecurityProfile().withName("hkjoqr") - .withAccessRulesVersion(115190409) - .withAccessRules(Arrays.asList( - new AccessRule().withName("jinrvgoupmfiibfg") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("vrwxkv", "kkgll", "wjygvjayvblmhvk")) - .withSubscriptions(Arrays.asList(new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeter())) - .withFullyQualifiedDomainNames(Arrays.asList("yhgsopbyrqufe", "xuvw")) - .withEmailAddresses(Arrays.asList("nhlmctlpdng", "tvgbmhrixkwmy")) - .withPhoneNumbers( - Arrays.asList("jvegrhbpnaixexcc", "dreaxh", "exdrrvqahqkg", "tpwijnh"))), - new AccessRule().withName("svfycxzbfv") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("mtg", "qp", "y")) - .withSubscriptions(Arrays.asList(new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeter())) - .withFullyQualifiedDomainNames(Arrays.asList("myhgfipnsxkmc")) - .withEmailAddresses(Arrays.asList("krrjrea", "xt")) - .withPhoneNumbers(Arrays.asList("mhjglikkxwslolb"))), - new AccessRule().withName("vuzlm") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("tgp", "crpw")) - .withSubscriptions(Arrays.asList(new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeter(), - new NetworkSecurityPerimeter(), new NetworkSecurityPerimeter())) - .withFullyQualifiedDomainNames(Arrays.asList("gbrn", "w")) - .withEmailAddresses(Arrays.asList("pn")) - .withPhoneNumbers(Arrays.asList("zejjoqk"))), - new AccessRule().withName("fhsxttaugz") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("pxdtnkdmkq", "jlwuenvrkp")) - .withSubscriptions(Arrays.asList(new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem(), - new AccessRulePropertiesSubscriptionsItem())) - .withNetworkSecurityPerimeters( - Arrays.asList(new NetworkSecurityPerimeter(), new NetworkSecurityPerimeter())) - .withFullyQualifiedDomainNames(Arrays.asList("ebqaaysjkixqtnq", "tezlwff", "iakp")) - .withEmailAddresses(Arrays.asList("qmt", "d", "tmmjihyeozph")) - .withPhoneNumbers(Arrays.asList("uyqncygupkvipmd", "cwxqu", "evzhfsto"))))) - .withDiagnosticSettingsVersion(1386174682) - .withEnabledLogCategories( - Arrays.asList("ujbypelmcuvhixb", "xyfwnylrcool", "ttpkiwkkbnujrywv", "y")))); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationInner.class); - Assertions.assertEquals("tjsyin", model.properties().networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("cb8920f0-f01e-432b-95cc-bfcab92d38f8"), - model.properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("qatmtdhtmdvy", model.properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("kdgszywkbirr", model.properties().resourceAssociation().name()); - Assertions.assertEquals(ResourceAssociationAccessMode.ENFORCED, - model.properties().resourceAssociation().accessMode()); - Assertions.assertEquals("hkjoqr", model.properties().profile().name()); - Assertions.assertEquals(115190409, model.properties().profile().accessRulesVersion()); - Assertions.assertEquals("jinrvgoupmfiibfg", model.properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(AccessRuleDirection.INBOUND, - model.properties().profile().accessRules().get(0).properties().direction()); - Assertions.assertEquals("vrwxkv", - model.properties().profile().accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("yhgsopbyrqufe", - model.properties().profile().accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("nhlmctlpdng", - model.properties().profile().accessRules().get(0).properties().emailAddresses().get(0)); - Assertions.assertEquals("jvegrhbpnaixexcc", - model.properties().profile().accessRules().get(0).properties().phoneNumbers().get(0)); - Assertions.assertEquals(1386174682, model.properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("ujbypelmcuvhixb", model.properties().profile().enabledLogCategories().get(0)); + Assertions.assertEquals(2032190732, model.properties().profile().diagnosticSettingsVersion()); + Assertions.assertEquals("ojlpijnkrxf", model.properties().profile().enabledLogCategories().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationListResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationListResultTests.java index 74be8a214e9d..507818006e9c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationListResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationListResultTests.java @@ -1,103 +1,31 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.NetworkSecurityPerimeterConfigurationInner; -import com.azure.resourcemanager.batch.models.AccessRule; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationListResult; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationProperties; -import com.azure.resourcemanager.batch.models.NetworkSecurityProfile; -import com.azure.resourcemanager.batch.models.ResourceAssociation; +import com.azure.resourcemanager.batch.implementation.models.NetworkSecurityPerimeterConfigurationListResult; import com.azure.resourcemanager.batch.models.ResourceAssociationAccessMode; -import java.util.Arrays; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityPerimeterConfigurationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationListResult model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"provisioningIssues\":[{\"name\":\"mokzhjjklf\",\"properties\":{}},{\"name\":\"ouw\",\"properties\":{}},{\"name\":\"zrfze\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"izikayuhq\",\"perimeterGuid\":\"50951dba-365f-4f5f-b2ba-56743a8992f6\",\"location\":\"bs\"},\"resourceAssociation\":{\"name\":\"qwrvtldgmfp\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"paslthaqfxssmwu\",\"accessRulesVersion\":1363759065,\"accessRules\":[{},{}],\"diagnosticSettingsVersion\":213351747,\"enabledLogCategories\":[\"drhneuyow\",\"kdw\"]}},\"id\":\"i\",\"name\":\"ib\",\"type\":\"rcgp\"},{\"properties\":{\"provisioningState\":\"Deleting\",\"provisioningIssues\":[{\"name\":\"j\",\"properties\":{}},{\"name\":\"lfzxiavrmbzonoki\",\"properties\":{}},{\"name\":\"q\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"zpfrla\",\"perimeterGuid\":\"747f6148-6b0a-4c5b-b2d1-83d9f069a620\",\"location\":\"rnwoiindfp\"},\"resourceAssociation\":{\"name\":\"ylwbtlhflsjcdhsz\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"gofel\",\"accessRulesVersion\":940217853,\"accessRules\":[{},{},{}],\"diagnosticSettingsVersion\":720803172,\"enabledLogCategories\":[\"dvriiiojnal\",\"hfkvtvsexsowuel\",\"qhhahhxvrhmzkwpj\",\"wws\"]}},\"id\":\"ghftqsxhqxujxuk\",\"name\":\"dxdigr\",\"type\":\"guufzd\"},{\"properties\":{\"provisioningState\":\"Creating\",\"provisioningIssues\":[{\"name\":\"hwhbotzingamv\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"szqzudphqamv\",\"perimeterGuid\":\"4a6db037-f831-43ee-a56b-6267a0519f47\",\"location\":\"wynwcvtbvkayhm\"},\"resourceAssociation\":{\"name\":\"yqiatkzwp\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"cjaesgvvs\",\"accessRulesVersion\":1469869368,\"accessRules\":[{}],\"diagnosticSettingsVersion\":306781812,\"enabledLogCategories\":[\"hwyg\",\"lvdnkfx\",\"semdwzrmu\",\"apfcqdpsq\"]}},\"id\":\"vpsvuoymgcce\",\"name\":\"vezrypqlmfeo\",\"type\":\"erqwkyhkobopg\"}],\"nextLink\":\"dkow\"}") + "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"provisioningIssues\":[{\"name\":\"ltlwtjjguktalhs\",\"properties\":{}},{\"name\":\"cdmxzrpoaiml\",\"properties\":{}},{\"name\":\"aaomylweazu\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"thwwn\",\"perimeterGuid\":\"hlf\",\"location\":\"wpchwahf\"},\"resourceAssociation\":{\"name\":\"snfepgfewetwlyx\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"kxhdjhlimmbcx\",\"accessRulesVersion\":1970187431,\"accessRules\":[{}],\"diagnosticSettingsVersion\":2072756273,\"enabledLogCategories\":[\"xcjzhqizxfpxt\",\"qscjavftjuh\",\"qaz\",\"mtggu\"]}},\"id\":\"ijr\",\"name\":\"jcivmmg\",\"type\":\"f\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"kneuvyinzqo\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"gsh\",\"perimeterGuid\":\"gsgbpfgzdjt\",\"location\":\"zflbqvg\"},\"resourceAssociation\":{\"name\":\"lgafcqusrdve\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"tutnwlduycvuzhyr\",\"accessRulesVersion\":680405996,\"accessRules\":[{},{},{}],\"diagnosticSettingsVersion\":1846853425,\"enabledLogCategories\":[\"dxukuqgsjjxundxg\"]}},\"id\":\"twzhhzjhfjmhv\",\"name\":\"muvgp\",\"type\":\"uneqsxvmhf\"},{\"properties\":{\"provisioningState\":\"Creating\",\"provisioningIssues\":[{\"name\":\"sasbhu\",\"properties\":{}},{\"name\":\"ohyuemslynsq\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"oobrlttyms\",\"perimeterGuid\":\"ygqdnfwqzdz\",\"location\":\"ilaxhn\"},\"resourceAssociation\":{\"name\":\"lyvijouwiv\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"un\",\"accessRulesVersion\":1975908496,\"accessRules\":[{},{},{}],\"diagnosticSettingsVersion\":1726565919,\"enabledLogCategories\":[\"cpwpg\",\"lrcivtsoxfrke\",\"xpmyyefrpmpdnq\"]}},\"id\":\"ka\",\"name\":\"ao\",\"type\":\"vmm\"},{\"properties\":{\"provisioningState\":\"Updating\",\"provisioningIssues\":[{\"name\":\"qlkzme\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"gvkxlzyqdrfe\",\"perimeterGuid\":\"ealzxwhcansymoyq\",\"location\":\"wigdi\"},\"resourceAssociation\":{\"name\":\"bxgomfaj\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"vdaeyyguxakjsq\",\"accessRulesVersion\":1954072007,\"accessRules\":[{},{}],\"diagnosticSettingsVersion\":879392983,\"enabledLogCategories\":[\"msidxasicddyvv\",\"skgfmocwahpq\",\"atjeaahh\",\"jhhn\"]}},\"id\":\"zybbj\",\"name\":\"idjks\",\"type\":\"xkyxvxevblbj\"}],\"nextLink\":\"nljlageuaulx\"}") .toObject(NetworkSecurityPerimeterConfigurationListResult.class); - Assertions.assertEquals("izikayuhq", model.value().get(0).properties().networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("50951dba-365f-4f5f-b2ba-56743a8992f6"), - model.value().get(0).properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("bs", model.value().get(0).properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("qwrvtldgmfp", model.value().get(0).properties().resourceAssociation().name()); + Assertions.assertEquals("thwwn", model.value().get(0).properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("hlf", model.value().get(0).properties().networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("wpchwahf", model.value().get(0).properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("snfepgfewetwlyx", model.value().get(0).properties().resourceAssociation().name()); Assertions.assertEquals(ResourceAssociationAccessMode.LEARNING, model.value().get(0).properties().resourceAssociation().accessMode()); - Assertions.assertEquals("paslthaqfxssmwu", model.value().get(0).properties().profile().name()); - Assertions.assertEquals(1363759065, model.value().get(0).properties().profile().accessRulesVersion()); - Assertions.assertEquals(213351747, model.value().get(0).properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("drhneuyow", model.value().get(0).properties().profile().enabledLogCategories().get(0)); - Assertions.assertEquals("dkow", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationListResult model - = new NetworkSecurityPerimeterConfigurationListResult() - .withValue( - Arrays - .asList( - new NetworkSecurityPerimeterConfigurationInner() - .withProperties( - new NetworkSecurityPerimeterConfigurationProperties() - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeter().withId("izikayuhq") - .withPerimeterGuid(UUID.fromString("50951dba-365f-4f5f-b2ba-56743a8992f6")) - .withLocation("bs")) - .withResourceAssociation(new ResourceAssociation().withName("qwrvtldgmfp") - .withAccessMode(ResourceAssociationAccessMode.LEARNING)) - .withProfile(new NetworkSecurityProfile().withName("paslthaqfxssmwu") - .withAccessRulesVersion(1363759065) - .withAccessRules(Arrays.asList(new AccessRule(), new AccessRule())) - .withDiagnosticSettingsVersion(213351747) - .withEnabledLogCategories(Arrays.asList("drhneuyow", "kdw")))), - new NetworkSecurityPerimeterConfigurationInner() - .withProperties(new NetworkSecurityPerimeterConfigurationProperties() - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeter().withId("zpfrla") - .withPerimeterGuid(UUID.fromString("747f6148-6b0a-4c5b-b2d1-83d9f069a620")) - .withLocation("rnwoiindfp")) - .withResourceAssociation(new ResourceAssociation().withName("ylwbtlhflsjcdhsz") - .withAccessMode(ResourceAssociationAccessMode.ENFORCED)) - .withProfile(new NetworkSecurityProfile().withName("gofel") - .withAccessRulesVersion(940217853) - .withAccessRules( - Arrays.asList(new AccessRule(), new AccessRule(), new AccessRule())) - .withDiagnosticSettingsVersion(720803172) - .withEnabledLogCategories( - Arrays.asList("dvriiiojnal", "hfkvtvsexsowuel", "qhhahhxvrhmzkwpj", - "wws")))), - new NetworkSecurityPerimeterConfigurationInner() - .withProperties(new NetworkSecurityPerimeterConfigurationProperties() - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeter().withId("szqzudphqamv") - .withPerimeterGuid(UUID.fromString("4a6db037-f831-43ee-a56b-6267a0519f47")) - .withLocation("wynwcvtbvkayhm")) - .withResourceAssociation(new ResourceAssociation().withName("yqiatkzwp") - .withAccessMode(ResourceAssociationAccessMode.AUDIT)) - .withProfile(new NetworkSecurityProfile().withName("cjaesgvvs") - .withAccessRulesVersion(1469869368) - .withAccessRules(Arrays.asList(new AccessRule())) - .withDiagnosticSettingsVersion(306781812) - .withEnabledLogCategories( - Arrays.asList("hwyg", "lvdnkfx", "semdwzrmu", "apfcqdpsq")))))) - .withNextLink("dkow"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationListResult.class); - Assertions.assertEquals("izikayuhq", model.value().get(0).properties().networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("50951dba-365f-4f5f-b2ba-56743a8992f6"), - model.value().get(0).properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("bs", model.value().get(0).properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("qwrvtldgmfp", model.value().get(0).properties().resourceAssociation().name()); - Assertions.assertEquals(ResourceAssociationAccessMode.LEARNING, - model.value().get(0).properties().resourceAssociation().accessMode()); - Assertions.assertEquals("paslthaqfxssmwu", model.value().get(0).properties().profile().name()); - Assertions.assertEquals(1363759065, model.value().get(0).properties().profile().accessRulesVersion()); - Assertions.assertEquals(213351747, model.value().get(0).properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("drhneuyow", model.value().get(0).properties().profile().enabledLogCategories().get(0)); - Assertions.assertEquals("dkow", model.nextLink()); + Assertions.assertEquals("kxhdjhlimmbcx", model.value().get(0).properties().profile().name()); + Assertions.assertEquals(1970187431, model.value().get(0).properties().profile().accessRulesVersion()); + Assertions.assertEquals(2072756273, model.value().get(0).properties().profile().diagnosticSettingsVersion()); + Assertions.assertEquals("xcjzhqizxfpxt", + model.value().get(0).properties().profile().enabledLogCategories().get(0)); + Assertions.assertEquals("nljlageuaulx", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java index 6696b176a06a..81e46dad1d6f 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java @@ -1,89 +1,38 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.AccessRule; import com.azure.resourcemanager.batch.models.AccessRuleDirection; -import com.azure.resourcemanager.batch.models.AccessRuleProperties; -import com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscriptionsItem; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter; import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfigurationProperties; -import com.azure.resourcemanager.batch.models.NetworkSecurityProfile; -import com.azure.resourcemanager.batch.models.ResourceAssociation; import com.azure.resourcemanager.batch.models.ResourceAssociationAccessMode; -import java.util.Arrays; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityPerimeterConfigurationPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityPerimeterConfigurationProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Accepted\",\"provisioningIssues\":[{\"name\":\"jchrdgoihxumw\",\"properties\":{\"issueType\":\"Unknown\",\"severity\":\"Warning\",\"description\":\"luudfdlwggytsb\",\"suggestedResourceIds\":[\"vvt\",\"seinqfiuf\",\"qknp\",\"rgnepttwqmsniffc\"],\"suggestedAccessRules\":[{\"name\":\"r\",\"properties\":{}},{\"name\":\"pij\",\"properties\":{}},{\"name\":\"xfrdd\",\"properties\":{}},{\"name\":\"atiz\",\"properties\":{}}]}},{\"name\":\"nasx\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"zh\",\"suggestedResourceIds\":[\"esgogc\",\"honnxkrlgnyhmos\",\"xkk\"],\"suggestedAccessRules\":[{\"name\":\"rghxjb\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"vcxgfrpdsofbshr\",\"perimeterGuid\":\"7bf27913-21bf-4574-9f4c-ec6f69556a78\",\"location\":\"buswdvzyy\"},\"resourceAssociation\":{\"name\":\"nu\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"tkfa\",\"accessRulesVersion\":1955812770,\"accessRules\":[{\"name\":\"ikyzirtxdy\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"tpsew\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"kr\"],\"emailAddresses\":[\"tqmieox\",\"rgguf\",\"yaomtb\"],\"phoneNumbers\":[\"avgrvkffovjz\",\"pjbi\"]}}],\"diagnosticSettingsVersion\":1956695064,\"enabledLogCategories\":[\"xumvfcluyovw\",\"nbkfezzxscy\"]}}") + "{\"provisioningState\":\"Updating\",\"provisioningIssues\":[{\"name\":\"esgogc\",\"properties\":{\"issueType\":\"Unknown\",\"severity\":\"Warning\",\"description\":\"rlgnyhmos\",\"suggestedResourceIds\":[\"kgthrrghxjbd\",\"qxvcxgfrpdsofb\"],\"suggestedAccessRules\":[{\"name\":\"svbuswdvzyy\",\"properties\":{}},{\"name\":\"nu\",\"properties\":{}},{\"name\":\"srtkfa\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"qg\",\"perimeterGuid\":\"yzirtxdyuxzejn\",\"location\":\"sewgioilqukr\"},\"resourceAssociation\":{\"name\":\"tqmieox\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"f\",\"accessRulesVersion\":1933548472,\"accessRules\":[{\"name\":\"bghhavgrvkf\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"pjbi\",\"gjmfxumvfcl\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"bkfezzxscyhwzdgi\",\"ujb\",\"bomvzzbtdcqv\"],\"emailAddresses\":[\"yujviylwdshfssn\",\"bgye\",\"rymsgaojfmw\",\"cotmr\"],\"phoneNumbers\":[\"rctym\",\"xoftpipiwyczu\",\"xacpqjli\",\"hyus\"]}},{\"name\":\"kasdvlm\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"ulucv\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"uzvx\",\"risjnhnytxifqjz\"],\"emailAddresses\":[\"rhublwpcesutrg\",\"upauut\",\"woqhihe\"],\"phoneNumbers\":[\"w\"]}}],\"diagnosticSettingsVersion\":938622806,\"enabledLogCategories\":[\"n\",\"cypsxjv\",\"oimwkslirc\",\"zjxvydfcea\"]}}") .toObject(NetworkSecurityPerimeterConfigurationProperties.class); - Assertions.assertEquals("vcxgfrpdsofbshr", model.networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("7bf27913-21bf-4574-9f4c-ec6f69556a78"), - model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("buswdvzyy", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("nu", model.resourceAssociation().name()); - Assertions.assertEquals(ResourceAssociationAccessMode.LEARNING, model.resourceAssociation().accessMode()); - Assertions.assertEquals("tkfa", model.profile().name()); - Assertions.assertEquals(1955812770, model.profile().accessRulesVersion()); - Assertions.assertEquals("ikyzirtxdy", model.profile().accessRules().get(0).name()); - Assertions.assertEquals(AccessRuleDirection.INBOUND, + Assertions.assertEquals("qg", model.networkSecurityPerimeter().id()); + Assertions.assertEquals("yzirtxdyuxzejn", model.networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("sewgioilqukr", model.networkSecurityPerimeter().location()); + Assertions.assertEquals("tqmieox", model.resourceAssociation().name()); + Assertions.assertEquals(ResourceAssociationAccessMode.AUDIT, model.resourceAssociation().accessMode()); + Assertions.assertEquals("f", model.profile().name()); + Assertions.assertEquals(1933548472, model.profile().accessRulesVersion()); + Assertions.assertEquals("bghhavgrvkf", model.profile().accessRules().get(0).name()); + Assertions.assertEquals(AccessRuleDirection.OUTBOUND, model.profile().accessRules().get(0).properties().direction()); - Assertions.assertEquals("tpsew", model.profile().accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("kr", + Assertions.assertEquals("pjbi", model.profile().accessRules().get(0).properties().addressPrefixes().get(0)); + Assertions.assertEquals("bkfezzxscyhwzdgi", model.profile().accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("tqmieox", model.profile().accessRules().get(0).properties().emailAddresses().get(0)); - Assertions.assertEquals("avgrvkffovjz", - model.profile().accessRules().get(0).properties().phoneNumbers().get(0)); - Assertions.assertEquals(1956695064, model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("xumvfcluyovw", model.profile().enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeterConfigurationProperties model = new NetworkSecurityPerimeterConfigurationProperties() - .withNetworkSecurityPerimeter(new NetworkSecurityPerimeter().withId("vcxgfrpdsofbshr") - .withPerimeterGuid(UUID.fromString("7bf27913-21bf-4574-9f4c-ec6f69556a78")) - .withLocation("buswdvzyy")) - .withResourceAssociation( - new ResourceAssociation().withName("nu").withAccessMode(ResourceAssociationAccessMode.LEARNING)) - .withProfile(new NetworkSecurityProfile().withName("tkfa") - .withAccessRulesVersion(1955812770) - .withAccessRules(Arrays.asList(new AccessRule().withName("ikyzirtxdy") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.INBOUND) - .withAddressPrefixes(Arrays.asList("tpsew")) - .withSubscriptions(Arrays.asList(new AccessRulePropertiesSubscriptionsItem())) - .withNetworkSecurityPerimeters(Arrays.asList(new NetworkSecurityPerimeter())) - .withFullyQualifiedDomainNames(Arrays.asList("kr")) - .withEmailAddresses(Arrays.asList("tqmieox", "rgguf", "yaomtb")) - .withPhoneNumbers(Arrays.asList("avgrvkffovjz", "pjbi"))))) - .withDiagnosticSettingsVersion(1956695064) - .withEnabledLogCategories(Arrays.asList("xumvfcluyovw", "nbkfezzxscy"))); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeterConfigurationProperties.class); - Assertions.assertEquals("vcxgfrpdsofbshr", model.networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("7bf27913-21bf-4574-9f4c-ec6f69556a78"), - model.networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("buswdvzyy", model.networkSecurityPerimeter().location()); - Assertions.assertEquals("nu", model.resourceAssociation().name()); - Assertions.assertEquals(ResourceAssociationAccessMode.LEARNING, model.resourceAssociation().accessMode()); - Assertions.assertEquals("tkfa", model.profile().name()); - Assertions.assertEquals(1955812770, model.profile().accessRulesVersion()); - Assertions.assertEquals("ikyzirtxdy", model.profile().accessRules().get(0).name()); - Assertions.assertEquals(AccessRuleDirection.INBOUND, - model.profile().accessRules().get(0).properties().direction()); - Assertions.assertEquals("tpsew", model.profile().accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("kr", - model.profile().accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("tqmieox", model.profile().accessRules().get(0).properties().emailAddresses().get(0)); - Assertions.assertEquals("avgrvkffovjz", - model.profile().accessRules().get(0).properties().phoneNumbers().get(0)); - Assertions.assertEquals(1956695064, model.profile().diagnosticSettingsVersion()); - Assertions.assertEquals("xumvfcluyovw", model.profile().enabledLogCategories().get(0)); + Assertions.assertEquals("yujviylwdshfssn", + model.profile().accessRules().get(0).properties().emailAddresses().get(0)); + Assertions.assertEquals("rctym", model.profile().accessRules().get(0).properties().phoneNumbers().get(0)); + Assertions.assertEquals(938622806, model.profile().diagnosticSettingsVersion()); + Assertions.assertEquals("n", model.profile().enabledLogCategories().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterTests.java index a6c4b8c83bf2..0833e3926802 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimeterTests.java @@ -1,33 +1,21 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityPerimeterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - NetworkSecurityPerimeter model = BinaryData.fromString( - "{\"id\":\"aomdjvlpjxx\",\"perimeterGuid\":\"175d9d74-ede7-44cc-98d4-408a135137d2\",\"location\":\"rmsgeivsiykzkd\"}") - .toObject(NetworkSecurityPerimeter.class); - Assertions.assertEquals("aomdjvlpjxx", model.id()); - Assertions.assertEquals(UUID.fromString("175d9d74-ede7-44cc-98d4-408a135137d2"), model.perimeterGuid()); - Assertions.assertEquals("rmsgeivsiykzkd", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityPerimeter model = new NetworkSecurityPerimeter().withId("aomdjvlpjxx") - .withPerimeterGuid(UUID.fromString("175d9d74-ede7-44cc-98d4-408a135137d2")) - .withLocation("rmsgeivsiykzkd"); - model = BinaryData.fromObject(model).toObject(NetworkSecurityPerimeter.class); - Assertions.assertEquals("aomdjvlpjxx", model.id()); - Assertions.assertEquals(UUID.fromString("175d9d74-ede7-44cc-98d4-408a135137d2"), model.perimeterGuid()); - Assertions.assertEquals("rmsgeivsiykzkd", model.location()); + NetworkSecurityPerimeter model + = BinaryData.fromString("{\"id\":\"qyikvy\",\"perimeterGuid\":\"uyav\",\"location\":\"wmn\"}") + .toObject(NetworkSecurityPerimeter.class); + Assertions.assertEquals("qyikvy", model.id()); + Assertions.assertEquals("uyav", model.perimeterGuid()); + Assertions.assertEquals("wmn", model.location()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersGetConfigurationWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersGetConfigurationWithResponseMockTests.java index 240900421a3f..259cf9af9ef3 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersGetConfigurationWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersGetConfigurationWithResponseMockTests.java @@ -1,20 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfiguration; import com.azure.resourcemanager.batch.models.ResourceAssociationAccessMode; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; -import java.util.UUID; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -23,30 +22,29 @@ public final class NetworkSecurityPerimetersGetConfigurationWithResponseMockTest @Test public void testGetConfigurationWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Deleting\",\"provisioningIssues\":[{\"name\":\"vwgf\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"izmdksa\",\"suggestedResourceIds\":[\"cluqvo\",\"mycjimryvwgcwwp\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"w\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Error\",\"description\":\"efoh\",\"suggestedResourceIds\":[\"vopwndyqleallk\",\"mtkhlowkxxpvbr\",\"fjmzsyzfho\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"cyychunsjlp\",\"perimeterGuid\":\"5f4ccc95-30f6-481d-91bc-9ee6d9f3eaa0\",\"location\":\"wszhvvuicphvtrr\"},\"resourceAssociation\":{\"name\":\"rbfdpyflubhvjg\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"yzlwh\",\"accessRulesVersion\":1008806240,\"accessRules\":[{\"name\":\"oclu\",\"properties\":{}},{\"name\":\"qmemc\",\"properties\":{}}],\"diagnosticSettingsVersion\":1132519096,\"enabledLogCategories\":[\"kyujxsglhsrrr\",\"ejylmbkzu\"]}},\"id\":\"igrfihotjewl\",\"name\":\"xuzzjgnrefq\",\"type\":\"hqo\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"gbrouxddbh\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"jzoywjxhp\",\"suggestedResourceIds\":[\"ontacnpq\",\"tehtuevrhrljyoog\",\"xh\"],\"suggestedAccessRules\":[{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"gwbsreurf\",\"perimeterGuid\":\"fuarenlvhht\",\"location\":\"nvnaf\"},\"resourceAssociation\":{\"name\":\"yfedevjbo\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"y\",\"accessRulesVersion\":1645187653,\"accessRules\":[{\"name\":\"inqcymczngnbdxxe\",\"properties\":{}},{\"name\":\"invudbch\",\"properties\":{}},{\"name\":\"tvq\",\"properties\":{}},{\"name\":\"qct\",\"properties\":{}}],\"diagnosticSettingsVersion\":1880749879,\"enabledLogCategories\":[\"dmflhuytx\"]}},\"id\":\"tznapxbannovv\",\"name\":\"xc\",\"type\":\"ytprwnwvroev\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeters() - .getConfigurationWithResponse("abeolhbhlvbm", "uqibsxtkcu", "fbsfarfsiow", com.azure.core.util.Context.NONE) + .getConfigurationWithResponse("hgbvqtan", "rfdl", "ukhpyrneizjcp", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("cyychunsjlp", response.properties().networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("5f4ccc95-30f6-481d-91bc-9ee6d9f3eaa0"), - response.properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("wszhvvuicphvtrr", response.properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("rbfdpyflubhvjg", response.properties().resourceAssociation().name()); + Assertions.assertEquals("gwbsreurf", response.properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("fuarenlvhht", response.properties().networkSecurityPerimeter().perimeterGuid()); + Assertions.assertEquals("nvnaf", response.properties().networkSecurityPerimeter().location()); + Assertions.assertEquals("yfedevjbo", response.properties().resourceAssociation().name()); Assertions.assertEquals(ResourceAssociationAccessMode.ENFORCED, response.properties().resourceAssociation().accessMode()); - Assertions.assertEquals("yzlwh", response.properties().profile().name()); - Assertions.assertEquals(1008806240, response.properties().profile().accessRulesVersion()); - Assertions.assertEquals("oclu", response.properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(1132519096, response.properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("kyujxsglhsrrr", response.properties().profile().enabledLogCategories().get(0)); + Assertions.assertEquals("y", response.properties().profile().name()); + Assertions.assertEquals(1645187653, response.properties().profile().accessRulesVersion()); + Assertions.assertEquals("inqcymczngnbdxxe", response.properties().profile().accessRules().get(0).name()); + Assertions.assertEquals(1880749879, response.properties().profile().diagnosticSettingsVersion()); + Assertions.assertEquals("dmflhuytx", response.properties().profile().enabledLogCategories().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersListConfigurationsMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersListConfigurationsMockTests.java index cfe58c6ea64b..7aa862af5f7a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersListConfigurationsMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityPerimetersListConfigurationsMockTests.java @@ -1,21 +1,20 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeterConfiguration; import com.azure.resourcemanager.batch.models.ResourceAssociationAccessMode; import java.nio.charset.StandardCharsets; import java.time.OffsetDateTime; -import java.util.UUID; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; @@ -24,33 +23,34 @@ public final class NetworkSecurityPerimetersListConfigurationsMockTests { @Test public void testListConfigurations() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Canceled\",\"provisioningIssues\":[{\"name\":\"wxhn\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"sreurfqkfuare\",\"suggestedResourceIds\":[\"hhtklnvnafvvkyfe\",\"ev\",\"bo\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"xypokkhmi\",\"properties\":{\"issueType\":\"Unknown\",\"severity\":\"Error\",\"description\":\"ngnbdxxew\",\"suggestedResourceIds\":[\"nvudbchaqdtvqecr\",\"ct\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"tddmf\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"vtzn\",\"suggestedResourceIds\":[\"bannovvoxczytp\",\"wnwvroevytlyokr\",\"rouuxvnsasbcry\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"zrxklobd\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"mlmvevfxzo\",\"suggestedResourceIds\":[\"bzxliohrdddtfgxq\",\"awpcbbnzqcykn\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"yuicdhzbdy\",\"perimeterGuid\":\"ee2613fa-7a90-4890-b9ab-a577b4370aa1\",\"location\":\"gbdvibidmhmwff\"},\"resourceAssociation\":{\"name\":\"muvapc\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"vwe\",\"accessRulesVersion\":798651388,\"accessRules\":[{\"name\":\"ukphaimmoiroq\",\"properties\":{}},{\"name\":\"hbragapyyr\",\"properties\":{}},{\"name\":\"vbpavbopfppdbw\",\"properties\":{}}],\"diagnosticSettingsVersion\":1237918766,\"enabledLogCategories\":[\"xkumasjcaac\",\"dmmcpugmehqep\",\"u\",\"hbzehewho\"]}},\"id\":\"nlbqnbldxeaclg\",\"name\":\"chorimkrsr\",\"type\":\"moucsofldpuviyfc\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"dizr\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"nazpmk\",\"suggestedResourceIds\":[\"vevfxz\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"bzxliohrdddtfgxq\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"nzqcy\",\"suggestedResourceIds\":[\"p\",\"ofyuicd\",\"zb\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"wgbdvibidmhmwffp\",\"properties\":{\"issueType\":\"Unknown\",\"severity\":\"Error\",\"description\":\"ck\",\"suggestedResourceIds\":[\"rv\",\"eyoxoyyukphai\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"roqboshbragapyy\",\"properties\":{\"issueType\":\"MissingIdentityConfiguration\",\"severity\":\"Warning\",\"description\":\"avbopfp\",\"suggestedResourceIds\":[\"wnupgahxku\",\"asjcaacfdmmcpu\",\"mehqepvufh\",\"zeh\"],\"suggestedAccessRules\":[{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"hnl\",\"perimeterGuid\":\"nbldxeaclgschori\",\"location\":\"rsrrmoucsofldp\"},\"resourceAssociation\":{\"name\":\"yfcaabeolhbhlvbm\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"s\",\"accessRulesVersion\":2030982059,\"accessRules\":[{\"name\":\"fbsfarfsiow\",\"properties\":{}},{\"name\":\"xnq\",\"properties\":{}},{\"name\":\"gf\",\"properties\":{}}],\"diagnosticSettingsVersion\":184966913,\"enabledLogCategories\":[\"kizmdksaoafclu\",\"v\",\"xmycjimryvwgcw\"]}},\"id\":\"bmzgwes\",\"name\":\"dsxwefoh\",\"type\":\"cbvopwndyqleallk\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.networkSecurityPerimeters() - .listConfigurations("cnpqwteht", "evrh", com.azure.core.util.Context.NONE); + .listConfigurations("tlyo", "rrrouuxvnsa", com.azure.core.util.Context.NONE); - Assertions.assertEquals("yuicdhzbdy", response.iterator().next().properties().networkSecurityPerimeter().id()); - Assertions.assertEquals(UUID.fromString("ee2613fa-7a90-4890-b9ab-a577b4370aa1"), + Assertions.assertEquals("hnl", response.iterator().next().properties().networkSecurityPerimeter().id()); + Assertions.assertEquals("nbldxeaclgschori", response.iterator().next().properties().networkSecurityPerimeter().perimeterGuid()); - Assertions.assertEquals("gbdvibidmhmwff", + Assertions.assertEquals("rsrrmoucsofldp", response.iterator().next().properties().networkSecurityPerimeter().location()); - Assertions.assertEquals("muvapc", response.iterator().next().properties().resourceAssociation().name()); - Assertions.assertEquals(ResourceAssociationAccessMode.ENFORCED, + Assertions.assertEquals("yfcaabeolhbhlvbm", + response.iterator().next().properties().resourceAssociation().name()); + Assertions.assertEquals(ResourceAssociationAccessMode.LEARNING, response.iterator().next().properties().resourceAssociation().accessMode()); - Assertions.assertEquals("vwe", response.iterator().next().properties().profile().name()); - Assertions.assertEquals(798651388, response.iterator().next().properties().profile().accessRulesVersion()); - Assertions.assertEquals("ukphaimmoiroq", + Assertions.assertEquals("s", response.iterator().next().properties().profile().name()); + Assertions.assertEquals(2030982059, response.iterator().next().properties().profile().accessRulesVersion()); + Assertions.assertEquals("fbsfarfsiow", response.iterator().next().properties().profile().accessRules().get(0).name()); - Assertions.assertEquals(1237918766, + Assertions.assertEquals(184966913, response.iterator().next().properties().profile().diagnosticSettingsVersion()); - Assertions.assertEquals("xkumasjcaac", + Assertions.assertEquals("kizmdksaoafclu", response.iterator().next().properties().profile().enabledLogCategories().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityProfileTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityProfileTests.java index 89eaba7d85bd..27998bf6aa02 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityProfileTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityProfileTests.java @@ -1,134 +1,35 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.AccessRule; import com.azure.resourcemanager.batch.models.AccessRuleDirection; -import com.azure.resourcemanager.batch.models.AccessRuleProperties; -import com.azure.resourcemanager.batch.models.AccessRulePropertiesSubscriptionsItem; -import com.azure.resourcemanager.batch.models.NetworkSecurityPerimeter; import com.azure.resourcemanager.batch.models.NetworkSecurityProfile; -import java.util.Arrays; -import java.util.UUID; import org.junit.jupiter.api.Assertions; public final class NetworkSecurityProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NetworkSecurityProfile model = BinaryData.fromString( - "{\"name\":\"gculap\",\"accessRulesVersion\":249450285,\"accessRules\":[{\"name\":\"ogtqxepnylbf\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"tlvofq\",\"hvfcibyfmow\",\"xrkjpvdw\",\"fzwiivwzjbhyz\"],\"subscriptions\":[{\"id\":\"kambtrnegvmnvuqe\"},{\"id\":\"lds\"},{\"id\":\"stjbkkdmfl\"},{\"id\":\"stmjlxrri\"}],\"networkSecurityPerimeters\":[{\"id\":\"peewchpxlkt\",\"perimeterGuid\":\"bcb2c91e-292a-4b63-9477-938df6f4b247\",\"location\":\"ziycslevufuztck\"},{\"id\":\"h\",\"perimeterGuid\":\"87e32d81-a35c-4853-9a1b-71e8ac7003d0\",\"location\":\"edcg\"},{\"id\":\"lwmmrqzzrrjv\",\"perimeterGuid\":\"c5723247-6e85-42db-8da4-b137e3a1926f\",\"location\":\"ydzgkrvqeevtoe\"}],\"fullyQualifiedDomainNames\":[\"utnwytpzdmovzvf\",\"aawzqadfl\",\"z\",\"riglaec\"],\"emailAddresses\":[\"t\",\"cokpv\",\"mlqtmldgxob\"],\"phoneNumbers\":[\"clnpkci\",\"yzriykhy\"]}},{\"name\":\"fvjlboxqvkjlmx\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"hdwdi\",\"umbnraauzzp\",\"jazysdzhezwwvaiq\",\"uvvfonkp\"],\"subscriptions\":[{\"id\":\"ikvylauya\"},{\"id\":\"uwmncs\"}],\"networkSecurityPerimeters\":[{\"id\":\"fybvpoek\",\"perimeterGuid\":\"d1c4b168-011f-4437-b393-cddef73f0fcb\",\"location\":\"sgbdhuz\"}],\"fullyQualifiedDomainNames\":[\"j\",\"gkynscliqh\",\"vhxnk\"],\"emailAddresses\":[\"kubotppnvdxz\",\"hihfrbbcevqagtlt\",\"hlfkqojpy\"],\"phoneNumbers\":[\"trdcnifmzzs\"]}},{\"name\":\"m\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"xmprafwg\"],\"subscriptions\":[{\"id\":\"cxvdfffwafqrouda\"},{\"id\":\"avehhrvkbunzo\"},{\"id\":\"dhcxgkmoy\"},{\"id\":\"dyuib\"}],\"networkSecurityPerimeters\":[{\"id\":\"nbzydvfvfcj\",\"perimeterGuid\":\"ab44e023-1da7-4bc0-ac14-77c5817c9278\",\"location\":\"oisrvhmgorffu\"}],\"fullyQualifiedDomainNames\":[\"cvwmzhwplefa\",\"vxilcbt\",\"nhnzeyqxt\"],\"emailAddresses\":[\"zqlqhyc\",\"vodggxdbee\",\"mieknlraria\"],\"phoneNumbers\":[\"uagydwqfbylyrf\",\"iagtc\",\"jocqwogfnzjvusf\",\"ld\"]}}],\"diagnosticSettingsVersion\":1956453984,\"enabledLogCategories\":[\"ylfsbtk\",\"dp\"]}") + "{\"name\":\"dhuzqgnjdgk\",\"accessRulesVersion\":1089866050,\"accessRules\":[{\"name\":\"qhzvhxnkomt\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"pnvdxz\",\"hihfrbbcevqagtlt\"],\"subscriptions\":[{\"id\":\"kqo\"},{\"id\":\"ykvgtrdcnifmz\"}],\"networkSecurityPerimeters\":[{\"id\":\"m\",\"perimeterGuid\":\"nysuxmprafwgckh\",\"location\":\"xvd\"},{\"id\":\"fwafqrouda\",\"perimeterGuid\":\"avehhrvkbunzo\",\"location\":\"dhcxgkmoy\"}],\"fullyQualifiedDomainNames\":[\"yuibhm\",\"dnbzydvfvfcjn\"],\"emailAddresses\":[\"isrvhm\",\"orffukiscv\",\"mzhwplefaxvxi\",\"cbtgnhnz\"],\"phoneNumbers\":[\"xtjjfzqlqhycav\",\"dggxdbeesmi\",\"knlrariaawiuagy\",\"wqfbylyrfgiagt\"]}},{\"name\":\"jocqwogfnzjvusf\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"uxylfsbtkadpy\",\"own\",\"tgkbugrjqctojc\",\"isofieypefojyqd\"],\"subscriptions\":[{\"id\":\"lcplc\"}],\"networkSecurityPerimeters\":[{\"id\":\"hihlhzdsqtzbs\",\"perimeterGuid\":\"nowc\",\"location\":\"fgmvecactxmwo\"},{\"id\":\"yowc\",\"perimeterGuid\":\"qovekqvgqou\",\"location\":\"fzmpjwyivq\"},{\"id\":\"f\",\"perimeterGuid\":\"vhrfsphuagrt\",\"location\":\"kteusqczk\"},{\"id\":\"klxubyja\",\"perimeterGuid\":\"mmfblcqcuubgqib\",\"location\":\"a\"}],\"fullyQualifiedDomainNames\":[\"tttwgdslqxih\",\"rmooizqse\",\"pxiutc\",\"apzhyrpetoge\"],\"emailAddresses\":[\"xslhvnhlabrqnkk\",\"jcjbt\"],\"phoneNumbers\":[\"ehvvib\",\"xjjs\",\"oqbeitpkxzt\",\"oobklftidgfcwq\"]}}],\"diagnosticSettingsVersion\":817120127,\"enabledLogCategories\":[\"qxzhem\",\"yhohujswtwkozzwc\",\"lkb\"]}") .toObject(NetworkSecurityProfile.class); - Assertions.assertEquals("gculap", model.name()); - Assertions.assertEquals(249450285, model.accessRulesVersion()); - Assertions.assertEquals("ogtqxepnylbf", model.accessRules().get(0).name()); + Assertions.assertEquals("dhuzqgnjdgk", model.name()); + Assertions.assertEquals(1089866050, model.accessRulesVersion()); + Assertions.assertEquals("qhzvhxnkomt", model.accessRules().get(0).name()); Assertions.assertEquals(AccessRuleDirection.INBOUND, model.accessRules().get(0).properties().direction()); - Assertions.assertEquals("tlvofq", model.accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("kambtrnegvmnvuqe", - model.accessRules().get(0).properties().subscriptions().get(0).id()); - Assertions.assertEquals("peewchpxlkt", - model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals(UUID.fromString("bcb2c91e-292a-4b63-9477-938df6f4b247"), + Assertions.assertEquals("pnvdxz", model.accessRules().get(0).properties().addressPrefixes().get(0)); + Assertions.assertEquals("kqo", model.accessRules().get(0).properties().subscriptions().get(0).id()); + Assertions.assertEquals("m", model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).id()); + Assertions.assertEquals("nysuxmprafwgckh", model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("ziycslevufuztck", + Assertions.assertEquals("xvd", model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("utnwytpzdmovzvf", - model.accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("t", model.accessRules().get(0).properties().emailAddresses().get(0)); - Assertions.assertEquals("clnpkci", model.accessRules().get(0).properties().phoneNumbers().get(0)); - Assertions.assertEquals(1956453984, model.diagnosticSettingsVersion()); - Assertions.assertEquals("ylfsbtk", model.enabledLogCategories().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NetworkSecurityProfile model - = new NetworkSecurityProfile().withName("gculap") - .withAccessRulesVersion(249450285) - .withAccessRules( - Arrays - .asList( - new AccessRule().withName("ogtqxepnylbf") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.INBOUND) - .withAddressPrefixes( - Arrays.asList("tlvofq", "hvfcibyfmow", "xrkjpvdw", "fzwiivwzjbhyz")) - .withSubscriptions(Arrays - .asList(new AccessRulePropertiesSubscriptionsItem().withId("kambtrnegvmnvuqe"), - new AccessRulePropertiesSubscriptionsItem().withId("lds"), - new AccessRulePropertiesSubscriptionsItem().withId("stjbkkdmfl"), - new AccessRulePropertiesSubscriptionsItem().withId("stmjlxrri"))) - .withNetworkSecurityPerimeters( - Arrays.asList( - new NetworkSecurityPerimeter().withId("peewchpxlkt") - .withPerimeterGuid( - UUID.fromString("bcb2c91e-292a-4b63-9477-938df6f4b247")) - .withLocation("ziycslevufuztck"), - new NetworkSecurityPerimeter().withId("h") - .withPerimeterGuid( - UUID.fromString("87e32d81-a35c-4853-9a1b-71e8ac7003d0")) - .withLocation("edcg"), - new NetworkSecurityPerimeter().withId("lwmmrqzzrrjv") - .withPerimeterGuid( - UUID.fromString("c5723247-6e85-42db-8da4-b137e3a1926f")) - .withLocation("ydzgkrvqeevtoe"))) - .withFullyQualifiedDomainNames( - Arrays.asList("utnwytpzdmovzvf", "aawzqadfl", "z", "riglaec")) - .withEmailAddresses(Arrays.asList("t", "cokpv", "mlqtmldgxob")) - .withPhoneNumbers(Arrays.asList("clnpkci", "yzriykhy"))), - new AccessRule().withName("fvjlboxqvkjlmx") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.OUTBOUND) - .withAddressPrefixes( - Arrays.asList("hdwdi", "umbnraauzzp", "jazysdzhezwwvaiq", "uvvfonkp")) - .withSubscriptions( - Arrays.asList(new AccessRulePropertiesSubscriptionsItem().withId("ikvylauya"), - new AccessRulePropertiesSubscriptionsItem().withId("uwmncs"))) - .withNetworkSecurityPerimeters( - Arrays.asList(new NetworkSecurityPerimeter().withId("fybvpoek") - .withPerimeterGuid(UUID.fromString("d1c4b168-011f-4437-b393-cddef73f0fcb")) - .withLocation("sgbdhuz"))) - .withFullyQualifiedDomainNames(Arrays.asList("j", "gkynscliqh", "vhxnk")) - .withEmailAddresses(Arrays.asList("kubotppnvdxz", "hihfrbbcevqagtlt", "hlfkqojpy")) - .withPhoneNumbers(Arrays.asList("trdcnifmzzs"))), - new AccessRule().withName("m") - .withProperties(new AccessRuleProperties().withDirection(AccessRuleDirection.OUTBOUND) - .withAddressPrefixes(Arrays.asList("xmprafwg")) - .withSubscriptions(Arrays.asList( - new AccessRulePropertiesSubscriptionsItem().withId("cxvdfffwafqrouda"), - new AccessRulePropertiesSubscriptionsItem().withId("avehhrvkbunzo"), - new AccessRulePropertiesSubscriptionsItem().withId("dhcxgkmoy"), - new AccessRulePropertiesSubscriptionsItem().withId("dyuib"))) - .withNetworkSecurityPerimeters( - Arrays.asList(new NetworkSecurityPerimeter().withId("nbzydvfvfcj") - .withPerimeterGuid(UUID.fromString("ab44e023-1da7-4bc0-ac14-77c5817c9278")) - .withLocation("oisrvhmgorffu"))) - .withFullyQualifiedDomainNames( - Arrays.asList("cvwmzhwplefa", "vxilcbt", "nhnzeyqxt")) - .withEmailAddresses(Arrays.asList("zqlqhyc", "vodggxdbee", "mieknlraria")) - .withPhoneNumbers( - Arrays.asList("uagydwqfbylyrf", "iagtc", "jocqwogfnzjvusf", "ld"))))) - .withDiagnosticSettingsVersion(1956453984) - .withEnabledLogCategories(Arrays.asList("ylfsbtk", "dp")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityProfile.class); - Assertions.assertEquals("gculap", model.name()); - Assertions.assertEquals(249450285, model.accessRulesVersion()); - Assertions.assertEquals("ogtqxepnylbf", model.accessRules().get(0).name()); - Assertions.assertEquals(AccessRuleDirection.INBOUND, model.accessRules().get(0).properties().direction()); - Assertions.assertEquals("tlvofq", model.accessRules().get(0).properties().addressPrefixes().get(0)); - Assertions.assertEquals("kambtrnegvmnvuqe", - model.accessRules().get(0).properties().subscriptions().get(0).id()); - Assertions.assertEquals("peewchpxlkt", - model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).id()); - Assertions.assertEquals(UUID.fromString("bcb2c91e-292a-4b63-9477-938df6f4b247"), - model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).perimeterGuid()); - Assertions.assertEquals("ziycslevufuztck", - model.accessRules().get(0).properties().networkSecurityPerimeters().get(0).location()); - Assertions.assertEquals("utnwytpzdmovzvf", - model.accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); - Assertions.assertEquals("t", model.accessRules().get(0).properties().emailAddresses().get(0)); - Assertions.assertEquals("clnpkci", model.accessRules().get(0).properties().phoneNumbers().get(0)); - Assertions.assertEquals(1956453984, model.diagnosticSettingsVersion()); - Assertions.assertEquals("ylfsbtk", model.enabledLogCategories().get(0)); + Assertions.assertEquals("yuibhm", model.accessRules().get(0).properties().fullyQualifiedDomainNames().get(0)); + Assertions.assertEquals("isrvhm", model.accessRules().get(0).properties().emailAddresses().get(0)); + Assertions.assertEquals("xtjjfzqlqhycav", model.accessRules().get(0).properties().phoneNumbers().get(0)); + Assertions.assertEquals(817120127, model.diagnosticSettingsVersion()); + Assertions.assertEquals("qxzhem", model.enabledLogCategories().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NfsMountConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NfsMountConfigurationTests.java index 727e246527ed..e1ec6f49f359 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NfsMountConfigurationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NfsMountConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,22 +12,21 @@ public final class NfsMountConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NfsMountConfiguration model = BinaryData - .fromString( - "{\"source\":\"wtl\",\"relativeMountPath\":\"nguxawqaldsy\",\"mountOptions\":\"ximerqfobwyznk\"}") + .fromString("{\"source\":\"dhszfjv\",\"relativeMountPath\":\"bgofeljag\",\"mountOptions\":\"mqhldvrii\"}") .toObject(NfsMountConfiguration.class); - Assertions.assertEquals("wtl", model.source()); - Assertions.assertEquals("nguxawqaldsy", model.relativeMountPath()); - Assertions.assertEquals("ximerqfobwyznk", model.mountOptions()); + Assertions.assertEquals("dhszfjv", model.source()); + Assertions.assertEquals("bgofeljag", model.relativeMountPath()); + Assertions.assertEquals("mqhldvrii", model.mountOptions()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NfsMountConfiguration model = new NfsMountConfiguration().withSource("wtl") - .withRelativeMountPath("nguxawqaldsy") - .withMountOptions("ximerqfobwyznk"); + NfsMountConfiguration model = new NfsMountConfiguration().withSource("dhszfjv") + .withRelativeMountPath("bgofeljag") + .withMountOptions("mqhldvrii"); model = BinaryData.fromObject(model).toObject(NfsMountConfiguration.class); - Assertions.assertEquals("wtl", model.source()); - Assertions.assertEquals("nguxawqaldsy", model.relativeMountPath()); - Assertions.assertEquals("ximerqfobwyznk", model.mountOptions()); + Assertions.assertEquals("dhszfjv", model.source()); + Assertions.assertEquals("bgofeljag", model.relativeMountPath()); + Assertions.assertEquals("mqhldvrii", model.mountOptions()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NodePlacementConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NodePlacementConfigurationTests.java index d3245fbd0c97..f99fe1163c8c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NodePlacementConfigurationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NodePlacementConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -13,15 +13,14 @@ public final class NodePlacementConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { NodePlacementConfiguration model - = BinaryData.fromString("{\"policy\":\"Regional\"}").toObject(NodePlacementConfiguration.class); - Assertions.assertEquals(NodePlacementPolicyType.REGIONAL, model.policy()); + = BinaryData.fromString("{\"policy\":\"Zonal\"}").toObject(NodePlacementConfiguration.class); + Assertions.assertEquals(NodePlacementPolicyType.ZONAL, model.policy()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - NodePlacementConfiguration model - = new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.REGIONAL); + NodePlacementConfiguration model = new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.ZONAL); model = BinaryData.fromObject(model).toObject(NodePlacementConfiguration.class); - Assertions.assertEquals(NodePlacementPolicyType.REGIONAL, model.policy()); + Assertions.assertEquals(NodePlacementPolicyType.ZONAL, model.policy()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OSDiskTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OSDiskTests.java index 87613170d2f7..d156710d4a6b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OSDiskTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OSDiskTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -8,6 +8,7 @@ import com.azure.resourcemanager.batch.models.CachingType; import com.azure.resourcemanager.batch.models.DiffDiskPlacement; import com.azure.resourcemanager.batch.models.DiffDiskSettings; +import com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters; import com.azure.resourcemanager.batch.models.ManagedDisk; import com.azure.resourcemanager.batch.models.OSDisk; import com.azure.resourcemanager.batch.models.SecurityEncryptionTypes; @@ -19,35 +20,40 @@ public final class OSDiskTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OSDisk model = BinaryData.fromString( - "{\"ephemeralOSDiskSettings\":{\"placement\":\"CacheDisk\"},\"caching\":\"None\",\"managedDisk\":{\"storageAccountType\":\"StandardSSD_LRS\",\"securityProfile\":{\"securityEncryptionType\":\"NonPersistedTPM\"}},\"diskSizeGB\":988727085,\"writeAcceleratorEnabled\":true}") + "{\"ephemeralOSDiskSettings\":{\"placement\":\"CacheDisk\"},\"caching\":\"ReadOnly\",\"managedDisk\":{\"storageAccountType\":\"Premium_LRS\",\"securityProfile\":{\"securityEncryptionType\":\"DiskWithVMGuestState\",\"diskEncryptionSet\":{\"id\":\"n\"}},\"diskEncryptionSet\":{\"id\":\"ynl\"}},\"diskSizeGB\":1494231655,\"writeAcceleratorEnabled\":false}") .toObject(OSDisk.class); Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.ephemeralOSDiskSettings().placement()); - Assertions.assertEquals(CachingType.NONE, model.caching()); - Assertions.assertEquals(StorageAccountType.STANDARD_SSD_LRS, model.managedDisk().storageAccountType()); - Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, + Assertions.assertEquals(CachingType.READ_ONLY, model.caching()); + Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.managedDisk().storageAccountType()); + Assertions.assertEquals(SecurityEncryptionTypes.DISK_WITH_VMGUEST_STATE, model.managedDisk().securityProfile().securityEncryptionType()); - Assertions.assertEquals(988727085, model.diskSizeGB()); - Assertions.assertEquals(true, model.writeAcceleratorEnabled()); + Assertions.assertEquals("n", model.managedDisk().securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("ynl", model.managedDisk().diskEncryptionSet().id()); + Assertions.assertEquals(1494231655, model.diskSizeGB()); + Assertions.assertFalse(model.writeAcceleratorEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OSDisk model - = new OSDisk() - .withEphemeralOSDiskSettings(new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK)) - .withCaching(CachingType.NONE) - .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.STANDARD_SSD_LRS) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.NON_PERSISTED_TPM))) - .withDiskSizeGB(988727085) - .withWriteAcceleratorEnabled(true); + OSDisk model = new OSDisk() + .withEphemeralOSDiskSettings(new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK)) + .withCaching(CachingType.READ_ONLY) + .withManagedDisk(new ManagedDisk().withStorageAccountType(StorageAccountType.PREMIUM_LRS) + .withSecurityProfile(new VMDiskSecurityProfile() + .withSecurityEncryptionType(SecurityEncryptionTypes.DISK_WITH_VMGUEST_STATE) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("n"))) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("ynl"))) + .withDiskSizeGB(1494231655) + .withWriteAcceleratorEnabled(false); model = BinaryData.fromObject(model).toObject(OSDisk.class); Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.ephemeralOSDiskSettings().placement()); - Assertions.assertEquals(CachingType.NONE, model.caching()); - Assertions.assertEquals(StorageAccountType.STANDARD_SSD_LRS, model.managedDisk().storageAccountType()); - Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, + Assertions.assertEquals(CachingType.READ_ONLY, model.caching()); + Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.managedDisk().storageAccountType()); + Assertions.assertEquals(SecurityEncryptionTypes.DISK_WITH_VMGUEST_STATE, model.managedDisk().securityProfile().securityEncryptionType()); - Assertions.assertEquals(988727085, model.diskSizeGB()); - Assertions.assertEquals(true, model.writeAcceleratorEnabled()); + Assertions.assertEquals("n", model.managedDisk().securityProfile().diskEncryptionSet().id()); + Assertions.assertEquals("ynl", model.managedDisk().diskEncryptionSet().id()); + Assertions.assertEquals(1494231655, model.diskSizeGB()); + Assertions.assertFalse(model.writeAcceleratorEnabled()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationDisplayTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationDisplayTests.java index ed51723af8bc..679385f52756 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationDisplayTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationDisplayTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,25 +11,13 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"ixhbkuofqweykhm\",\"operation\":\"evfyexfwhybcib\",\"resource\":\"vdcsitynn\",\"description\":\"mdectehfiqscjey\"}") + OperationDisplay model = BinaryData + .fromString( + "{\"provider\":\"fcyzkohdbihanufh\",\"operation\":\"bj\",\"resource\":\"a\",\"description\":\"th\"}") .toObject(OperationDisplay.class); - Assertions.assertEquals("ixhbkuofqweykhm", model.provider()); - Assertions.assertEquals("evfyexfwhybcib", model.operation()); - Assertions.assertEquals("vdcsitynn", model.resource()); - Assertions.assertEquals("mdectehfiqscjey", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("ixhbkuofqweykhm") - .withOperation("evfyexfwhybcib") - .withResource("vdcsitynn") - .withDescription("mdectehfiqscjey"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("ixhbkuofqweykhm", model.provider()); - Assertions.assertEquals("evfyexfwhybcib", model.operation()); - Assertions.assertEquals("vdcsitynn", model.resource()); - Assertions.assertEquals("mdectehfiqscjey", model.description()); + Assertions.assertEquals("fcyzkohdbihanufh", model.provider()); + Assertions.assertEquals("bj", model.operation()); + Assertions.assertEquals("a", model.resource()); + Assertions.assertEquals("th", model.description()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationInnerTests.java index 242b78d87d24..58e59dfef10b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationInnerTests.java @@ -1,46 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.fluent.models.OperationInner; -import com.azure.resourcemanager.batch.models.OperationDisplay; import org.junit.jupiter.api.Assertions; public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"pusuesn\",\"isDataAction\":false,\"display\":{\"provider\":\"bavo\",\"operation\":\"zdmohctbqvu\",\"resource\":\"xdn\",\"description\":\"vo\"},\"origin\":\"ujjugwdkcglh\",\"properties\":\"dataazjdyggd\"}") + "{\"name\":\"kuksjtxukcdm\",\"isDataAction\":true,\"display\":{\"provider\":\"y\",\"operation\":\"nzwuxzd\",\"resource\":\"a\",\"description\":\"lhmwhfpmrqobm\"},\"origin\":\"kknryrtihf\",\"properties\":\"\\\"dataijbpzvgnwzsymgl\\\"\"}") .toObject(OperationInner.class); - Assertions.assertEquals("pusuesn", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("bavo", model.display().provider()); - Assertions.assertEquals("zdmohctbqvu", model.display().operation()); - Assertions.assertEquals("xdn", model.display().resource()); - Assertions.assertEquals("vo", model.display().description()); - Assertions.assertEquals("ujjugwdkcglh", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = new OperationInner().withName("pusuesn") - .withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("bavo") - .withOperation("zdmohctbqvu") - .withResource("xdn") - .withDescription("vo")) - .withOrigin("ujjugwdkcglh") - .withProperties("dataazjdyggd"); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("pusuesn", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("bavo", model.display().provider()); - Assertions.assertEquals("zdmohctbqvu", model.display().operation()); - Assertions.assertEquals("xdn", model.display().resource()); - Assertions.assertEquals("vo", model.display().description()); - Assertions.assertEquals("ujjugwdkcglh", model.origin()); + Assertions.assertEquals("kuksjtxukcdm", model.name()); + Assertions.assertTrue(model.isDataAction()); + Assertions.assertEquals("y", model.display().provider()); + Assertions.assertEquals("nzwuxzd", model.display().operation()); + Assertions.assertEquals("a", model.display().resource()); + Assertions.assertEquals("lhmwhfpmrqobm", model.display().description()); + Assertions.assertEquals("kknryrtihf", model.origin()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationListResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationListResultTests.java index c9e7e72fcfd2..e094ed7e6738 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationListResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationListResultTests.java @@ -1,51 +1,26 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.OperationInner; -import com.azure.resourcemanager.batch.models.OperationDisplay; -import com.azure.resourcemanager.batch.models.OperationListResult; -import java.util.Arrays; +import com.azure.resourcemanager.batch.implementation.models.OperationListResult; import org.junit.jupiter.api.Assertions; public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"okeyyienj\",\"isDataAction\":true,\"display\":{\"provider\":\"grhpdjpju\",\"operation\":\"sxazjpq\",\"resource\":\"gual\",\"description\":\"xxhejjzzvd\"},\"origin\":\"gwdslfhotwm\",\"properties\":\"datanpwlbjnpg\"}],\"nextLink\":\"ftadehxnltyfs\"}") + "{\"value\":[{\"name\":\"hq\",\"isDataAction\":true,\"display\":{\"provider\":\"pybczmehmtzopb\",\"operation\":\"h\",\"resource\":\"pidgsybbejhphoyc\",\"description\":\"xaobhdxbmtqioqjz\"},\"origin\":\"tbmufpo\",\"properties\":\"\\\"dataoizh\\\"\"},{\"name\":\"rxybqsoq\",\"isDataAction\":false,\"display\":{\"provider\":\"mbpazlobcufpdzn\",\"operation\":\"t\",\"resource\":\"qjnqglhqgnufoooj\",\"description\":\"ifsqesaagdfmg\"},\"origin\":\"lhjxr\",\"properties\":\"\\\"datakwm\\\"\"},{\"name\":\"ktsizntocipaou\",\"isDataAction\":true,\"display\":{\"provider\":\"ucmpoyfd\",\"operation\":\"ogknygjofjdd\",\"resource\":\"s\",\"description\":\"eupewnwreitjz\"},\"origin\":\"lusarh\",\"properties\":\"\\\"datafcqhsmyurkd\\\"\"}],\"nextLink\":\"lx\"}") .toObject(OperationListResult.class); - Assertions.assertEquals("okeyyienj", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("grhpdjpju", model.value().get(0).display().provider()); - Assertions.assertEquals("sxazjpq", model.value().get(0).display().operation()); - Assertions.assertEquals("gual", model.value().get(0).display().resource()); - Assertions.assertEquals("xxhejjzzvd", model.value().get(0).display().description()); - Assertions.assertEquals("gwdslfhotwm", model.value().get(0).origin()); - Assertions.assertEquals("ftadehxnltyfs", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model - = new OperationListResult().withValue(Arrays.asList(new OperationInner().withName("okeyyienj") - .withIsDataAction(true) - .withDisplay(new OperationDisplay().withProvider("grhpdjpju") - .withOperation("sxazjpq") - .withResource("gual") - .withDescription("xxhejjzzvd")) - .withOrigin("gwdslfhotwm") - .withProperties("datanpwlbjnpg"))).withNextLink("ftadehxnltyfs"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("okeyyienj", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("grhpdjpju", model.value().get(0).display().provider()); - Assertions.assertEquals("sxazjpq", model.value().get(0).display().operation()); - Assertions.assertEquals("gual", model.value().get(0).display().resource()); - Assertions.assertEquals("xxhejjzzvd", model.value().get(0).display().description()); - Assertions.assertEquals("gwdslfhotwm", model.value().get(0).origin()); - Assertions.assertEquals("ftadehxnltyfs", model.nextLink()); + Assertions.assertEquals("hq", model.value().get(0).name()); + Assertions.assertTrue(model.value().get(0).isDataAction()); + Assertions.assertEquals("pybczmehmtzopb", model.value().get(0).display().provider()); + Assertions.assertEquals("h", model.value().get(0).display().operation()); + Assertions.assertEquals("pidgsybbejhphoyc", model.value().get(0).display().resource()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().description()); + Assertions.assertEquals("tbmufpo", model.value().get(0).origin()); + Assertions.assertEquals("lx", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationsListMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationsListMockTests.java index f01fc73770f4..465479ac55a8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationsListMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.Operation; @@ -22,23 +22,23 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"vpbdbzqgq\",\"isDataAction\":true,\"display\":{\"provider\":\"svqwthmkyibc\",\"operation\":\"ihsgq\",\"resource\":\"dhohsdtmcdzsuf\",\"description\":\"hdxbzlm\"},\"origin\":\"uapcvhdbevwqqxe\",\"properties\":\"datako\"}]}"; + = "{\"value\":[{\"name\":\"hk\",\"isDataAction\":true,\"display\":{\"provider\":\"qnsdfzpbgtgky\",\"operation\":\"dgh\",\"resource\":\"euutlwxezwzh\",\"description\":\"vbwnhhtq\"},\"origin\":\"ehgpp\",\"properties\":\"\\\"dataifhpf\\\"\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("vpbdbzqgq", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("svqwthmkyibc", response.iterator().next().display().provider()); - Assertions.assertEquals("ihsgq", response.iterator().next().display().operation()); - Assertions.assertEquals("dhohsdtmcdzsuf", response.iterator().next().display().resource()); - Assertions.assertEquals("hdxbzlm", response.iterator().next().display().description()); - Assertions.assertEquals("uapcvhdbevwqqxe", response.iterator().next().origin()); + Assertions.assertEquals("hk", response.iterator().next().name()); + Assertions.assertTrue(response.iterator().next().isDataAction()); + Assertions.assertEquals("qnsdfzpbgtgky", response.iterator().next().display().provider()); + Assertions.assertEquals("dgh", response.iterator().next().display().operation()); + Assertions.assertEquals("euutlwxezwzh", response.iterator().next().display().resource()); + Assertions.assertEquals("vbwnhhtq", response.iterator().next().display().description()); + Assertions.assertEquals("ehgpp", response.iterator().next().origin()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointCollectionTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointCollectionTests.java index fde55400cefd..f98277d7bc2a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointCollectionTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointCollectionTests.java @@ -1,27 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.batch.implementation.models.OutboundEnvironmentEndpointCollection; import org.junit.jupiter.api.Assertions; public final class OutboundEnvironmentEndpointCollectionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundEnvironmentEndpointCollection model = BinaryData.fromString( - "{\"value\":[{\"category\":\"wuggwolu\",\"endpoints\":[{\"domainName\":\"wem\",\"description\":\"i\",\"endpointDetails\":[{}]},{\"domainName\":\"gzd\",\"description\":\"swe\",\"endpointDetails\":[{},{},{}]}]},{\"category\":\"dxggicccnxqhuexm\",\"endpoints\":[{\"domainName\":\"stvlzywemhzrnc\",\"description\":\"tclusiypbsfgy\",\"endpointDetails\":[{},{}]},{\"domainName\":\"lfeadcygq\",\"description\":\"yhejhzisxgfp\",\"endpointDetails\":[{},{},{},{}]},{\"domainName\":\"p\",\"description\":\"ksrpqv\",\"endpointDetails\":[{},{}]}]},{\"category\":\"aehtwd\",\"endpoints\":[{\"domainName\":\"swibyr\",\"description\":\"l\",\"endpointDetails\":[{},{},{},{}]},{\"domainName\":\"fwpracstwi\",\"description\":\"khevxccedc\",\"endpointDetails\":[{}]},{\"domainName\":\"yodnwzxltj\",\"description\":\"nhltiugcxn\",\"endpointDetails\":[{},{},{}]},{\"domainName\":\"xqi\",\"description\":\"qunyowxwlmdjr\",\"endpointDetails\":[{},{},{}]}]}],\"nextLink\":\"bvfvpdbod\"}") + "{\"value\":[{\"category\":\"hzzvypyq\",\"endpoints\":[{\"domainName\":\"inpvswjdkirsoodq\",\"description\":\"crmnohjtckwhds\",\"endpointDetails\":[{},{},{},{}]},{\"domainName\":\"yip\",\"description\":\"sqwpgrjb\",\"endpointDetails\":[{},{},{}]},{\"domainName\":\"cjxvsnbyxqab\",\"description\":\"ocpcy\",\"endpointDetails\":[{},{}]}]}],\"nextLink\":\"zafb\"}") .toObject(OutboundEnvironmentEndpointCollection.class); - Assertions.assertEquals("bvfvpdbod", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundEnvironmentEndpointCollection model - = new OutboundEnvironmentEndpointCollection().withNextLink("bvfvpdbod"); - model = BinaryData.fromObject(model).toObject(OutboundEnvironmentEndpointCollection.class); - Assertions.assertEquals("bvfvpdbod", model.nextLink()); + Assertions.assertEquals("zafb", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointInnerTests.java index a3b7b2da7389..6d2d2e68762b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,13 +11,7 @@ public final class OutboundEnvironmentEndpointInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutboundEnvironmentEndpointInner model = BinaryData.fromString( - "{\"category\":\"izsjqlhkrr\",\"endpoints\":[{\"domainName\":\"ibqipqkg\",\"description\":\"xndzwm\",\"endpointDetails\":[{\"port\":1155749150},{\"port\":754811246}]},{\"domainName\":\"orwkqnyh\",\"description\":\"ij\",\"endpointDetails\":[{\"port\":1117462910},{\"port\":394204922},{\"port\":1033603649},{\"port\":1988757032}]}]}") + "{\"category\":\"j\",\"endpoints\":[{\"domainName\":\"oq\",\"description\":\"mkljavb\",\"endpointDetails\":[{\"port\":1383996759},{\"port\":1759677036},{\"port\":352301275},{\"port\":234614005}]},{\"domainName\":\"kudjkrlkhb\",\"description\":\"fepgzgq\",\"endpointDetails\":[{\"port\":1678385538}]},{\"domainName\":\"xscpaierhhbc\",\"description\":\"l\",\"endpointDetails\":[{\"port\":1786606148},{\"port\":177005491}]},{\"domainName\":\"odxobnbdxkqpxok\",\"description\":\"ionpimexg\",\"endpointDetails\":[{\"port\":373468277}]}]}") .toObject(OutboundEnvironmentEndpointInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutboundEnvironmentEndpointInner model = new OutboundEnvironmentEndpointInner(); - model = BinaryData.fromObject(model).toObject(OutboundEnvironmentEndpointInner.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolEndpointConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolEndpointConfigurationTests.java index 9985024512f9..97fbab9c2ee6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolEndpointConfigurationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolEndpointConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -17,84 +17,105 @@ public final class PoolEndpointConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PoolEndpointConfiguration model = BinaryData.fromString( - "{\"inboundNatPools\":[{\"name\":\"lqiyntorzihl\",\"protocol\":\"TCP\",\"backendPort\":2125342416,\"frontendPortRangeStart\":410536008,\"frontendPortRangeEnd\":1517246970,\"networkSecurityGroupRules\":[{\"priority\":2014449644,\"access\":\"Deny\",\"sourceAddressPrefix\":\"slyzrpzbchckqq\",\"sourcePortRanges\":[\"ox\",\"ysuiizynkedya\",\"rwyhqmibzyhwitsm\"]},{\"priority\":720588541,\"access\":\"Deny\",\"sourceAddressPrefix\":\"ynpcdpumnzgmwznm\",\"sourcePortRanges\":[\"knso\",\"gj\",\"xbldtlwwrlkdmtn\"]}]},{\"name\":\"vokotllxdyh\",\"protocol\":\"UDP\",\"backendPort\":36323388,\"frontendPortRangeStart\":1161349380,\"frontendPortRangeEnd\":427983093,\"networkSecurityGroupRules\":[{\"priority\":641169008,\"access\":\"Deny\",\"sourceAddressPrefix\":\"tdtbnnhadooc\",\"sourcePortRanges\":[\"cikhnv\",\"amqgxqquezikyw\",\"gxk\",\"lla\"]},{\"priority\":825727567,\"access\":\"Allow\",\"sourceAddressPrefix\":\"lwuip\",\"sourcePortRanges\":[\"jzkzi\",\"gvvcnayrhyr\",\"xxmueedn\",\"rdvstkwqqtch\"]},{\"priority\":646701908,\"access\":\"Deny\",\"sourceAddressPrefix\":\"mfmtdaaygdvw\",\"sourcePortRanges\":[\"iohgwxrtfud\",\"epxgyqagvr\",\"mnpkukghimdblxg\"]},{\"priority\":261614569,\"access\":\"Allow\",\"sourceAddressPrefix\":\"fnjhfjxwmszkkfo\",\"sourcePortRanges\":[\"yfkzik\",\"jawneaiv\",\"wczelpci\"]}]},{\"name\":\"elsfeaen\",\"protocol\":\"TCP\",\"backendPort\":1417911120,\"frontendPortRangeStart\":1449386799,\"frontendPortRangeEnd\":1448389214,\"networkSecurityGroupRules\":[{\"priority\":463401012,\"access\":\"Deny\",\"sourceAddressPrefix\":\"dxbjhwuaanozj\",\"sourcePortRanges\":[\"hyoulpjr\"]}]}]}") + "{\"inboundNatPools\":[{\"name\":\"fatpxllrxcyjmoa\",\"protocol\":\"TCP\",\"backendPort\":1120671201,\"frontendPortRangeStart\":59301648,\"frontendPortRangeEnd\":715950498,\"networkSecurityGroupRules\":[{\"priority\":726484461,\"access\":\"Deny\",\"sourceAddressPrefix\":\"dmjsjqb\",\"sourcePortRanges\":[\"yxxrwlycoduh\",\"kxkgymareqna\",\"xqugjhkycubedd\",\"ssofwqmzqa\"]}]},{\"name\":\"krmnjijpxacqqud\",\"protocol\":\"UDP\",\"backendPort\":402319478,\"frontendPortRangeStart\":1238431927,\"frontendPortRangeEnd\":217779301,\"networkSecurityGroupRules\":[{\"priority\":1365725065,\"access\":\"Allow\",\"sourceAddressPrefix\":\"bjyvay\",\"sourcePortRanges\":[\"m\",\"zrtuzq\",\"gsexne\"]},{\"priority\":850324011,\"access\":\"Allow\",\"sourceAddressPrefix\":\"nwnwme\",\"sourcePortRanges\":[\"yyceuzsoi\",\"judpfrxt\",\"thzvaytdwkqbrqu\",\"paxh\"]},{\"priority\":1398139013,\"access\":\"Deny\",\"sourceAddressPrefix\":\"i\",\"sourcePortRanges\":[\"pdtii\",\"q\",\"d\",\"oaxoruzfgsqu\"]}]},{\"name\":\"fxrxxle\",\"protocol\":\"TCP\",\"backendPort\":971666711,\"frontendPortRangeStart\":137172163,\"frontendPortRangeEnd\":1899778245,\"networkSecurityGroupRules\":[{\"priority\":767638110,\"access\":\"Allow\",\"sourceAddressPrefix\":\"wlwnwxuqlcv\",\"sourcePortRanges\":[\"patdooaojkniodko\",\"ebwnujhe\",\"msbvdkcrodtjinf\",\"jlfltkacjvefkdlf\"]},{\"priority\":24291544,\"access\":\"Allow\",\"sourceAddressPrefix\":\"ggkfpagaowpul\",\"sourcePortRanges\":[\"lyls\",\"xkqjnsjervt\",\"agxsdszuemps\",\"zkfzbeyv\"]}]},{\"name\":\"nqicvinvkjjxdxrb\",\"protocol\":\"UDP\",\"backendPort\":2049841705,\"frontendPortRangeStart\":372795901,\"frontendPortRangeEnd\":1867961627,\"networkSecurityGroupRules\":[{\"priority\":1398026456,\"access\":\"Deny\",\"sourceAddressPrefix\":\"hmlwpaztzpo\",\"sourcePortRanges\":[\"ckw\",\"fz\",\"whxxbuyqax\",\"feqztppriol\"]},{\"priority\":411799174,\"access\":\"Deny\",\"sourceAddressPrefix\":\"jaltolmnc\",\"sourcePortRanges\":[\"bqwcsdbnwdcf\",\"ucqdpfuvglsb\",\"jcanvxbvtvudut\",\"cormr\"]}]}]}") .toObject(PoolEndpointConfiguration.class); - Assertions.assertEquals("lqiyntorzihl", model.inboundNatPools().get(0).name()); + Assertions.assertEquals("fatpxllrxcyjmoa", model.inboundNatPools().get(0).name()); Assertions.assertEquals(InboundEndpointProtocol.TCP, model.inboundNatPools().get(0).protocol()); - Assertions.assertEquals(2125342416, model.inboundNatPools().get(0).backendPort()); - Assertions.assertEquals(410536008, model.inboundNatPools().get(0).frontendPortRangeStart()); - Assertions.assertEquals(1517246970, model.inboundNatPools().get(0).frontendPortRangeEnd()); - Assertions.assertEquals(2014449644, + Assertions.assertEquals(1120671201, model.inboundNatPools().get(0).backendPort()); + Assertions.assertEquals(59301648, model.inboundNatPools().get(0).frontendPortRangeStart()); + Assertions.assertEquals(715950498, model.inboundNatPools().get(0).frontendPortRangeEnd()); + Assertions.assertEquals(726484461, model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).priority()); Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("slyzrpzbchckqq", + Assertions.assertEquals("dmjsjqb", model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).sourceAddressPrefix()); - Assertions.assertEquals("ox", + Assertions.assertEquals("yxxrwlycoduh", model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).sourcePortRanges().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - PoolEndpointConfiguration model = new PoolEndpointConfiguration().withInboundNatPools(Arrays.asList( - new InboundNatPool().withName("lqiyntorzihl") - .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(2125342416) - .withFrontendPortRangeStart(410536008) - .withFrontendPortRangeEnd(1517246970) - .withNetworkSecurityGroupRules(Arrays.asList( - new NetworkSecurityGroupRule().withPriority(2014449644) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("slyzrpzbchckqq") - .withSourcePortRanges(Arrays.asList("ox", "ysuiizynkedya", "rwyhqmibzyhwitsm")), - new NetworkSecurityGroupRule().withPriority(720588541) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("ynpcdpumnzgmwznm") - .withSourcePortRanges(Arrays.asList("knso", "gj", "xbldtlwwrlkdmtn")))), - new InboundNatPool().withName("vokotllxdyh") - .withProtocol(InboundEndpointProtocol.UDP) - .withBackendPort(36323388) - .withFrontendPortRangeStart(1161349380) - .withFrontendPortRangeEnd(427983093) - .withNetworkSecurityGroupRules(Arrays.asList( - new NetworkSecurityGroupRule().withPriority(641169008) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("tdtbnnhadooc") - .withSourcePortRanges(Arrays.asList("cikhnv", "amqgxqquezikyw", "gxk", "lla")), - new NetworkSecurityGroupRule().withPriority(825727567) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("lwuip") - .withSourcePortRanges(Arrays.asList("jzkzi", "gvvcnayrhyr", "xxmueedn", "rdvstkwqqtch")), - new NetworkSecurityGroupRule().withPriority(646701908) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("mfmtdaaygdvw") - .withSourcePortRanges(Arrays.asList("iohgwxrtfud", "epxgyqagvr", "mnpkukghimdblxg")), - new NetworkSecurityGroupRule().withPriority(261614569) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("fnjhfjxwmszkkfo") - .withSourcePortRanges(Arrays.asList("yfkzik", "jawneaiv", "wczelpci")))), - new InboundNatPool().withName("elsfeaen") - .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(1417911120) - .withFrontendPortRangeStart(1449386799) - .withFrontendPortRangeEnd(1448389214) - .withNetworkSecurityGroupRules(Arrays.asList(new NetworkSecurityGroupRule().withPriority(463401012) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("dxbjhwuaanozj") - .withSourcePortRanges(Arrays.asList("hyoulpjr")))))); + PoolEndpointConfiguration model + = new PoolEndpointConfiguration() + .withInboundNatPools( + Arrays + .asList( + new InboundNatPool().withName("fatpxllrxcyjmoa") + .withProtocol(InboundEndpointProtocol.TCP) + .withBackendPort(1120671201) + .withFrontendPortRangeStart(59301648) + .withFrontendPortRangeEnd(715950498) + .withNetworkSecurityGroupRules( + Arrays.asList(new NetworkSecurityGroupRule().withPriority(726484461) + .withAccess(NetworkSecurityGroupRuleAccess.DENY) + .withSourceAddressPrefix("dmjsjqb") + .withSourcePortRanges(Arrays.asList("yxxrwlycoduh", "kxkgymareqna", + "xqugjhkycubedd", "ssofwqmzqa")))), + new InboundNatPool().withName("krmnjijpxacqqud") + .withProtocol(InboundEndpointProtocol.UDP) + .withBackendPort(402319478) + .withFrontendPortRangeStart(1238431927) + .withFrontendPortRangeEnd(217779301) + .withNetworkSecurityGroupRules(Arrays.asList( + new NetworkSecurityGroupRule().withPriority(1365725065) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("bjyvay") + .withSourcePortRanges(Arrays.asList("m", "zrtuzq", "gsexne")), + new NetworkSecurityGroupRule().withPriority(850324011) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("nwnwme") + .withSourcePortRanges( + Arrays.asList("yyceuzsoi", "judpfrxt", "thzvaytdwkqbrqu", "paxh")), + new NetworkSecurityGroupRule().withPriority(1398139013) + .withAccess(NetworkSecurityGroupRuleAccess.DENY) + .withSourceAddressPrefix("i") + .withSourcePortRanges(Arrays.asList("pdtii", "q", "d", "oaxoruzfgsqu")))), + new InboundNatPool().withName("fxrxxle") + .withProtocol(InboundEndpointProtocol.TCP) + .withBackendPort(971666711) + .withFrontendPortRangeStart(137172163) + .withFrontendPortRangeEnd(1899778245) + .withNetworkSecurityGroupRules( + Arrays.asList( + new NetworkSecurityGroupRule().withPriority(767638110) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("wlwnwxuqlcv") + .withSourcePortRanges(Arrays.asList("patdooaojkniodko", "ebwnujhe", + "msbvdkcrodtjinf", "jlfltkacjvefkdlf")), + new NetworkSecurityGroupRule().withPriority(24291544) + .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) + .withSourceAddressPrefix("ggkfpagaowpul") + .withSourcePortRanges( + Arrays.asList("lyls", "xkqjnsjervt", "agxsdszuemps", "zkfzbeyv")))), + new InboundNatPool().withName("nqicvinvkjjxdxrb") + .withProtocol(InboundEndpointProtocol.UDP) + .withBackendPort(2049841705) + .withFrontendPortRangeStart(372795901) + .withFrontendPortRangeEnd(1867961627) + .withNetworkSecurityGroupRules(Arrays.asList( + new NetworkSecurityGroupRule().withPriority(1398026456) + .withAccess(NetworkSecurityGroupRuleAccess.DENY) + .withSourceAddressPrefix("hmlwpaztzpo") + .withSourcePortRanges(Arrays.asList("ckw", "fz", "whxxbuyqax", "feqztppriol")), + new NetworkSecurityGroupRule().withPriority(411799174) + .withAccess(NetworkSecurityGroupRuleAccess.DENY) + .withSourceAddressPrefix("jaltolmnc") + .withSourcePortRanges(Arrays.asList("bqwcsdbnwdcf", "ucqdpfuvglsb", + "jcanvxbvtvudut", "cormr")))))); model = BinaryData.fromObject(model).toObject(PoolEndpointConfiguration.class); - Assertions.assertEquals("lqiyntorzihl", model.inboundNatPools().get(0).name()); + Assertions.assertEquals("fatpxllrxcyjmoa", model.inboundNatPools().get(0).name()); Assertions.assertEquals(InboundEndpointProtocol.TCP, model.inboundNatPools().get(0).protocol()); - Assertions.assertEquals(2125342416, model.inboundNatPools().get(0).backendPort()); - Assertions.assertEquals(410536008, model.inboundNatPools().get(0).frontendPortRangeStart()); - Assertions.assertEquals(1517246970, model.inboundNatPools().get(0).frontendPortRangeEnd()); - Assertions.assertEquals(2014449644, + Assertions.assertEquals(1120671201, model.inboundNatPools().get(0).backendPort()); + Assertions.assertEquals(59301648, model.inboundNatPools().get(0).frontendPortRangeStart()); + Assertions.assertEquals(715950498, model.inboundNatPools().get(0).frontendPortRangeEnd()); + Assertions.assertEquals(726484461, model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).priority()); Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("slyzrpzbchckqq", + Assertions.assertEquals("dmjsjqb", model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).sourceAddressPrefix()); - Assertions.assertEquals("ox", + Assertions.assertEquals("yxxrwlycoduh", model.inboundNatPools().get(0).networkSecurityGroupRules().get(0).sourcePortRanges().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDeleteMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDeleteMockTests.java index b81a2c8b7e22..3212cf056c73 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDeleteMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDeleteMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDelete() throws Exception { BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.pools().delete("njhvsujztc", "ytqj", "w", com.azure.core.util.Context.NONE); + manager.pools().delete("g", "wpktvqylkmqpzoyh", "fbcgwgcloxoebqin", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionInnerTests.java index 2e94fada5569..2d75cf53127c 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -16,27 +16,27 @@ public final class PrivateEndpointConnectionInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"fdatsc\"},\"groupIds\":[\"pjhulsuuvmkj\",\"zkrwfn\",\"iodjp\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"jdpvwryo\",\"actionsRequired\":\"soacctazakl\"}},\"etag\":\"ahbc\",\"tags\":{\"jakhmsbzjh\":\"fdfdosygexpa\",\"hqtrgqjbpf\":\"rzevdphlxaol\",\"tfell\":\"fsinzgvfcjrwzoxx\",\"lxofpdvhpfxxypin\":\"wfzitonpeqfpjk\"},\"id\":\"nmayhuybb\",\"name\":\"podepoo\",\"type\":\"inuvamiheogn\"}") + "{\"properties\":{\"provisioningState\":\"Cancelled\",\"privateEndpoint\":{\"id\":\"akhmsbzjhcrz\"},\"groupIds\":[\"phlxa\",\"lthqtrgqjbp\",\"zfsinzgvf\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"zoxxjtf\",\"actionsRequired\":\"luwfzitonpeqfpjk\"}},\"etag\":\"xofpdvhpfxxypi\",\"tags\":{\"inuvamiheogn\":\"mayhuybbkpodepoo\",\"usivye\":\"rxzxtheo\",\"nfygxgispemvtz\":\"cciqihnhungbwjz\"},\"id\":\"ufubl\",\"name\":\"ofx\",\"type\":\"eofjaeqjh\"}") .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, + Assertions.assertEquals("mayhuybbkpodepoo", model.tags().get("inuvamiheogn")); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jdpvwryo", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("zoxxjtf", model.privateLinkServiceConnectionState().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionInner model = new PrivateEndpointConnectionInner() - .withTags(mapOf("jakhmsbzjh", "fdfdosygexpa", "hqtrgqjbpf", "rzevdphlxaol", "tfell", "fsinzgvfcjrwzoxx", - "lxofpdvhpfxxypin", "wfzitonpeqfpjk")) + .withTags( + mapOf("inuvamiheogn", "mayhuybbkpodepoo", "usivye", "rxzxtheo", "nfygxgispemvtz", "cciqihnhungbwjz")) .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("jdpvwryo")); + new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) + .withDescription("zoxxjtf")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("fdfdosygexpa", model.tags().get("jakhmsbzjh")); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, + Assertions.assertEquals("mayhuybbkpodepoo", model.tags().get("inuvamiheogn")); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jdpvwryo", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("zoxxjtf", model.privateLinkServiceConnectionState().description()); } // Use "Map.of" if available diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionPropertiesTests.java index c00975b54f17..2335401409f2 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionPropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -14,22 +14,22 @@ public final class PrivateEndpointConnectionPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateEndpointConnectionProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Cancelled\",\"privateEndpoint\":{\"id\":\"theotusiv\"},\"groupIds\":[\"cciqihnhungbwjz\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"gxg\",\"actionsRequired\":\"pemvtzfkufubljof\"}}") + "{\"provisioningState\":\"Cancelled\",\"privateEndpoint\":{\"id\":\"v\"},\"groupIds\":[\"jqul\",\"gsntnbybkzgcwr\",\"clxxwrljdo\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"qvkoc\",\"actionsRequired\":\"jdkwtnhxbnjb\"}}") .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gxg", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("qvkoc", model.privateLinkServiceConnectionState().description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateEndpointConnectionProperties model = new PrivateEndpointConnectionProperties().withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("gxg")); + new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.REJECTED) + .withDescription("qvkoc")); model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.REJECTED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("gxg", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("qvkoc", model.privateLinkServiceConnectionState().description()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java index 5d559c9b85af..26c4e99f36fa 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.PrivateEndpointConnection; @@ -22,22 +22,22 @@ public final class PrivateEndpointConnectionsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"cunezzcezelfw\"},\"groupIds\":[\"lwxjwetn\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"clafzvaylpt\",\"actionsRequired\":\"qqwzt\"}},\"etag\":\"w\",\"tags\":{\"exfdeqvhpsylk\":\"hcxwaxfewzjk\",\"ffmbmxzjrg\":\"shk\",\"jx\":\"wwp\"},\"id\":\"nptfujgi\",\"name\":\"gaao\",\"type\":\"pttaqutd\"}"; + = "{\"properties\":{\"provisioningState\":\"Cancelled\",\"privateEndpoint\":{\"id\":\"vefloccsrmozihmi\"},\"groupIds\":[\"wtxxpkyjcx\",\"jxgrytfmp\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"lrmcaykg\",\"actionsRequired\":\"oxuztrksx\"}},\"etag\":\"ndfcpfn\",\"tags\":{\"zvoamktc\":\"hjtwkjaosrx\",\"tlt\":\"iosmgbzahgxqdly\"},\"id\":\"prltzkatbhjmz\",\"name\":\"nbsoqeqalarv\",\"type\":\"agunbtgfebw\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .getWithResponse("nktwfansnvpdibmi", "ostbzbkiwb", "qnyophzfyls", com.azure.core.util.Context.NONE) + .getWithResponse("hflzokxco", "pelnjetag", "tsxoatftgz", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("hcxwaxfewzjk", response.tags().get("exfdeqvhpsylk")); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, + Assertions.assertEquals("hjtwkjaosrx", response.tags().get("zvoamktc")); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("clafzvaylpt", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("lrmcaykg", response.privateLinkServiceConnectionState().description()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsListByBatchAccountMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsListByBatchAccountMockTests.java index 73170e401b57..01e0ad047dae 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsListByBatchAccountMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsListByBatchAccountMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.PrivateEndpointConnection; @@ -23,21 +23,22 @@ public final class PrivateEndpointConnectionsListByBatchAccountMockTests { @Test public void testListByBatchAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"privateEndpoint\":{\"id\":\"htmwwinh\"},\"groupIds\":[\"qpofvwbc\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"b\",\"actionsRequired\":\"bwvqvxkdi\"}},\"etag\":\"ihebwtsw\",\"tags\":{\"izvcjfe\":\"wfmdurage\",\"ggbqi\":\"isdju\",\"m\":\"kxkbsazgakgacyr\",\"pv\":\"dmspof\"},\"id\":\"hryl\",\"name\":\"iofrzgbzjedmstk\",\"type\":\"nlvxbcuii\"}]}"; + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"xl\"},\"groupIds\":[\"glqivbgkcv\",\"hpzvuqdflvoniyp\",\"pubcpzgpxtivhjk\",\"idibgqjxgpn\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"vfgpikqmhhaowjrm\",\"actionsRequired\":\"uporqzdfu\"}},\"etag\":\"zvkfv\",\"tags\":{\"swokm\":\"qmxq\"},\"id\":\"hl\",\"name\":\"gdhbe\",\"type\":\"zqkzszuwi\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.privateEndpointConnections() - .listByBatchAccount("xfyqonmpqoxwdo", "dbxiqx", 1307662729, com.azure.core.util.Context.NONE); + .listByBatchAccount("pyogtieyuj", "vczkcnyxrxmunjd", 477045914, com.azure.core.util.Context.NONE); - Assertions.assertEquals("wfmdurage", response.iterator().next().tags().get("izvcjfe")); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.PENDING, + Assertions.assertEquals("qmxq", response.iterator().next().tags().get("swokm")); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("b", response.iterator().next().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("vfgpikqmhhaowjrm", + response.iterator().next().privateLinkServiceConnectionState().description()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsUpdateMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsUpdateMockTests.java index 50e439960ec9..de7830105db6 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsUpdateMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsUpdateMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; @@ -26,28 +26,29 @@ public final class PrivateEndpointConnectionsUpdateMockTests { @Test public void testUpdate() throws Exception { String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"vumwmxqh\"},\"groupIds\":[\"noamldsehaohdj\",\"hflzokxco\",\"pelnjetag\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"oatftgzpnpbswvef\",\"actionsRequired\":\"ccsrmozihmipgaw\"}},\"etag\":\"xp\",\"tags\":{\"fmpcycilrmca\":\"cxcjxgry\",\"t\":\"kggnoxu\",\"cpfnznthjtwkja\":\"ksxwpnd\",\"tcqiosmg\":\"srxuzvoam\"},\"id\":\"zah\",\"name\":\"xqdlyrtltlapr\",\"type\":\"tz\"}"; + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"zqaclna\"},\"groupIds\":[\"iygnugjknfsmfctt\",\"xuuyilflqoiquvr\",\"hmrnjhvsuj\",\"tczytqjtwh\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"fprnjl\",\"actionsRequired\":\"lxsmrpddouifamow\"}},\"etag\":\"iynknlq\",\"tags\":{\"w\":\"vp\",\"xylrjvmtygjbmz\":\"xqszdtmaajquh\"},\"id\":\"spsp\",\"name\":\"hckfkyjpmspbps\",\"type\":\"df\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateEndpointConnection response = manager.privateEndpointConnections() - .update("wemxswvruunzz", "gehkfkimrtixokff", "yinljqe", - new PrivateEndpointConnectionInner().withTags(mapOf("rsbycucrwn", "lxqzvn", "qbsms", "mikzeb")) + .update("nbmhyree", "dzqavbpdqmjxlyyz", "lgouwtlmjj", + new PrivateEndpointConnectionInner() + .withTags(mapOf("hlisngw", "xuckpggqoweyir", "uwnpqxpxiwfcng", "lqqmpiz", "kv", "saasiixtmkzj")) .withPrivateLinkServiceConnectionState(new PrivateLinkServiceConnectionState() .withStatus(PrivateLinkServiceConnectionStatus.PENDING) - .withDescription("o")), - "ycjsx", com.azure.core.util.Context.NONE); + .withDescription("nxaulk")), + "hkwfbkgozxwop", com.azure.core.util.Context.NONE); - Assertions.assertEquals("cxcjxgry", response.tags().get("fmpcycilrmca")); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.APPROVED, + Assertions.assertEquals("vp", response.tags().get("w")); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("oatftgzpnpbswvef", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("fprnjl", response.privateLinkServiceConnectionState().description()); } // Use "Map.of" if available diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointTests.java index c9b1fbed1597..802b22197a57 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -10,12 +10,6 @@ public final class PrivateEndpointTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"eofjaeqjh\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"sqrglssainq\"}").toObject(PrivateEndpoint.class); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceInnerTests.java index 4a71f4b13ef9..8a9b8070c411 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceInnerTests.java @@ -1,41 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.fluent.models.PrivateLinkResourceInner; -import java.util.HashMap; -import java.util.Map; import org.junit.jupiter.api.Assertions; public final class PrivateLinkResourceInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceInner model = BinaryData.fromString( - "{\"properties\":{\"groupId\":\"x\",\"requiredMembers\":[\"xbzpfzab\",\"lcuhxwtctyqiklb\",\"ovplw\"],\"requiredZoneNames\":[\"vgyuguos\",\"mkfssxqukkfplgm\",\"sxnkjzkdeslpvlo\"]},\"etag\":\"i\",\"tags\":{\"zb\":\"hxpkd\",\"upedeojnabckhs\":\"iuebbaumny\"},\"id\":\"txp\",\"name\":\"ie\",\"type\":\"tfhvpesapskrdqmh\"}") + "{\"properties\":{\"groupId\":\"xytxhpzxbz\",\"requiredMembers\":[\"abgl\",\"uhxwtctyqiklbbov\",\"lwzbhvgyugu\"],\"requiredZoneNames\":[\"mkfssxqukkfplgm\",\"sxnkjzkdeslpvlo\",\"wiyighxpkdw\"]},\"etag\":\"aiuebbaumnyqu\",\"tags\":{\"hsmtxpsiebtfhvp\":\"eojnabc\"},\"id\":\"apskrdqm\",\"name\":\"jjdhtld\",\"type\":\"kyzxuutk\"}") .toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("hxpkd", model.tags().get("zb")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model - = new PrivateLinkResourceInner().withTags(mapOf("zb", "hxpkd", "upedeojnabckhs", "iuebbaumny")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - Assertions.assertEquals("hxpkd", model.tags().get("zb")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + Assertions.assertEquals("eojnabc", model.tags().get("hsmtxpsiebtfhvp")); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcePropertiesTests.java index 991d6d620982..f988c507fb0e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcePropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,13 +11,7 @@ public final class PrivateLinkResourcePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PrivateLinkResourceProperties model = BinaryData.fromString( - "{\"groupId\":\"dhtldwkyz\",\"requiredMembers\":[\"tkncwsc\",\"svlxotogtwrup\"],\"requiredZoneNames\":[\"vnm\",\"cykvceo\",\"eil\",\"vnotyfjfcnj\"]}") + "{\"groupId\":\"ws\",\"requiredMembers\":[\"vlxotogtwrupqsx\",\"nmic\",\"kvceoveilovnotyf\",\"fcnj\"],\"requiredZoneNames\":[\"nxdhbt\"]}") .toObject(PrivateLinkResourceProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = new PrivateLinkResourceProperties(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesGetWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesGetWithResponseMockTests.java index f080b723fb1d..da8dc86c3ada 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.PrivateLinkResource; @@ -21,19 +21,19 @@ public final class PrivateLinkResourcesGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"groupId\":\"fmvigorqjbttzh\",\"requiredMembers\":[\"lkafhonqjuje\"],\"requiredZoneNames\":[\"pzvcpopmxelnwc\",\"tyjedex\",\"mlfmkqs\",\"azuawx\"]},\"etag\":\"x\",\"tags\":{\"s\":\"mwabzxrvxc\",\"gzwywak\":\"sphaivmxyasflvg\",\"ljhlnymzotq\":\"ihknsmjbl\",\"mv\":\"ryuzcbmqqv\"},\"id\":\"fgtayxonsup\",\"name\":\"ujlzqnhcvsqltn\",\"type\":\"oibgsxg\"}"; + = "{\"properties\":{\"groupId\":\"yophz\",\"requiredMembers\":[\"sgcrpfbcunezzce\"],\"requiredZoneNames\":[\"fwyfwlwxjwet\",\"psihcla\",\"zvaylptrsqqw\",\"tcmwqkchc\"]},\"etag\":\"axfe\",\"tags\":{\"ylkkshkbffmbm\":\"kjexfdeqvhp\",\"gjxsnptfu\":\"zjrgyww\"},\"id\":\"icgaao\",\"name\":\"pttaqutd\",\"type\":\"wemxswvruunzz\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PrivateLinkResource response = manager.privateLinkResources() - .getWithResponse("jphslhcaw", "u", "i", com.azure.core.util.Context.NONE) + .getWithResponse("nlvxbcuii", "nktwfansnvpdibmi", "ostbzbkiwb", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("mwabzxrvxc", response.tags().get("s")); + Assertions.assertEquals("kjexfdeqvhp", response.tags().get("ylkkshkbffmbm")); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesListByBatchAccountMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesListByBatchAccountMockTests.java index 6e69d7b7069c..6fbdcfb52888 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesListByBatchAccountMockTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesListByBatchAccountMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.batch.BatchManager; import com.azure.resourcemanager.batch.models.PrivateLinkResource; @@ -22,18 +22,18 @@ public final class PrivateLinkResourcesListByBatchAccountMockTests { @Test public void testListByBatchAccount() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"groupId\":\"daultxijjumfq\",\"requiredMembers\":[\"lnqnmcjn\"],\"requiredZoneNames\":[\"dqxtbjwgnyf\"]},\"etag\":\"fzsvtuikzh\",\"tags\":{\"nzrdpsovwxz\":\"glcfhmlrqryxyn\",\"hv\":\"ptgoeiybbabp\",\"igjkskyrio\":\"slkvntjl\",\"mifrygznmma\":\"vzidsxwaab\"},\"id\":\"ri\",\"name\":\"kzobgopxlhsln\",\"type\":\"lxieixynllxecwcr\"}]}"; + = "{\"value\":[{\"properties\":{\"groupId\":\"ixmonstshiyxg\",\"requiredMembers\":[\"fclduccbirdsv\",\"wcobie\"],\"requiredZoneNames\":[\"mninwjizcilng\",\"gshejjtbxqmulux\"]},\"etag\":\"qzvnersbycucr\",\"tags\":{\"qbsms\":\"mikzeb\",\"kzruswh\":\"ziqgfuh\",\"ycjsx\":\"hczznvf\"},\"id\":\"wix\",\"name\":\"vumwmxqh\",\"type\":\"dvnoamldsehaohdj\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BatchManager manager = BatchManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - PagedIterable response - = manager.privateLinkResources().listByBatchAccount("uy", "i", 731871951, com.azure.core.util.Context.NONE); + PagedIterable response = manager.privateLinkResources() + .listByBatchAccount("gehkfkimrtixokff", "yinljqe", 1178868371, com.azure.core.util.Context.NONE); - Assertions.assertEquals("glcfhmlrqryxyn", response.iterator().next().tags().get("nzrdpsovwxz")); + Assertions.assertEquals("mikzeb", response.iterator().next().tags().get("qbsms")); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkServiceConnectionStateTests.java index 792b69fd87d8..6fe89fcfff28 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkServiceConnectionStateTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkServiceConnectionStateTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,20 +12,20 @@ public final class PrivateLinkServiceConnectionStateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = BinaryData - .fromString("{\"status\":\"Disconnected\",\"description\":\"asvm\",\"actionsRequired\":\"jqul\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("asvm", model.description()); + PrivateLinkServiceConnectionState model + = BinaryData.fromString("{\"status\":\"Rejected\",\"description\":\"nzl\",\"actionsRequired\":\"fmppe\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("nzl", model.description()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PrivateLinkServiceConnectionState model - = new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("asvm"); + = new PrivateLinkServiceConnectionState().withStatus(PrivateLinkServiceConnectionStatus.REJECTED) + .withDescription("nzl"); model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("asvm", model.description()); + Assertions.assertEquals(PrivateLinkServiceConnectionStatus.REJECTED, model.status()); + Assertions.assertEquals("nzl", model.description()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssuePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssuePropertiesTests.java index 0404781c6710..86586650fe07 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssuePropertiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssuePropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,13 +11,7 @@ public final class ProvisioningIssuePropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisioningIssueProperties model = BinaryData.fromString( - "{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"ssxmojms\",\"suggestedResourceIds\":[\"jpr\",\"kwcf\"],\"suggestedAccessRules\":[{\"name\":\"yxgtczh\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"shmkxmaehvbbxur\",\"pltfnhtba\",\"kgxywr\",\"kpyklyhp\"],\"subscriptions\":[{\"id\":\"pvruudlg\"},{\"id\":\"bth\"},{\"id\":\"tgk\"},{\"id\":\"tvdxeclzedqb\"}],\"networkSecurityPerimeters\":[{\"id\":\"lhpl\",\"perimeterGuid\":\"0a85b51d-36d5-45fb-8312-8365176f8765\",\"location\":\"kdl\"},{\"id\":\"qfbumlkxtrqjf\",\"perimeterGuid\":\"00e3827d-1962-4157-827b-b378adb02936\",\"location\":\"mbtxhwgf\"},{\"id\":\"rtawcoezb\",\"perimeterGuid\":\"3c80c410-e82e-43be-b4b7-3c1b1ce49083\",\"location\":\"bskhudygoookkqfq\"},{\"id\":\"vleo\",\"perimeterGuid\":\"5e45a9ee-bbf4-4f49-8dd7-06b620bafe70\",\"location\":\"luiqtqzfavyvnqq\"}],\"fullyQualifiedDomainNames\":[\"ryeu\",\"yjkqabqgzslesjcb\"],\"emailAddresses\":[\"n\",\"tiewdj\",\"vbquwr\"],\"phoneNumbers\":[\"wagohbuffk\",\"rqemvvhmxt\",\"rjfut\",\"coebjvewzcj\"]}},{\"name\":\"m\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"aadraufactkahz\",\"v\",\"jjziuxxpsh\",\"eekulfgslqubkwd\"],\"subscriptions\":[{\"id\":\"d\"},{\"id\":\"tujbazpju\"},{\"id\":\"minyflnorwm\"},{\"id\":\"vwpklvxwmygdxp\"}],\"networkSecurityPerimeters\":[{\"id\":\"hiszepnnbjcrxgib\",\"perimeterGuid\":\"b5b5d3f7-bc1e-43ba-95f3-28b7382d6659\",\"location\":\"xconfozauors\"},{\"id\":\"okwbqplh\",\"perimeterGuid\":\"725d6e2b-7b9f-46b0-aef2-b28d0ed59a7d\",\"location\":\"uuepzlrphwzsoldw\"}],\"fullyQualifiedDomainNames\":[\"qdunvmnnrwrbior\",\"talywjhhgdnhxms\",\"v\",\"omi\"],\"emailAddresses\":[\"ggdufiqndieu\",\"ao\"],\"phoneNumbers\":[\"hvcyyysfg\",\"otcubi\",\"p\"]}},{\"name\":\"pwoqo\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"k\"],\"subscriptions\":[{\"id\":\"hqvcimpevfgmblr\"}],\"networkSecurityPerimeters\":[{\"id\":\"ywdxsmic\",\"perimeterGuid\":\"418b41bf-1b3d-4931-8a92-a60bd4909536\",\"location\":\"wfscjfn\"},{\"id\":\"szqujizdvoq\",\"perimeterGuid\":\"09fc4b87-2368-4556-be16-98af0ab1aa8a\",\"location\":\"byowbblgyavutp\"}],\"fullyQualifiedDomainNames\":[\"oxoismsksbpim\",\"qolj\"],\"emailAddresses\":[\"gxxlxsffgcvizq\",\"dwl\"],\"phoneNumbers\":[\"youpfgfbkj\",\"bdyhgkfminsgowz\",\"ttsttktlahbqact\"]}}]}") + "{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Error\",\"description\":\"bxurip\",\"suggestedResourceIds\":[\"n\",\"tbaxk\",\"xywr\"],\"suggestedAccessRules\":[{\"name\":\"kl\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"dpvruud\",\"gzibthostgktstv\",\"xeclzedqbcvhzlhp\",\"odqkdlwwqfb\"],\"subscriptions\":[{\"id\":\"xtrqjfs\"}],\"networkSecurityPerimeters\":[{\"id\":\"txhwgfws\",\"perimeterGuid\":\"a\",\"location\":\"oezbrhubsk\"},{\"id\":\"dyg\",\"perimeterGuid\":\"okkqfqjbvleo\",\"location\":\"ml\"}],\"fullyQualifiedDomainNames\":[\"tqzfavyv\",\"qqybarye\",\"ayjkqa\"],\"emailAddresses\":[\"zslesjcbher\",\"ntiew\",\"jcvb\",\"uwrbehwagoh\"],\"phoneNumbers\":[\"fkmr\"]}},{\"name\":\"mvvhmxtdrjfuta\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"ewzcjznmwcp\",\"guaadraufactkahz\"],\"subscriptions\":[{\"id\":\"j\"},{\"id\":\"uxxpshne\"},{\"id\":\"ulfgslqu\"},{\"id\":\"wdlenrdsut\"}],\"networkSecurityPerimeters\":[{\"id\":\"zpjuohminyfl\",\"perimeterGuid\":\"rwm\",\"location\":\"vwpklvxwmygdxp\"},{\"id\":\"qchiszep\",\"perimeterGuid\":\"bjcrxgibbdaxco\",\"location\":\"ozauorsukokwb\"},{\"id\":\"lhlv\",\"perimeterGuid\":\"uepzl\",\"location\":\"hw\"}],\"fullyQualifiedDomainNames\":[\"l\",\"wey\",\"qdunvmnnrwrbior\"],\"emailAddresses\":[\"lywjhh\",\"dnhxmsi\",\"fomiloxgg\"],\"phoneNumbers\":[\"iqndieuzaofj\"]}},{\"name\":\"vcyy\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"tcubiipuipwoqonm\",\"cje\"],\"subscriptions\":[{\"id\":\"shqvcimpev\"}],\"networkSecurityPerimeters\":[{\"id\":\"lrri\",\"perimeterGuid\":\"ywdxsmic\",\"location\":\"rwfscjfnynszquj\"},{\"id\":\"dvoqyt\",\"perimeterGuid\":\"yo\",\"location\":\"blgyavutpthj\"},{\"id\":\"oismsksbpimlqol\",\"perimeterGuid\":\"kcgxxlxsffgcvi\",\"location\":\"zdwlvwlyoupfgfb\"}],\"fullyQualifiedDomainNames\":[\"bdyhgkfminsgowz\",\"ttsttktlahbqact\"],\"emailAddresses\":[\"zukxitmmqtgqq\",\"x\",\"rnxrxcpj\"],\"phoneNumbers\":[\"av\",\"k\",\"dzf\"]}},{\"name\":\"zivj\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"bajlka\",\"nwxyiop\",\"dkqqfkuvscxkd\"],\"subscriptions\":[{\"id\":\"ovibrxkp\"},{\"id\":\"oaz\"}],\"networkSecurityPerimeters\":[{\"id\":\"cbgoor\",\"perimeterGuid\":\"eoybfhjxakvvjgs\",\"location\":\"r\"}],\"fullyQualifiedDomainNames\":[\"mywwtkgkxnyed\",\"b\",\"yvudtjuewbci\",\"xuuwhcj\"],\"emailAddresses\":[\"cybvpayakkudzpxg\",\"jplmagstcy\"],\"phoneNumbers\":[\"fkyrk\",\"bdgiogsjk\",\"nwqjnoba\",\"yhddvia\"]}}]}") .toObject(ProvisioningIssueProperties.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProvisioningIssueProperties model = new ProvisioningIssueProperties(); - model = BinaryData.fromObject(model).toObject(ProvisioningIssueProperties.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssueTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssueTests.java index ace22559d150..f4c0568e8127 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssueTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProvisioningIssueTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,13 +11,7 @@ public final class ProvisioningIssueTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ProvisioningIssue model = BinaryData.fromString( - "{\"name\":\"zdgiruj\",\"properties\":{\"issueType\":\"ConfigurationPropagationFailure\",\"severity\":\"Warning\",\"description\":\"zbtd\",\"suggestedResourceIds\":[\"pniyujviyl\"],\"suggestedAccessRules\":[{\"name\":\"fssnrbgyefrymsga\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"cotmr\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"moxoftpi\",\"iwyczuh\",\"a\",\"pqjlihhyusps\"],\"emailAddresses\":[\"dvlmfwdgzxul\",\"cvpa\",\"rsre\",\"zvxurisjnhny\"],\"phoneNumbers\":[\"fq\",\"zgxmr\"]}},{\"name\":\"blwpcesutrgj\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"p\",\"oqh\",\"hej\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"qntcypsxjvfoimwk\",\"lirc\"],\"emailAddresses\":[\"xvydfceacvlhvygd\"],\"phoneNumbers\":[\"umrtwnawjsl\"]}},{\"name\":\"wkojgcyztsfmzn\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"chqnrnrpxehuwry\",\"qgaifmviklbydv\",\"hbejdznxcvdsrhnj\"],\"subscriptions\":[{},{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"ovqfzge\",\"jdftuljltd\"],\"emailAddresses\":[\"amtmcz\",\"o\"],\"phoneNumbers\":[\"wcw\"]}}]}}") + "{\"name\":\"lhvygdyftu\",\"properties\":{\"issueType\":\"MissingPerimeterConfiguration\",\"severity\":\"Warning\",\"description\":\"jslb\",\"suggestedResourceIds\":[\"ojgcyzt\",\"fmznba\",\"qphchqnrnrpxehuw\"],\"suggestedAccessRules\":[{\"name\":\"gaifmvik\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"hbejdznxcvdsrhnj\",\"volvtn\",\"v\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"dftuljltduce\",\"mtmczuome\",\"wcw\"],\"emailAddresses\":[\"oknssxmojmsvpkjp\",\"vk\",\"cfzq\"],\"phoneNumbers\":[\"x\",\"tczheydbsdshmkx\"]}}]}}") .toObject(ProvisioningIssue.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProvisioningIssue model = new ProvisioningIssue(); - model = BinaryData.fromObject(model).toObject(ProvisioningIssue.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProxyAgentSettingsTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProxyAgentSettingsTests.java new file mode 100644 index 000000000000..896db716d9b8 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ProxyAgentSettingsTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.batch.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.HostEndpointSettings; +import com.azure.resourcemanager.batch.models.HostEndpointSettingsModeTypes; +import com.azure.resourcemanager.batch.models.ProxyAgentSettings; +import org.junit.jupiter.api.Assertions; + +public final class ProxyAgentSettingsTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProxyAgentSettings model = BinaryData.fromString( + "{\"enabled\":true,\"imds\":{\"mode\":\"Audit\",\"inVMAccessControlProfileReferenceId\":\"atrwyhqmibzyh\"},\"wireServer\":{\"mode\":\"Enforce\",\"inVMAccessControlProfileReferenceId\":\"ypyynpcdpumnzg\"}}") + .toObject(ProxyAgentSettings.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.AUDIT, model.imds().mode()); + Assertions.assertEquals("atrwyhqmibzyh", model.imds().inVMAccessControlProfileReferenceId()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.ENFORCE, model.wireServer().mode()); + Assertions.assertEquals("ypyynpcdpumnzg", model.wireServer().inVMAccessControlProfileReferenceId()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + ProxyAgentSettings model = new ProxyAgentSettings().withEnabled(true) + .withImds(new HostEndpointSettings().withMode(HostEndpointSettingsModeTypes.AUDIT) + .withInVMAccessControlProfileReferenceId("atrwyhqmibzyh")) + .withWireServer(new HostEndpointSettings().withMode(HostEndpointSettingsModeTypes.ENFORCE) + .withInVMAccessControlProfileReferenceId("ypyynpcdpumnzg")); + model = BinaryData.fromObject(model).toObject(ProxyAgentSettings.class); + Assertions.assertTrue(model.enabled()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.AUDIT, model.imds().mode()); + Assertions.assertEquals("atrwyhqmibzyh", model.imds().inVMAccessControlProfileReferenceId()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.ENFORCE, model.wireServer().mode()); + Assertions.assertEquals("ypyynpcdpumnzg", model.wireServer().inVMAccessControlProfileReferenceId()); + } +} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PublicIpAddressConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PublicIpAddressConfigurationTests.java index 2156fd3d51cc..40ba74be790a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PublicIpAddressConfigurationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PublicIpAddressConfigurationTests.java @@ -1,10 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.IPFamily; +import com.azure.resourcemanager.batch.models.IPTag; import com.azure.resourcemanager.batch.models.IpAddressProvisioningType; import com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration; import java.util.Arrays; @@ -14,19 +16,27 @@ public final class PublicIpAddressConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { PublicIpAddressConfiguration model = BinaryData.fromString( - "{\"provision\":\"NoPublicIPAddresses\",\"ipAddressIds\":[\"aytdwkqbrq\",\"bpaxhexiilivpdt\",\"irqtdqoa\"]}") + "{\"provision\":\"UserManaged\",\"ipAddressIds\":[\"ujmqlgkfbtndoa\",\"n\",\"bjcntujitc\"],\"ipFamilies\":[\"IPv6\"],\"ipTags\":[{\"ipTagType\":\"ae\",\"tag\":\"ojvdcpzfoqo\"}]}") .toObject(PublicIpAddressConfiguration.class); - Assertions.assertEquals(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES, model.provision()); - Assertions.assertEquals("aytdwkqbrq", model.ipAddressIds().get(0)); + Assertions.assertEquals(IpAddressProvisioningType.USER_MANAGED, model.provision()); + Assertions.assertEquals("ujmqlgkfbtndoa", model.ipAddressIds().get(0)); + Assertions.assertEquals(IPFamily.IPV6, model.ipFamilies().get(0)); + Assertions.assertEquals("ae", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("ojvdcpzfoqo", model.ipTags().get(0).tag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { PublicIpAddressConfiguration model - = new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES) - .withIpAddressIds(Arrays.asList("aytdwkqbrq", "bpaxhexiilivpdt", "irqtdqoa")); + = new PublicIpAddressConfiguration().withProvision(IpAddressProvisioningType.USER_MANAGED) + .withIpAddressIds(Arrays.asList("ujmqlgkfbtndoa", "n", "bjcntujitc")) + .withIpFamilies(Arrays.asList(IPFamily.IPV6)) + .withIpTags(Arrays.asList(new IPTag().withIpTagType("ae").withTag("ojvdcpzfoqo"))); model = BinaryData.fromObject(model).toObject(PublicIpAddressConfiguration.class); - Assertions.assertEquals(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES, model.provision()); - Assertions.assertEquals("aytdwkqbrq", model.ipAddressIds().get(0)); + Assertions.assertEquals(IpAddressProvisioningType.USER_MANAGED, model.provision()); + Assertions.assertEquals("ujmqlgkfbtndoa", model.ipAddressIds().get(0)); + Assertions.assertEquals(IPFamily.IPV6, model.ipFamilies().get(0)); + Assertions.assertEquals("ae", model.ipTags().get(0).ipTagType()); + Assertions.assertEquals("ojvdcpzfoqo", model.ipTags().get(0).tag()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceAssociationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceAssociationTests.java index ae016c794a3f..7a2c61fe8114 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceAssociationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceAssociationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,18 +12,9 @@ public final class ResourceAssociationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ResourceAssociation model = BinaryData.fromString("{\"name\":\"jdxon\",\"accessMode\":\"Enforced\"}") + ResourceAssociation model = BinaryData.fromString("{\"name\":\"ttijfybvpoekrs\",\"accessMode\":\"Audit\"}") .toObject(ResourceAssociation.class); - Assertions.assertEquals("jdxon", model.name()); - Assertions.assertEquals(ResourceAssociationAccessMode.ENFORCED, model.accessMode()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceAssociation model - = new ResourceAssociation().withName("jdxon").withAccessMode(ResourceAssociationAccessMode.ENFORCED); - model = BinaryData.fromObject(model).toObject(ResourceAssociation.class); - Assertions.assertEquals("jdxon", model.name()); - Assertions.assertEquals(ResourceAssociationAccessMode.ENFORCED, model.accessMode()); + Assertions.assertEquals("ttijfybvpoekrs", model.name()); + Assertions.assertEquals(ResourceAssociationAccessMode.AUDIT, model.accessMode()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceFileTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceFileTests.java index 6731e5ae7420..2509680a07ba 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceFileTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceFileTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -13,33 +13,33 @@ public final class ResourceFileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ResourceFile model = BinaryData.fromString( - "{\"autoStorageContainerName\":\"mncwsobqwcsdb\",\"storageContainerUrl\":\"dcfhucqdpf\",\"httpUrl\":\"glsbjjc\",\"blobPrefix\":\"vxb\",\"filePath\":\"vudutncor\",\"fileMode\":\"lxqtvcofudfl\",\"identityReference\":{\"resourceId\":\"jub\"}}") + "{\"autoStorageContainerName\":\"nyowxwlmdjrkvfg\",\"storageContainerUrl\":\"fvpdbo\",\"httpUrl\":\"cizsjqlhkrribdei\",\"blobPrefix\":\"ipqkghvxndzwm\",\"filePath\":\"efajpj\",\"fileMode\":\"wkqnyhg\",\"identityReference\":{\"resourceId\":\"tjivfxzsjabib\"}}") .toObject(ResourceFile.class); - Assertions.assertEquals("mncwsobqwcsdb", model.autoStorageContainerName()); - Assertions.assertEquals("dcfhucqdpf", model.storageContainerUrl()); - Assertions.assertEquals("glsbjjc", model.httpUrl()); - Assertions.assertEquals("vxb", model.blobPrefix()); - Assertions.assertEquals("vudutncor", model.filePath()); - Assertions.assertEquals("lxqtvcofudfl", model.fileMode()); - Assertions.assertEquals("jub", model.identityReference().resourceId()); + Assertions.assertEquals("nyowxwlmdjrkvfg", model.autoStorageContainerName()); + Assertions.assertEquals("fvpdbo", model.storageContainerUrl()); + Assertions.assertEquals("cizsjqlhkrribdei", model.httpUrl()); + Assertions.assertEquals("ipqkghvxndzwm", model.blobPrefix()); + Assertions.assertEquals("efajpj", model.filePath()); + Assertions.assertEquals("wkqnyhg", model.fileMode()); + Assertions.assertEquals("tjivfxzsjabib", model.identityReference().resourceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ResourceFile model = new ResourceFile().withAutoStorageContainerName("mncwsobqwcsdb") - .withStorageContainerUrl("dcfhucqdpf") - .withHttpUrl("glsbjjc") - .withBlobPrefix("vxb") - .withFilePath("vudutncor") - .withFileMode("lxqtvcofudfl") - .withIdentityReference(new ComputeNodeIdentityReference().withResourceId("jub")); + ResourceFile model = new ResourceFile().withAutoStorageContainerName("nyowxwlmdjrkvfg") + .withStorageContainerUrl("fvpdbo") + .withHttpUrl("cizsjqlhkrribdei") + .withBlobPrefix("ipqkghvxndzwm") + .withFilePath("efajpj") + .withFileMode("wkqnyhg") + .withIdentityReference(new ComputeNodeIdentityReference().withResourceId("tjivfxzsjabib")); model = BinaryData.fromObject(model).toObject(ResourceFile.class); - Assertions.assertEquals("mncwsobqwcsdb", model.autoStorageContainerName()); - Assertions.assertEquals("dcfhucqdpf", model.storageContainerUrl()); - Assertions.assertEquals("glsbjjc", model.httpUrl()); - Assertions.assertEquals("vxb", model.blobPrefix()); - Assertions.assertEquals("vudutncor", model.filePath()); - Assertions.assertEquals("lxqtvcofudfl", model.fileMode()); - Assertions.assertEquals("jub", model.identityReference().resourceId()); + Assertions.assertEquals("nyowxwlmdjrkvfg", model.autoStorageContainerName()); + Assertions.assertEquals("fvpdbo", model.storageContainerUrl()); + Assertions.assertEquals("cizsjqlhkrribdei", model.httpUrl()); + Assertions.assertEquals("ipqkghvxndzwm", model.blobPrefix()); + Assertions.assertEquals("efajpj", model.filePath()); + Assertions.assertEquals("wkqnyhg", model.fileMode()); + Assertions.assertEquals("tjivfxzsjabib", model.identityReference().resourceId()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/RollingUpgradePolicyTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/RollingUpgradePolicyTests.java index fc832e9c6a04..a6aeb036a4a8 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/RollingUpgradePolicyTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/RollingUpgradePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,33 +12,33 @@ public final class RollingUpgradePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { RollingUpgradePolicy model = BinaryData.fromString( - "{\"enableCrossZoneUpgrade\":true,\"maxBatchInstancePercent\":9753041,\"maxUnhealthyInstancePercent\":1101350352,\"maxUnhealthyUpgradedInstancePercent\":1130868680,\"pauseTimeBetweenBatches\":\"ft\",\"prioritizeUnhealthyInstances\":false,\"rollbackFailedInstancesOnPolicyBreach\":false}") + "{\"enableCrossZoneUpgrade\":true,\"maxBatchInstancePercent\":1206519159,\"maxUnhealthyInstancePercent\":565781188,\"maxUnhealthyUpgradedInstancePercent\":273619728,\"pauseTimeBetweenBatches\":\"kzwpcnpw\",\"prioritizeUnhealthyInstances\":true,\"rollbackFailedInstancesOnPolicyBreach\":true}") .toObject(RollingUpgradePolicy.class); - Assertions.assertEquals(true, model.enableCrossZoneUpgrade()); - Assertions.assertEquals(9753041, model.maxBatchInstancePercent()); - Assertions.assertEquals(1101350352, model.maxUnhealthyInstancePercent()); - Assertions.assertEquals(1130868680, model.maxUnhealthyUpgradedInstancePercent()); - Assertions.assertEquals("ft", model.pauseTimeBetweenBatches()); - Assertions.assertEquals(false, model.prioritizeUnhealthyInstances()); - Assertions.assertEquals(false, model.rollbackFailedInstancesOnPolicyBreach()); + Assertions.assertTrue(model.enableCrossZoneUpgrade()); + Assertions.assertEquals(1206519159, model.maxBatchInstancePercent()); + Assertions.assertEquals(565781188, model.maxUnhealthyInstancePercent()); + Assertions.assertEquals(273619728, model.maxUnhealthyUpgradedInstancePercent()); + Assertions.assertEquals("kzwpcnpw", model.pauseTimeBetweenBatches()); + Assertions.assertTrue(model.prioritizeUnhealthyInstances()); + Assertions.assertTrue(model.rollbackFailedInstancesOnPolicyBreach()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { RollingUpgradePolicy model = new RollingUpgradePolicy().withEnableCrossZoneUpgrade(true) - .withMaxBatchInstancePercent(9753041) - .withMaxUnhealthyInstancePercent(1101350352) - .withMaxUnhealthyUpgradedInstancePercent(1130868680) - .withPauseTimeBetweenBatches("ft") - .withPrioritizeUnhealthyInstances(false) - .withRollbackFailedInstancesOnPolicyBreach(false); + .withMaxBatchInstancePercent(1206519159) + .withMaxUnhealthyInstancePercent(565781188) + .withMaxUnhealthyUpgradedInstancePercent(273619728) + .withPauseTimeBetweenBatches("kzwpcnpw") + .withPrioritizeUnhealthyInstances(true) + .withRollbackFailedInstancesOnPolicyBreach(true); model = BinaryData.fromObject(model).toObject(RollingUpgradePolicy.class); - Assertions.assertEquals(true, model.enableCrossZoneUpgrade()); - Assertions.assertEquals(9753041, model.maxBatchInstancePercent()); - Assertions.assertEquals(1101350352, model.maxUnhealthyInstancePercent()); - Assertions.assertEquals(1130868680, model.maxUnhealthyUpgradedInstancePercent()); - Assertions.assertEquals("ft", model.pauseTimeBetweenBatches()); - Assertions.assertEquals(false, model.prioritizeUnhealthyInstances()); - Assertions.assertEquals(false, model.rollbackFailedInstancesOnPolicyBreach()); + Assertions.assertTrue(model.enableCrossZoneUpgrade()); + Assertions.assertEquals(1206519159, model.maxBatchInstancePercent()); + Assertions.assertEquals(565781188, model.maxUnhealthyInstancePercent()); + Assertions.assertEquals(273619728, model.maxUnhealthyUpgradedInstancePercent()); + Assertions.assertEquals("kzwpcnpw", model.pauseTimeBetweenBatches()); + Assertions.assertTrue(model.prioritizeUnhealthyInstances()); + Assertions.assertTrue(model.rollbackFailedInstancesOnPolicyBreach()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ScaleSettingsTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ScaleSettingsTests.java index 76904a3a4755..5abaae8c7c5b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ScaleSettingsTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ScaleSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -16,31 +16,31 @@ public final class ScaleSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ScaleSettings model = BinaryData.fromString( - "{\"fixedScale\":{\"resizeTimeout\":\"PT134H36S\",\"targetDedicatedNodes\":107730122,\"targetLowPriorityNodes\":2107852573,\"nodeDeallocationOption\":\"Requeue\"},\"autoScale\":{\"formula\":\"pajqgxysm\",\"evaluationInterval\":\"PT187H48M14S\"}}") + "{\"fixedScale\":{\"resizeTimeout\":\"PT41H2M7S\",\"targetDedicatedNodes\":333571047,\"targetLowPriorityNodes\":1063361933,\"nodeDeallocationOption\":\"Terminate\"},\"autoScale\":{\"formula\":\"xdy\",\"evaluationInterval\":\"PT57H31M36S\"}}") .toObject(ScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT134H36S"), model.fixedScale().resizeTimeout()); - Assertions.assertEquals(107730122, model.fixedScale().targetDedicatedNodes()); - Assertions.assertEquals(2107852573, model.fixedScale().targetLowPriorityNodes()); - Assertions.assertEquals(ComputeNodeDeallocationOption.REQUEUE, model.fixedScale().nodeDeallocationOption()); - Assertions.assertEquals("pajqgxysm", model.autoScale().formula()); - Assertions.assertEquals(Duration.parse("PT187H48M14S"), model.autoScale().evaluationInterval()); + Assertions.assertEquals(Duration.parse("PT41H2M7S"), model.fixedScale().resizeTimeout()); + Assertions.assertEquals(333571047, model.fixedScale().targetDedicatedNodes()); + Assertions.assertEquals(1063361933, model.fixedScale().targetLowPriorityNodes()); + Assertions.assertEquals(ComputeNodeDeallocationOption.TERMINATE, model.fixedScale().nodeDeallocationOption()); + Assertions.assertEquals("xdy", model.autoScale().formula()); + Assertions.assertEquals(Duration.parse("PT57H31M36S"), model.autoScale().evaluationInterval()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { ScaleSettings model = new ScaleSettings() - .withFixedScale(new FixedScaleSettings().withResizeTimeout(Duration.parse("PT134H36S")) - .withTargetDedicatedNodes(107730122) - .withTargetLowPriorityNodes(2107852573) - .withNodeDeallocationOption(ComputeNodeDeallocationOption.REQUEUE)) - .withAutoScale(new AutoScaleSettings().withFormula("pajqgxysm") - .withEvaluationInterval(Duration.parse("PT187H48M14S"))); + .withFixedScale(new FixedScaleSettings().withResizeTimeout(Duration.parse("PT41H2M7S")) + .withTargetDedicatedNodes(333571047) + .withTargetLowPriorityNodes(1063361933) + .withNodeDeallocationOption(ComputeNodeDeallocationOption.TERMINATE)) + .withAutoScale( + new AutoScaleSettings().withFormula("xdy").withEvaluationInterval(Duration.parse("PT57H31M36S"))); model = BinaryData.fromObject(model).toObject(ScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT134H36S"), model.fixedScale().resizeTimeout()); - Assertions.assertEquals(107730122, model.fixedScale().targetDedicatedNodes()); - Assertions.assertEquals(2107852573, model.fixedScale().targetLowPriorityNodes()); - Assertions.assertEquals(ComputeNodeDeallocationOption.REQUEUE, model.fixedScale().nodeDeallocationOption()); - Assertions.assertEquals("pajqgxysm", model.autoScale().formula()); - Assertions.assertEquals(Duration.parse("PT187H48M14S"), model.autoScale().evaluationInterval()); + Assertions.assertEquals(Duration.parse("PT41H2M7S"), model.fixedScale().resizeTimeout()); + Assertions.assertEquals(333571047, model.fixedScale().targetDedicatedNodes()); + Assertions.assertEquals(1063361933, model.fixedScale().targetLowPriorityNodes()); + Assertions.assertEquals(ComputeNodeDeallocationOption.TERMINATE, model.fixedScale().nodeDeallocationOption()); + Assertions.assertEquals("xdy", model.autoScale().formula()); + Assertions.assertEquals(Duration.parse("PT57H31M36S"), model.autoScale().evaluationInterval()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SecurityProfileTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SecurityProfileTests.java index 498a558ff59b..69a77f47f1fb 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SecurityProfileTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SecurityProfileTests.java @@ -1,10 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.HostEndpointSettings; +import com.azure.resourcemanager.batch.models.HostEndpointSettingsModeTypes; +import com.azure.resourcemanager.batch.models.ProxyAgentSettings; import com.azure.resourcemanager.batch.models.SecurityProfile; import com.azure.resourcemanager.batch.models.SecurityTypes; import com.azure.resourcemanager.batch.models.UefiSettings; @@ -14,23 +17,40 @@ public final class SecurityProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SecurityProfile model = BinaryData.fromString( - "{\"securityType\":\"confidentialVM\",\"encryptionAtHost\":true,\"uefiSettings\":{\"secureBootEnabled\":false,\"vTpmEnabled\":false}}") + "{\"securityType\":\"confidentialVM\",\"encryptionAtHost\":false,\"uefiSettings\":{\"secureBootEnabled\":true,\"vTpmEnabled\":false},\"proxyAgentSettings\":{\"enabled\":false,\"imds\":{\"mode\":\"Audit\",\"inVMAccessControlProfileReferenceId\":\"sjswsrms\"},\"wireServer\":{\"mode\":\"Enforce\",\"inVMAccessControlProfileReferenceId\":\"zbchckqqzqioxiy\"}}}") .toObject(SecurityProfile.class); Assertions.assertEquals(SecurityTypes.CONFIDENTIAL_VM, model.securityType()); - Assertions.assertEquals(true, model.encryptionAtHost()); - Assertions.assertEquals(false, model.uefiSettings().secureBootEnabled()); - Assertions.assertEquals(false, model.uefiSettings().vTpmEnabled()); + Assertions.assertFalse(model.encryptionAtHost()); + Assertions.assertTrue(model.uefiSettings().secureBootEnabled()); + Assertions.assertFalse(model.uefiSettings().vTpmEnabled()); + Assertions.assertFalse(model.proxyAgentSettings().enabled()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.AUDIT, model.proxyAgentSettings().imds().mode()); + Assertions.assertEquals("sjswsrms", model.proxyAgentSettings().imds().inVMAccessControlProfileReferenceId()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.ENFORCE, model.proxyAgentSettings().wireServer().mode()); + Assertions.assertEquals("zbchckqqzqioxiy", + model.proxyAgentSettings().wireServer().inVMAccessControlProfileReferenceId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { SecurityProfile model = new SecurityProfile().withSecurityType(SecurityTypes.CONFIDENTIAL_VM) - .withEncryptionAtHost(true) - .withUefiSettings(new UefiSettings().withSecureBootEnabled(false).withVTpmEnabled(false)); + .withEncryptionAtHost(false) + .withUefiSettings(new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(false)) + .withProxyAgentSettings(new ProxyAgentSettings().withEnabled(false) + .withImds(new HostEndpointSettings().withMode(HostEndpointSettingsModeTypes.AUDIT) + .withInVMAccessControlProfileReferenceId("sjswsrms")) + .withWireServer(new HostEndpointSettings().withMode(HostEndpointSettingsModeTypes.ENFORCE) + .withInVMAccessControlProfileReferenceId("zbchckqqzqioxiy"))); model = BinaryData.fromObject(model).toObject(SecurityProfile.class); Assertions.assertEquals(SecurityTypes.CONFIDENTIAL_VM, model.securityType()); - Assertions.assertEquals(true, model.encryptionAtHost()); - Assertions.assertEquals(false, model.uefiSettings().secureBootEnabled()); - Assertions.assertEquals(false, model.uefiSettings().vTpmEnabled()); + Assertions.assertFalse(model.encryptionAtHost()); + Assertions.assertTrue(model.uefiSettings().secureBootEnabled()); + Assertions.assertFalse(model.uefiSettings().vTpmEnabled()); + Assertions.assertFalse(model.proxyAgentSettings().enabled()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.AUDIT, model.proxyAgentSettings().imds().mode()); + Assertions.assertEquals("sjswsrms", model.proxyAgentSettings().imds().inVMAccessControlProfileReferenceId()); + Assertions.assertEquals(HostEndpointSettingsModeTypes.ENFORCE, model.proxyAgentSettings().wireServer().mode()); + Assertions.assertEquals("zbchckqqzqioxiy", + model.proxyAgentSettings().wireServer().inVMAccessControlProfileReferenceId()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ServiceArtifactReferenceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ServiceArtifactReferenceTests.java index e06c0bf30e43..9398cc66d63e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ServiceArtifactReferenceTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ServiceArtifactReferenceTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,14 +12,14 @@ public final class ServiceArtifactReferenceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceArtifactReference model - = BinaryData.fromString("{\"id\":\"mquxvypo\"}").toObject(ServiceArtifactReference.class); - Assertions.assertEquals("mquxvypo", model.id()); + = BinaryData.fromString("{\"id\":\"dtlwwrlkd\"}").toObject(ServiceArtifactReference.class); + Assertions.assertEquals("dtlwwrlkd", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServiceArtifactReference model = new ServiceArtifactReference().withId("mquxvypo"); + ServiceArtifactReference model = new ServiceArtifactReference().withId("dtlwwrlkd"); model = BinaryData.fromObject(model).toObject(ServiceArtifactReference.class); - Assertions.assertEquals("mquxvypo", model.id()); + Assertions.assertEquals("dtlwwrlkd", model.id()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SkuCapabilityTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SkuCapabilityTests.java index 60f0d8354db5..d69af64597d7 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SkuCapabilityTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SkuCapabilityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -10,13 +10,7 @@ public final class SkuCapabilityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SkuCapability model = BinaryData.fromString("{\"name\":\"xaqwoochcbonqv\",\"value\":\"vlrxnjeaseiph\"}") + SkuCapability model = BinaryData.fromString("{\"name\":\"yvycytdclxgcckn\",\"value\":\"wmbtmvpdvjdhtt\"}") .toObject(SkuCapability.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapability model = new SkuCapability(); - model = BinaryData.fromObject(model).toObject(SkuCapability.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkuInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkuInnerTests.java index 259a80752c1e..b899ad94dea4 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkuInnerTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkuInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -11,13 +11,7 @@ public final class SupportedSkuInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedSkuInner model = BinaryData.fromString( - "{\"name\":\"xlzevgbmqjqabcy\",\"familyName\":\"ivkwlzuvccfwnfnb\",\"capabilities\":[{\"name\":\"onlebxetqgtzxdpn\",\"value\":\"qqwx\"},{\"name\":\"feallnwsu\",\"value\":\"snjampmng\"}],\"batchSupportEndOfLife\":\"2021-10-17T15:10:59Z\"}") + "{\"name\":\"kknhxkizvytnrzv\",\"familyName\":\"jraaeranokqguk\",\"capabilities\":[{\"name\":\"vbroylaxxu\",\"value\":\"disdosfjbjsvgj\"}],\"batchSupportEndOfLife\":\"2021-05-25T10:35:46Z\"}") .toObject(SupportedSkuInner.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedSkuInner model = new SupportedSkuInner(); - model = BinaryData.fromObject(model).toObject(SupportedSkuInner.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkusResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkusResultTests.java index 32c9af9c17e0..0db51bf83fb0 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkusResultTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkusResultTests.java @@ -1,25 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.SupportedSkuInner; -import com.azure.resourcemanager.batch.models.SupportedSkusResult; -import java.util.Arrays; +import com.azure.resourcemanager.batch.implementation.models.SupportedSkusResult; +import org.junit.jupiter.api.Assertions; public final class SupportedSkusResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SupportedSkusResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"m\",\"familyName\":\"hrzayvvtpgvdf\",\"capabilities\":[{\"name\":\"kftutqxlngxlefg\",\"value\":\"nxkrx\"},{\"name\":\"mi\",\"value\":\"thz\"},{\"name\":\"qdrabhjybigehoqf\",\"value\":\"wska\"},{\"name\":\"ktzlcuiywg\",\"value\":\"wgndrvynhzgpp\"}],\"batchSupportEndOfLife\":\"2021-11-30T12:13:07Z\"}],\"nextLink\":\"yncocpecfvmmcoo\"}") + "{\"value\":[{\"name\":\"bn\",\"familyName\":\"pxynenlsvxeizzg\",\"capabilities\":[{\"name\":\"srmffeycxcktpiym\",\"value\":\"teeammxqiekkkzd\"},{\"name\":\"tkgdojbmxva\",\"value\":\"efdeesve\"}],\"batchSupportEndOfLife\":\"2021-01-09T13:30:56Z\"},{\"name\":\"pxtxsuwp\",\"familyName\":\"ujwsawddjibabxvi\",\"capabilities\":[{\"name\":\"tzeexav\",\"value\":\"tfgle\"},{\"name\":\"m\",\"value\":\"bwpypqtgsfjacb\"},{\"name\":\"hhxud\",\"value\":\"vodhtn\"},{\"name\":\"rudhzmmesckdl\",\"value\":\"gzrcxfailcfxwmdb\"}],\"batchSupportEndOfLife\":\"2021-05-01T00:13:45Z\"}],\"nextLink\":\"gsftufqobrjlnacg\"}") .toObject(SupportedSkusResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SupportedSkusResult model = new SupportedSkusResult().withValue(Arrays.asList(new SupportedSkuInner())); - model = BinaryData.fromObject(model).toObject(SupportedSkusResult.class); + Assertions.assertEquals("gsftufqobrjlnacg", model.nextLink()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/TaskSchedulingPolicyTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/TaskSchedulingPolicyTests.java index e1401c17d469..098573cf45d5 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/TaskSchedulingPolicyTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/TaskSchedulingPolicyTests.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.batch.models.ComputeNodeFillType; +import com.azure.resourcemanager.batch.models.JobDefaultOrder; import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy; import org.junit.jupiter.api.Assertions; @@ -13,14 +14,18 @@ public final class TaskSchedulingPolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { TaskSchedulingPolicy model - = BinaryData.fromString("{\"nodeFillType\":\"Pack\"}").toObject(TaskSchedulingPolicy.class); + = BinaryData.fromString("{\"jobDefaultOrder\":\"CreationTime\",\"nodeFillType\":\"Pack\"}") + .toObject(TaskSchedulingPolicy.class); + Assertions.assertEquals(JobDefaultOrder.CREATION_TIME, model.jobDefaultOrder()); Assertions.assertEquals(ComputeNodeFillType.PACK, model.nodeFillType()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - TaskSchedulingPolicy model = new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.PACK); + TaskSchedulingPolicy model = new TaskSchedulingPolicy().withJobDefaultOrder(JobDefaultOrder.CREATION_TIME) + .withNodeFillType(ComputeNodeFillType.PACK); model = BinaryData.fromObject(model).toObject(TaskSchedulingPolicy.class); + Assertions.assertEquals(JobDefaultOrder.CREATION_TIME, model.jobDefaultOrder()); Assertions.assertEquals(ComputeNodeFillType.PACK, model.nodeFillType()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UefiSettingsTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UefiSettingsTests.java index 6d0b452dedc7..7548afc07c55 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UefiSettingsTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UefiSettingsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,16 +12,16 @@ public final class UefiSettingsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UefiSettings model - = BinaryData.fromString("{\"secureBootEnabled\":true,\"vTpmEnabled\":true}").toObject(UefiSettings.class); - Assertions.assertEquals(true, model.secureBootEnabled()); - Assertions.assertEquals(true, model.vTpmEnabled()); + = BinaryData.fromString("{\"secureBootEnabled\":true,\"vTpmEnabled\":false}").toObject(UefiSettings.class); + Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertFalse(model.vTpmEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UefiSettings model = new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true); + UefiSettings model = new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(false); model = BinaryData.fromObject(model).toObject(UefiSettings.class); - Assertions.assertEquals(true, model.secureBootEnabled()); - Assertions.assertEquals(true, model.vTpmEnabled()); + Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertFalse(model.vTpmEnabled()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UpgradePolicyTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UpgradePolicyTests.java index 68f53267955d..9007ef59ba2e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UpgradePolicyTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UpgradePolicyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -15,48 +15,48 @@ public final class UpgradePolicyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { UpgradePolicy model = BinaryData.fromString( - "{\"mode\":\"rolling\",\"automaticOSUpgradePolicy\":{\"disableAutomaticRollback\":false,\"enableAutomaticOSUpgrade\":true,\"useRollingUpgradePolicy\":false,\"osRollingUpgradeDeferral\":true},\"rollingUpgradePolicy\":{\"enableCrossZoneUpgrade\":false,\"maxBatchInstancePercent\":438426140,\"maxUnhealthyInstancePercent\":1665023575,\"maxUnhealthyUpgradedInstancePercent\":42464085,\"pauseTimeBetweenBatches\":\"rfdwoyu\",\"prioritizeUnhealthyInstances\":true,\"rollbackFailedInstancesOnPolicyBreach\":false}}") + "{\"mode\":\"automatic\",\"automaticOSUpgradePolicy\":{\"disableAutomaticRollback\":false,\"enableAutomaticOSUpgrade\":false,\"useRollingUpgradePolicy\":false,\"osRollingUpgradeDeferral\":false},\"rollingUpgradePolicy\":{\"enableCrossZoneUpgrade\":false,\"maxBatchInstancePercent\":1764475997,\"maxUnhealthyInstancePercent\":1174017685,\"maxUnhealthyUpgradedInstancePercent\":1680525224,\"pauseTimeBetweenBatches\":\"hqamvdkf\",\"prioritizeUnhealthyInstances\":true,\"rollbackFailedInstancesOnPolicyBreach\":false}}") .toObject(UpgradePolicy.class); - Assertions.assertEquals(UpgradeMode.ROLLING, model.mode()); - Assertions.assertEquals(false, model.automaticOSUpgradePolicy().disableAutomaticRollback()); - Assertions.assertEquals(true, model.automaticOSUpgradePolicy().enableAutomaticOSUpgrade()); - Assertions.assertEquals(false, model.automaticOSUpgradePolicy().useRollingUpgradePolicy()); - Assertions.assertEquals(true, model.automaticOSUpgradePolicy().osRollingUpgradeDeferral()); - Assertions.assertEquals(false, model.rollingUpgradePolicy().enableCrossZoneUpgrade()); - Assertions.assertEquals(438426140, model.rollingUpgradePolicy().maxBatchInstancePercent()); - Assertions.assertEquals(1665023575, model.rollingUpgradePolicy().maxUnhealthyInstancePercent()); - Assertions.assertEquals(42464085, model.rollingUpgradePolicy().maxUnhealthyUpgradedInstancePercent()); - Assertions.assertEquals("rfdwoyu", model.rollingUpgradePolicy().pauseTimeBetweenBatches()); - Assertions.assertEquals(true, model.rollingUpgradePolicy().prioritizeUnhealthyInstances()); - Assertions.assertEquals(false, model.rollingUpgradePolicy().rollbackFailedInstancesOnPolicyBreach()); + Assertions.assertEquals(UpgradeMode.AUTOMATIC, model.mode()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().disableAutomaticRollback()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().enableAutomaticOSUpgrade()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().useRollingUpgradePolicy()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().osRollingUpgradeDeferral()); + Assertions.assertFalse(model.rollingUpgradePolicy().enableCrossZoneUpgrade()); + Assertions.assertEquals(1764475997, model.rollingUpgradePolicy().maxBatchInstancePercent()); + Assertions.assertEquals(1174017685, model.rollingUpgradePolicy().maxUnhealthyInstancePercent()); + Assertions.assertEquals(1680525224, model.rollingUpgradePolicy().maxUnhealthyUpgradedInstancePercent()); + Assertions.assertEquals("hqamvdkf", model.rollingUpgradePolicy().pauseTimeBetweenBatches()); + Assertions.assertTrue(model.rollingUpgradePolicy().prioritizeUnhealthyInstances()); + Assertions.assertFalse(model.rollingUpgradePolicy().rollbackFailedInstancesOnPolicyBreach()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UpgradePolicy model = new UpgradePolicy().withMode(UpgradeMode.ROLLING) + UpgradePolicy model = new UpgradePolicy().withMode(UpgradeMode.AUTOMATIC) .withAutomaticOSUpgradePolicy(new AutomaticOSUpgradePolicy().withDisableAutomaticRollback(false) - .withEnableAutomaticOSUpgrade(true) + .withEnableAutomaticOSUpgrade(false) .withUseRollingUpgradePolicy(false) - .withOsRollingUpgradeDeferral(true)) + .withOsRollingUpgradeDeferral(false)) .withRollingUpgradePolicy(new RollingUpgradePolicy().withEnableCrossZoneUpgrade(false) - .withMaxBatchInstancePercent(438426140) - .withMaxUnhealthyInstancePercent(1665023575) - .withMaxUnhealthyUpgradedInstancePercent(42464085) - .withPauseTimeBetweenBatches("rfdwoyu") + .withMaxBatchInstancePercent(1764475997) + .withMaxUnhealthyInstancePercent(1174017685) + .withMaxUnhealthyUpgradedInstancePercent(1680525224) + .withPauseTimeBetweenBatches("hqamvdkf") .withPrioritizeUnhealthyInstances(true) .withRollbackFailedInstancesOnPolicyBreach(false)); model = BinaryData.fromObject(model).toObject(UpgradePolicy.class); - Assertions.assertEquals(UpgradeMode.ROLLING, model.mode()); - Assertions.assertEquals(false, model.automaticOSUpgradePolicy().disableAutomaticRollback()); - Assertions.assertEquals(true, model.automaticOSUpgradePolicy().enableAutomaticOSUpgrade()); - Assertions.assertEquals(false, model.automaticOSUpgradePolicy().useRollingUpgradePolicy()); - Assertions.assertEquals(true, model.automaticOSUpgradePolicy().osRollingUpgradeDeferral()); - Assertions.assertEquals(false, model.rollingUpgradePolicy().enableCrossZoneUpgrade()); - Assertions.assertEquals(438426140, model.rollingUpgradePolicy().maxBatchInstancePercent()); - Assertions.assertEquals(1665023575, model.rollingUpgradePolicy().maxUnhealthyInstancePercent()); - Assertions.assertEquals(42464085, model.rollingUpgradePolicy().maxUnhealthyUpgradedInstancePercent()); - Assertions.assertEquals("rfdwoyu", model.rollingUpgradePolicy().pauseTimeBetweenBatches()); - Assertions.assertEquals(true, model.rollingUpgradePolicy().prioritizeUnhealthyInstances()); - Assertions.assertEquals(false, model.rollingUpgradePolicy().rollbackFailedInstancesOnPolicyBreach()); + Assertions.assertEquals(UpgradeMode.AUTOMATIC, model.mode()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().disableAutomaticRollback()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().enableAutomaticOSUpgrade()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().useRollingUpgradePolicy()); + Assertions.assertFalse(model.automaticOSUpgradePolicy().osRollingUpgradeDeferral()); + Assertions.assertFalse(model.rollingUpgradePolicy().enableCrossZoneUpgrade()); + Assertions.assertEquals(1764475997, model.rollingUpgradePolicy().maxBatchInstancePercent()); + Assertions.assertEquals(1174017685, model.rollingUpgradePolicy().maxUnhealthyInstancePercent()); + Assertions.assertEquals(1680525224, model.rollingUpgradePolicy().maxUnhealthyUpgradedInstancePercent()); + Assertions.assertEquals("hqamvdkf", model.rollingUpgradePolicy().pauseTimeBetweenBatches()); + Assertions.assertTrue(model.rollingUpgradePolicy().prioritizeUnhealthyInstances()); + Assertions.assertFalse(model.rollingUpgradePolicy().rollbackFailedInstancesOnPolicyBreach()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserAssignedIdentitiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserAssignedIdentitiesTests.java index e9b4f1e9ca17..cbc3a1cc5433 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserAssignedIdentitiesTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserAssignedIdentitiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -10,8 +10,9 @@ public final class UserAssignedIdentitiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentities model = BinaryData.fromString("{\"principalId\":\"gaudcc\",\"clientId\":\"h\"}") - .toObject(UserAssignedIdentities.class); + UserAssignedIdentities model + = BinaryData.fromString("{\"principalId\":\"tyxolniwpwc\",\"clientId\":\"jfkgiawxk\"}") + .toObject(UserAssignedIdentities.class); } @org.junit.jupiter.api.Test diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserIdentityTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserIdentityTests.java index dd2328231251..adcc1210e62b 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserIdentityTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserIdentityTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -16,21 +16,21 @@ public final class UserIdentityTests { public void testDeserialize() throws Exception { UserIdentity model = BinaryData .fromString( - "{\"userName\":\"sgsahmkycgr\",\"autoUser\":{\"scope\":\"Pool\",\"elevationLevel\":\"NonAdmin\"}}") + "{\"userName\":\"udurgkakmokz\",\"autoUser\":{\"scope\":\"Task\",\"elevationLevel\":\"Admin\"}}") .toObject(UserIdentity.class); - Assertions.assertEquals("sgsahmkycgr", model.username()); - Assertions.assertEquals(AutoUserScope.POOL, model.autoUser().scope()); - Assertions.assertEquals(ElevationLevel.NON_ADMIN, model.autoUser().elevationLevel()); + Assertions.assertEquals("udurgkakmokz", model.username()); + Assertions.assertEquals(AutoUserScope.TASK, model.autoUser().scope()); + Assertions.assertEquals(ElevationLevel.ADMIN, model.autoUser().elevationLevel()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserIdentity model = new UserIdentity().withUsername("sgsahmkycgr") + UserIdentity model = new UserIdentity().withUsername("udurgkakmokz") .withAutoUser( - new AutoUserSpecification().withScope(AutoUserScope.POOL).withElevationLevel(ElevationLevel.NON_ADMIN)); + new AutoUserSpecification().withScope(AutoUserScope.TASK).withElevationLevel(ElevationLevel.ADMIN)); model = BinaryData.fromObject(model).toObject(UserIdentity.class); - Assertions.assertEquals("sgsahmkycgr", model.username()); - Assertions.assertEquals(AutoUserScope.POOL, model.autoUser().scope()); - Assertions.assertEquals(ElevationLevel.NON_ADMIN, model.autoUser().elevationLevel()); + Assertions.assertEquals("udurgkakmokz", model.username()); + Assertions.assertEquals(AutoUserScope.TASK, model.autoUser().scope()); + Assertions.assertEquals(ElevationLevel.ADMIN, model.autoUser().elevationLevel()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMDiskSecurityProfileTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMDiskSecurityProfileTests.java index 78a987596d77..0a2fa73ceb8e 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMDiskSecurityProfileTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMDiskSecurityProfileTests.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.batch.models.DiskEncryptionSetParameters; import com.azure.resourcemanager.batch.models.SecurityEncryptionTypes; import com.azure.resourcemanager.batch.models.VMDiskSecurityProfile; import org.junit.jupiter.api.Assertions; @@ -12,16 +13,21 @@ public final class VMDiskSecurityProfileTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VMDiskSecurityProfile model = BinaryData.fromString("{\"securityEncryptionType\":\"NonPersistedTPM\"}") + VMDiskSecurityProfile model = BinaryData + .fromString( + "{\"securityEncryptionType\":\"VMGuestStateOnly\",\"diskEncryptionSet\":{\"id\":\"hzoymibmrqy\"}}") .toObject(VMDiskSecurityProfile.class); - Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, model.securityEncryptionType()); + Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, model.securityEncryptionType()); + Assertions.assertEquals("hzoymibmrqy", model.diskEncryptionSet().id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { VMDiskSecurityProfile model - = new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.NON_PERSISTED_TPM); + = new VMDiskSecurityProfile().withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) + .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId("hzoymibmrqy")); model = BinaryData.fromObject(model).toObject(VMDiskSecurityProfile.class); - Assertions.assertEquals(SecurityEncryptionTypes.NON_PERSISTED_TPM, model.securityEncryptionType()); + Assertions.assertEquals(SecurityEncryptionTypes.VMGUEST_STATE_ONLY, model.securityEncryptionType()); + Assertions.assertEquals("hzoymibmrqy", model.diskEncryptionSet().id()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMExtensionTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMExtensionTests.java index 96b64def8ae8..11cdbd50ceff 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMExtensionTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMExtensionTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -13,35 +13,35 @@ public final class VMExtensionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { VMExtension model = BinaryData.fromString( - "{\"name\":\"cjwvn\",\"publisher\":\"dldwmgxc\",\"type\":\"rslpmutwuoeg\",\"typeHandlerVersion\":\"khjwn\",\"autoUpgradeMinorVersion\":false,\"enableAutomaticUpgrade\":true,\"settings\":\"datai\",\"protectedSettings\":\"datadggkzzlvmbmpa\",\"provisionAfterExtensions\":[\"dfvue\",\"yw\",\"bpfvm\"]}") + "{\"name\":\"chkoymkcdyh\",\"publisher\":\"pkkpw\",\"type\":\"reqnovvqfov\",\"typeHandlerVersion\":\"xywsuws\",\"autoUpgradeMinorVersion\":false,\"enableAutomaticUpgrade\":true,\"settings\":\"\\\"dataytgadgvraeaene\\\"\",\"protectedSettings\":\"\\\"datazar\\\"\",\"provisionAfterExtensions\":[\"q\",\"uijfqk\",\"cewiipfpub\",\"ibwwiftohqkv\"]}") .toObject(VMExtension.class); - Assertions.assertEquals("cjwvn", model.name()); - Assertions.assertEquals("dldwmgxc", model.publisher()); - Assertions.assertEquals("rslpmutwuoeg", model.type()); - Assertions.assertEquals("khjwn", model.typeHandlerVersion()); - Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals("dfvue", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("chkoymkcdyh", model.name()); + Assertions.assertEquals("pkkpw", model.publisher()); + Assertions.assertEquals("reqnovvqfov", model.type()); + Assertions.assertEquals("xywsuws", model.typeHandlerVersion()); + Assertions.assertFalse(model.autoUpgradeMinorVersion()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); + Assertions.assertEquals("q", model.provisionAfterExtensions().get(0)); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VMExtension model = new VMExtension().withName("cjwvn") - .withPublisher("dldwmgxc") - .withType("rslpmutwuoeg") - .withTypeHandlerVersion("khjwn") + VMExtension model = new VMExtension().withName("chkoymkcdyh") + .withPublisher("pkkpw") + .withType("reqnovvqfov") + .withTypeHandlerVersion("xywsuws") .withAutoUpgradeMinorVersion(false) .withEnableAutomaticUpgrade(true) - .withSettings("datai") - .withProtectedSettings("datadggkzzlvmbmpa") - .withProvisionAfterExtensions(Arrays.asList("dfvue", "yw", "bpfvm")); + .withSettings("\"dataytgadgvraeaene\"") + .withProtectedSettings("\"datazar\"") + .withProvisionAfterExtensions(Arrays.asList("q", "uijfqk", "cewiipfpub", "ibwwiftohqkv")); model = BinaryData.fromObject(model).toObject(VMExtension.class); - Assertions.assertEquals("cjwvn", model.name()); - Assertions.assertEquals("dldwmgxc", model.publisher()); - Assertions.assertEquals("rslpmutwuoeg", model.type()); - Assertions.assertEquals("khjwn", model.typeHandlerVersion()); - Assertions.assertEquals(false, model.autoUpgradeMinorVersion()); - Assertions.assertEquals(true, model.enableAutomaticUpgrade()); - Assertions.assertEquals("dfvue", model.provisionAfterExtensions().get(0)); + Assertions.assertEquals("chkoymkcdyh", model.name()); + Assertions.assertEquals("pkkpw", model.publisher()); + Assertions.assertEquals("reqnovvqfov", model.type()); + Assertions.assertEquals("xywsuws", model.typeHandlerVersion()); + Assertions.assertFalse(model.autoUpgradeMinorVersion()); + Assertions.assertTrue(model.enableAutomaticUpgrade()); + Assertions.assertEquals("q", model.provisionAfterExtensions().get(0)); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VirtualMachineFamilyCoreQuotaTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VirtualMachineFamilyCoreQuotaTests.java index f509c5937422..e724f6354f23 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VirtualMachineFamilyCoreQuotaTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VirtualMachineFamilyCoreQuotaTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -10,13 +10,7 @@ public final class VirtualMachineFamilyCoreQuotaTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VirtualMachineFamilyCoreQuota model = BinaryData.fromString("{\"name\":\"pdappds\",\"coreQuota\":253055122}") + VirtualMachineFamilyCoreQuota model = BinaryData.fromString("{\"name\":\"p\",\"coreQuota\":264024813}") .toObject(VirtualMachineFamilyCoreQuota.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineFamilyCoreQuota model = new VirtualMachineFamilyCoreQuota(); - model = BinaryData.fromObject(model).toObject(VirtualMachineFamilyCoreQuota.class); - } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsConfigurationTests.java index da6f9a09ccdf..a03ed21c5784 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsConfigurationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -12,14 +12,14 @@ public final class WindowsConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WindowsConfiguration model - = BinaryData.fromString("{\"enableAutomaticUpdates\":false}").toObject(WindowsConfiguration.class); - Assertions.assertEquals(false, model.enableAutomaticUpdates()); + = BinaryData.fromString("{\"enableAutomaticUpdates\":true}").toObject(WindowsConfiguration.class); + Assertions.assertTrue(model.enableAutomaticUpdates()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WindowsConfiguration model = new WindowsConfiguration().withEnableAutomaticUpdates(false); + WindowsConfiguration model = new WindowsConfiguration().withEnableAutomaticUpdates(true); model = BinaryData.fromObject(model).toObject(WindowsConfiguration.class); - Assertions.assertEquals(false, model.enableAutomaticUpdates()); + Assertions.assertTrue(model.enableAutomaticUpdates()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsUserConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsUserConfigurationTests.java index 23c19fad5872..9d3866d92939 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsUserConfigurationTests.java +++ b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsUserConfigurationTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.batch.generated; @@ -13,14 +13,14 @@ public final class WindowsUserConfigurationTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { WindowsUserConfiguration model - = BinaryData.fromString("{\"loginMode\":\"Interactive\"}").toObject(WindowsUserConfiguration.class); - Assertions.assertEquals(LoginMode.INTERACTIVE, model.loginMode()); + = BinaryData.fromString("{\"loginMode\":\"Batch\"}").toObject(WindowsUserConfiguration.class); + Assertions.assertEquals(LoginMode.BATCH, model.loginMode()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - WindowsUserConfiguration model = new WindowsUserConfiguration().withLoginMode(LoginMode.INTERACTIVE); + WindowsUserConfiguration model = new WindowsUserConfiguration().withLoginMode(LoginMode.BATCH); model = BinaryData.fromObject(model).toObject(WindowsUserConfiguration.class); - Assertions.assertEquals(LoginMode.INTERACTIVE, model.loginMode()); + Assertions.assertEquals(LoginMode.BATCH, model.loginMode()); } } diff --git a/sdk/batch/azure-resourcemanager-batch/tsp-location.yaml b/sdk/batch/azure-resourcemanager-batch/tsp-location.yaml new file mode 100644 index 000000000000..965b7a4011f1 --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/batch/resource-manager/Microsoft.Batch/Batch +commit: ed16e10caee8ef2ab09f321272877d0efbec0d1e +repo: Azure/azure-rest-api-specs +additionalDirectories: