From 445dcc7ac49da8f0063ac28513d19dfdcf5f4dce Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 7 Jun 2023 05:31:14 +0000 Subject: [PATCH] CodeGen from PR 24163 in Azure/azure-rest-api-specs Merge 4a2e07c9ee2560197b24c83f770ac63b917b85a1 into 6c6b16dc98d720304633b76c8e82c282ffa9cc08 --- .../azure-resourcemanager-batch/CHANGELOG.md | 4 +- .../azure-resourcemanager-batch/README.md | 4 +- .../azure-resourcemanager-batch/SAMPLE.md | 422 +++++++++--------- sdk/batch/azure-resourcemanager-batch/pom.xml | 11 +- .../resourcemanager/batch/BatchManager.java | 2 +- .../ApplicationPackagesClientImpl.java | 15 +- .../ApplicationsClientImpl.java | 15 +- .../BatchAccountsClientImpl.java | 41 +- .../BatchManagementClientImpl.java | 2 +- .../CertificatesClientImpl.java | 22 +- .../batch/implementation/PoolsClientImpl.java | 25 +- .../PrivateEndpointConnectionsClientImpl.java | 24 +- .../PrivateLinkResourcesClientImpl.java | 6 +- .../batch/models/BatchAccountIdentity.java | 2 +- .../batch/models/BatchPoolIdentity.java | 2 +- .../batch/models/ContainerConfiguration.java | 15 +- .../batch/models/ContainerType.java | 47 ++ .../batch/models/KeyVaultProperties.java | 18 +- .../batch/models/NetworkConfiguration.java | 38 ++ .../batch/models/UserIdentity.java | 2 +- .../batch/models/VMExtension.java | 29 ++ .../generated/ApplicationCreateSamples.java | 2 +- .../generated/ApplicationDeleteSamples.java | 8 +- .../generated/ApplicationGetSamples.java | 8 +- .../generated/ApplicationListSamples.java | 8 +- .../ApplicationPackageActivateSamples.java | 5 +- .../ApplicationPackageCreateSamples.java | 2 +- .../ApplicationPackageDeleteSamples.java | 7 +- .../ApplicationPackageGetSamples.java | 7 +- .../ApplicationPackageListSamples.java | 8 +- .../generated/ApplicationUpdateSamples.java | 5 +- .../generated/BatchAccountCreateSamples.java | 10 +- .../generated/BatchAccountDeleteSamples.java | 6 +- ...BatchAccountGetByResourceGroupSamples.java | 12 +- .../BatchAccountGetDetectorSamples.java | 7 +- .../generated/BatchAccountGetKeysSamples.java | 8 +- ...atchAccountListByResourceGroupSamples.java | 6 +- .../BatchAccountListDetectorsSamples.java | 8 +- ...ndNetworkDependenciesEndpointsSamples.java | 7 +- .../generated/BatchAccountListSamples.java | 6 +- .../BatchAccountRegenerateKeySamples.java | 5 +- ...ountSynchronizeAutoStorageKeysSamples.java | 7 +- .../generated/BatchAccountUpdateSamples.java | 6 +- .../CertificateCancelDeletionSamples.java | 6 +- .../generated/CertificateCreateSamples.java | 6 +- .../generated/CertificateDeleteSamples.java | 6 +- .../generated/CertificateGetSamples.java | 10 +- .../CertificateListByBatchAccountSamples.java | 11 +- .../generated/CertificateUpdateSamples.java | 5 +- .../LocationCheckNameAvailabilitySamples.java | 13 +- .../generated/LocationGetQuotasSamples.java | 6 +- ...nListSupportedCloudServiceSkusSamples.java | 6 +- ...istSupportedVirtualMachineSkusSamples.java | 6 +- .../generated/OperationsListSamples.java | 6 +- .../batch/generated/PoolCreateSamples.java | 70 ++- .../batch/generated/PoolDeleteSamples.java | 8 +- .../PoolDisableAutoScaleSamples.java | 7 +- .../batch/generated/PoolGetSamples.java | 31 +- .../PoolListByBatchAccountSamples.java | 11 +- .../generated/PoolStopResizeSamples.java | 9 +- .../batch/generated/PoolUpdateSamples.java | 21 +- ...rivateEndpointConnectionDeleteSamples.java | 6 +- .../PrivateEndpointConnectionGetSamples.java | 6 +- ...ntConnectionListByBatchAccountSamples.java | 6 +- ...rivateEndpointConnectionUpdateSamples.java | 5 +- .../PrivateLinkResourceGetSamples.java | 7 +- ...LinkResourceListByBatchAccountSamples.java | 6 +- ...vateApplicationPackageParametersTests.java | 26 -- .../generated/ApplicationInnerTests.java | 37 -- .../ApplicationPackageInnerTests.java | 26 -- .../ApplicationPackagePropertiesTests.java | 26 -- .../ApplicationPackageReferenceTests.java | 28 -- ...PackagesActivateWithResponseMockTests.java | 75 ---- ...onPackagesCreateWithResponseMockTests.java | 68 --- ...onPackagesDeleteWithResponseMockTests.java | 62 --- ...ationPackagesGetWithResponseMockTests.java | 68 --- .../ApplicationPackagesListMockTests.java | 66 --- .../generated/ApplicationPropertiesTests.java | 37 -- ...plicationsCreateWithResponseMockTests.java | 76 ---- ...plicationsDeleteWithResponseMockTests.java | 62 --- .../ApplicationsGetWithResponseMockTests.java | 70 --- .../generated/ApplicationsListMockTests.java | 71 --- .../generated/AutoScaleSettingsTests.java | 32 -- .../AutoStorageBasePropertiesTests.java | 41 -- .../generated/AutoUserSpecificationTests.java | 33 -- .../generated/BatchAccountIdentityTests.java | 49 -- .../generated/BatchAccountKeysInnerTests.java | 25 -- .../BatchAccountListResultTests.java | 91 ---- .../BatchAccountsDeleteMockTests.java | 62 --- ...ountsGetDetectorWithResponseMockTests.java | 68 --- ...hAccountsGetKeysWithResponseMockTests.java | 64 --- .../BatchAccountsListDetectorsMockTests.java | 69 --- ...NetworkDependenciesEndpointsMockTests.java | 68 --- ...eAutoStorageKeysWithResponseMockTests.java | 62 --- .../BatchLocationQuotaInnerTests.java | 23 - .../generated/BatchPoolIdentityTests.java | 52 --- .../CertificateBasePropertiesTests.java | 37 -- .../generated/CertificateReferenceTests.java | 43 -- .../CertificatesDeleteMockTests.java | 62 --- .../CheckNameAvailabilityParametersTests.java | 26 -- ...CheckNameAvailabilityResultInnerTests.java | 25 -- .../CloudServiceConfigurationTests.java | 31 -- .../ComputeNodeIdentityReferenceTests.java | 26 -- .../batch/generated/DataDiskTests.java | 42 -- .../DeploymentConfigurationTests.java | 203 --------- .../generated/DetectorListResultTests.java | 42 -- .../generated/DetectorResponseInnerTests.java | 29 -- .../DetectorResponsePropertiesTests.java | 26 -- .../generated/DiffDiskSettingsTests.java | 27 -- .../DiskEncryptionConfigurationTests.java | 32 -- .../generated/EndpointAccessProfileTests.java | 42 -- .../generated/EndpointDependencyTests.java | 26 -- .../batch/generated/EndpointDetailTests.java | 22 - .../generated/EnvironmentSettingTests.java | 30 -- .../generated/FixedScaleSettingsTests.java | 42 -- .../batch/generated/ImageReferenceTests.java | 43 -- .../batch/generated/InboundNatPoolTests.java | 79 ---- .../batch/generated/IpRuleTests.java | 25 -- .../generated/KeyVaultReferenceTests.java | 28 -- .../ListApplicationPackagesResultTests.java | 40 -- .../ListApplicationsResultTests.java | 46 -- .../ListCertificatesResultTests.java | 47 -- .../batch/generated/ListPoolsResultTests.java | 129 ------ ...PrivateEndpointConnectionsResultTests.java | 34 -- .../ListPrivateLinkResourcesResultTests.java | 34 -- ...NameAvailabilityWithResponseMockTests.java | 69 --- ...cationsGetQuotasWithResponseMockTests.java | 63 --- ...istSupportedCloudServiceSkusMockTests.java | 66 --- ...tSupportedVirtualMachineSkusMockTests.java | 66 --- .../batch/generated/MetadataItemTests.java | 30 -- .../generated/NetworkConfigurationTests.java | 97 ---- .../batch/generated/NetworkProfileTests.java | 55 --- .../NetworkSecurityGroupRuleTests.java | 42 -- .../generated/NfsMountConfigurationTests.java | 37 -- .../NodePlacementConfigurationTests.java | 28 -- .../batch/generated/OSDiskTests.java | 30 -- .../generated/OperationDisplayTests.java | 40 -- .../batch/generated/OperationInnerTests.java | 53 --- .../generated/OperationListResultTests.java | 95 ---- .../generated/OperationsListMockTests.java | 74 --- ...undEnvironmentEndpointCollectionTests.java | 30 -- ...OutboundEnvironmentEndpointInnerTests.java | 26 -- .../PoolEndpointConfigurationTests.java | 65 --- .../PoolsCreateWithResponseMockTests.java | 140 ------ .../batch/generated/PoolsDeleteMockTests.java | 62 --- ...DisableAutoScaleWithResponseMockTests.java | 87 ---- .../PoolsGetWithResponseMockTests.java | 86 ---- .../PoolsListByBatchAccountMockTests.java | 92 ---- .../PoolsStopResizeWithResponseMockTests.java | 87 ---- .../PrivateEndpointConnectionInnerTests.java | 42 -- ...vateEndpointConnectionPropertiesTests.java | 42 -- ...ntConnectionsGetWithResponseMockTests.java | 75 ---- ...onnectionsListByBatchAccountMockTests.java | 74 --- ...ateEndpointConnectionsUpdateMockTests.java | 86 ---- .../batch/generated/PrivateEndpointTests.java | 22 - .../PrivateLinkResourceInnerTests.java | 26 -- .../PrivateLinkResourcePropertiesTests.java | 26 -- ...LinkResourcesGetWithResponseMockTests.java | 68 --- ...kResourcesListByBatchAccountMockTests.java | 66 --- ...rivateLinkServiceConnectionStateTests.java | 35 -- .../PublicIpAddressConfigurationTests.java | 35 -- .../batch/generated/ResourceFileTests.java | 50 --- .../batch/generated/ScaleSettingsTests.java | 56 --- .../batch/generated/SkuCapabilityTests.java | 23 - .../generated/SupportedSkuInnerTests.java | 26 -- .../generated/SupportedSkusResultTests.java | 28 -- .../generated/TaskSchedulingPolicyTests.java | 27 -- .../UserAssignedIdentitiesTests.java | 25 -- .../batch/generated/UserIdentityTests.java | 41 -- .../batch/generated/VMExtensionTests.java | 49 -- .../VirtualMachineFamilyCoreQuotaTests.java | 25 -- .../generated/WindowsConfigurationTests.java | 26 -- .../WindowsUserConfigurationTests.java | 27 -- 173 files changed, 644 insertions(+), 5899 deletions(-) create mode 100644 sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerType.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ActivateApplicationPackageParametersTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagePropertiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageReferenceTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesActivateWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesCreateWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesDeleteWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesGetWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesListMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPropertiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsCreateWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsDeleteWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsGetWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsListMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoScaleSettingsTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoStorageBasePropertiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoUserSpecificationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountIdentityTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountKeysInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountListResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsDeleteMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetDetectorWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetKeysWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListDetectorsMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListOutboundNetworkDependenciesEndpointsMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsSynchronizeAutoStorageKeysWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchLocationQuotaInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchPoolIdentityTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateBasePropertiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateReferenceTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificatesDeleteMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityParametersTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityResultInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CloudServiceConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ComputeNodeIdentityReferenceTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DataDiskTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DeploymentConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorListResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponseInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponsePropertiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiffDiskSettingsTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointAccessProfileTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDependencyTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDetailTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EnvironmentSettingTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/FixedScaleSettingsTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ImageReferenceTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/InboundNatPoolTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IpRuleTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/KeyVaultReferenceTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationPackagesResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationsResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListCertificatesResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPoolsResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateEndpointConnectionsResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateLinkResourcesResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsGetQuotasWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedCloudServiceSkusMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedVirtualMachineSkusMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/MetadataItemTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkProfileTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityGroupRuleTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NfsMountConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NodePlacementConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OSDiskTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationDisplayTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationListResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationsListMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointCollectionTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolEndpointConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsCreateWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDeleteMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDisableAutoScaleWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsGetWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsListByBatchAccountMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsStopResizeWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsListByBatchAccountMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsUpdateMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesGetWithResponseMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesListByBatchAccountMockTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkServiceConnectionStateTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PublicIpAddressConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceFileTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ScaleSettingsTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SkuCapabilityTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkuInnerTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkusResultTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/TaskSchedulingPolicyTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserAssignedIdentitiesTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserIdentityTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMExtensionTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VirtualMachineFamilyCoreQuotaTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsConfigurationTests.java delete mode 100644 sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsUserConfigurationTests.java diff --git a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md index ad1e9150cee8..be65f804c342 100644 --- a/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md +++ b/sdk/batch/azure-resourcemanager-batch/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.1.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2023-06-07) + +- Azure Resource Manager Batch client library for Java. This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/batch/azure-resourcemanager-batch/README.md b/sdk/batch/azure-resourcemanager-batch/README.md index 82c425dd1c2a..ed7eeed94882 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-2022-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for Batch Management SDK. Batch Client. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-batch - 1.1.0-beta.1 + 1.1.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md index bb15dca6c15b..e22a878e56b1 100644 --- a/sdk/batch/azure-resourcemanager-batch/SAMPLE.md +++ b/sdk/batch/azure-resourcemanager-batch/SAMPLE.md @@ -79,7 +79,7 @@ /** Samples for Application Create. */ public final class ApplicationCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationCreate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationCreate.json */ /** * Sample code: ApplicationCreate. @@ -101,12 +101,10 @@ public final class ApplicationCreateSamples { ### Application_Delete ```java -import com.azure.core.util.Context; - /** Samples for Application Delete. */ public final class ApplicationDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationDelete.json */ /** * Sample code: ApplicationDelete. @@ -114,7 +112,9 @@ public final class ApplicationDeleteSamples { * @param manager Entry point to BatchManager. */ public static void applicationDelete(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applications().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + manager + .applications() + .deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE); } } ``` @@ -122,12 +122,10 @@ public final class ApplicationDeleteSamples { ### Application_Get ```java -import com.azure.core.util.Context; - /** Samples for Application Get. */ public final class ApplicationGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationGet.json */ /** * Sample code: ApplicationGet. @@ -135,7 +133,9 @@ public final class ApplicationGetSamples { * @param manager Entry point to BatchManager. */ public static void applicationGet(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + manager + .applications() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE); } } ``` @@ -143,12 +143,10 @@ public final class ApplicationGetSamples { ### Application_List ```java -import com.azure.core.util.Context; - /** Samples for Application List. */ public final class ApplicationListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationList.json */ /** * Sample code: ApplicationList. @@ -156,7 +154,9 @@ public final class ApplicationListSamples { * @param manager Entry point to BatchManager. */ public static void applicationList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applications().list("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + manager + .applications() + .list("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE); } } ``` @@ -164,13 +164,12 @@ public final class ApplicationListSamples { ### Application_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.Application; /** Samples for Application Update. */ public final class ApplicationUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationUpdate.json */ /** * Sample code: ApplicationUpdate. @@ -181,7 +180,7 @@ public final class ApplicationUpdateSamples { Application resource = manager .applications() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE) + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withDisplayName("myAppName").withAllowUpdates(true).withDefaultVersion("2").apply(); } @@ -191,13 +190,12 @@ public final class ApplicationUpdateSamples { ### ApplicationPackage_Activate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; /** Samples for ApplicationPackage Activate. */ public final class ApplicationPackageActivateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageActivate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageActivate.json */ /** * Sample code: ApplicationPackageActivate. @@ -213,7 +211,7 @@ public final class ApplicationPackageActivateSamples { "app1", "1", new ActivateApplicationPackageParameters().withFormat("zip"), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -224,7 +222,7 @@ public final class ApplicationPackageActivateSamples { /** Samples for ApplicationPackage Create. */ public final class ApplicationPackageCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageCreate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageCreate.json */ /** * Sample code: ApplicationPackageCreate. @@ -244,12 +242,10 @@ public final class ApplicationPackageCreateSamples { ### ApplicationPackage_Delete ```java -import com.azure.core.util.Context; - /** Samples for ApplicationPackage Delete. */ public final class ApplicationPackageDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageDelete.json */ /** * Sample code: ApplicationPackageDelete. @@ -259,7 +255,8 @@ public final class ApplicationPackageDeleteSamples { public static void applicationPackageDelete(com.azure.resourcemanager.batch.BatchManager manager) { manager .applicationPackages() - .deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); + .deleteWithResponse( + "default-azurebatch-japaneast", "sampleacct", "app1", "1", com.azure.core.util.Context.NONE); } } ``` @@ -267,12 +264,10 @@ public final class ApplicationPackageDeleteSamples { ### ApplicationPackage_Get ```java -import com.azure.core.util.Context; - /** Samples for ApplicationPackage Get. */ public final class ApplicationPackageGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageGet.json */ /** * Sample code: ApplicationPackageGet. @@ -282,7 +277,8 @@ public final class ApplicationPackageGetSamples { public static void applicationPackageGet(com.azure.resourcemanager.batch.BatchManager manager) { manager .applicationPackages() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "app1", "1", com.azure.core.util.Context.NONE); } } ``` @@ -290,12 +286,10 @@ public final class ApplicationPackageGetSamples { ### ApplicationPackage_List ```java -import com.azure.core.util.Context; - /** Samples for ApplicationPackage List. */ public final class ApplicationPackageListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageList.json */ /** * Sample code: ApplicationPackageList. @@ -303,7 +297,9 @@ public final class ApplicationPackageListSamples { * @param manager Entry point to BatchManager. */ public static void applicationPackageList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applicationPackages().list("default-azurebatch-japaneast", "sampleacct", "app1", null, Context.NONE); + manager + .applicationPackages() + .list("default-azurebatch-japaneast", "sampleacct", "app1", null, com.azure.core.util.Context.NONE); } } ``` @@ -324,7 +320,7 @@ import java.util.Map; /** Samples for BatchAccount Create. */ public final class BatchAccountCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_BYOS.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_BYOS.json */ /** * Sample code: BatchAccountCreate_BYOS. @@ -351,7 +347,7 @@ public final class BatchAccountCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_UserAssignedIdentity.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_UserAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_UserAssignedIdentity. @@ -379,7 +375,7 @@ public final class BatchAccountCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateBatchAccountCreate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateBatchAccountCreate.json */ /** * Sample code: PrivateBatchAccountCreate. @@ -406,7 +402,7 @@ public final class BatchAccountCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_SystemAssignedIdentity.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_SystemAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_SystemAssignedIdentity. @@ -428,7 +424,7 @@ public final class BatchAccountCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_Default.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_Default.json */ /** * Sample code: BatchAccountCreate_Default. @@ -464,12 +460,10 @@ public final class BatchAccountCreateSamples { ### BatchAccount_Delete ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount Delete. */ public final class BatchAccountDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountDelete.json */ /** * Sample code: BatchAccountDelete. @@ -477,7 +471,7 @@ public final class BatchAccountDeleteSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountDelete(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().delete("default-azurebatch-japaneast", "sampleacct", Context.NONE); + manager.batchAccounts().delete("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } ``` @@ -485,12 +479,10 @@ public final class BatchAccountDeleteSamples { ### BatchAccount_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount GetByResourceGroup. */ public final class BatchAccountGetByResourceGroupSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateBatchAccountGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateBatchAccountGet.json */ /** * Sample code: PrivateBatchAccountGet. @@ -500,11 +492,12 @@ public final class BatchAccountGetByResourceGroupSamples { public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .getByResourceGroupWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountGet.json */ /** * Sample code: BatchAccountGet. @@ -514,7 +507,8 @@ public final class BatchAccountGetByResourceGroupSamples { public static void batchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .getByResourceGroupWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } ``` @@ -522,12 +516,10 @@ public final class BatchAccountGetByResourceGroupSamples { ### BatchAccount_GetDetector ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount GetDetector. */ public final class BatchAccountGetDetectorSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/DetectorGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/DetectorGet.json */ /** * Sample code: GetDetector. @@ -537,7 +529,8 @@ public final class BatchAccountGetDetectorSamples { public static void getDetector(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .getDetectorWithResponse("default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", Context.NONE); + .getDetectorWithResponse( + "default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", com.azure.core.util.Context.NONE); } } ``` @@ -545,12 +538,10 @@ public final class BatchAccountGetDetectorSamples { ### BatchAccount_GetKeys ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount GetKeys. */ public final class BatchAccountGetKeysSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountGetKeys.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountGetKeys.json */ /** * Sample code: BatchAccountGetKeys. @@ -558,7 +549,9 @@ public final class BatchAccountGetKeysSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountGetKeys(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + manager + .batchAccounts() + .getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } ``` @@ -566,12 +559,10 @@ public final class BatchAccountGetKeysSamples { ### BatchAccount_List ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount List. */ public final class BatchAccountListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountList.json */ /** * Sample code: BatchAccountList. @@ -579,7 +570,7 @@ public final class BatchAccountListSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().list(Context.NONE); + manager.batchAccounts().list(com.azure.core.util.Context.NONE); } } ``` @@ -587,12 +578,10 @@ public final class BatchAccountListSamples { ### BatchAccount_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount ListByResourceGroup. */ public final class BatchAccountListByResourceGroupSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountListByResourceGroup.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountListByResourceGroup.json */ /** * Sample code: BatchAccountListByResourceGroup. @@ -600,7 +589,7 @@ public final class BatchAccountListByResourceGroupSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountListByResourceGroup(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().listByResourceGroup("default-azurebatch-japaneast", Context.NONE); + manager.batchAccounts().listByResourceGroup("default-azurebatch-japaneast", com.azure.core.util.Context.NONE); } } ``` @@ -608,12 +597,10 @@ public final class BatchAccountListByResourceGroupSamples { ### BatchAccount_ListDetectors ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount ListDetectors. */ public final class BatchAccountListDetectorsSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/DetectorList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/DetectorList.json */ /** * Sample code: ListDetectors. @@ -621,7 +608,9 @@ public final class BatchAccountListDetectorsSamples { * @param manager Entry point to BatchManager. */ public static void listDetectors(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().listDetectors("default-azurebatch-japaneast", "sampleacct", Context.NONE); + manager + .batchAccounts() + .listDetectors("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } ``` @@ -629,12 +618,10 @@ public final class BatchAccountListDetectorsSamples { ### BatchAccount_ListOutboundNetworkDependenciesEndpoints ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount ListOutboundNetworkDependenciesEndpoints. */ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json */ /** * Sample code: ListOutboundNetworkDependencies. @@ -644,7 +631,8 @@ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { public static void listOutboundNetworkDependencies(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .listOutboundNetworkDependenciesEndpoints("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .listOutboundNetworkDependenciesEndpoints( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } ``` @@ -652,14 +640,13 @@ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { ### BatchAccount_RegenerateKey ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.AccountKeyType; import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters; /** Samples for BatchAccount RegenerateKey. */ public final class BatchAccountRegenerateKeySamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountRegenerateKey.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountRegenerateKey.json */ /** * Sample code: BatchAccountRegenerateKey. @@ -673,7 +660,7 @@ public final class BatchAccountRegenerateKeySamples { "default-azurebatch-japaneast", "sampleacct", new BatchAccountRegenerateKeyParameters().withKeyName(AccountKeyType.PRIMARY), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -681,12 +668,10 @@ public final class BatchAccountRegenerateKeySamples { ### BatchAccount_SynchronizeAutoStorageKeys ```java -import com.azure.core.util.Context; - /** Samples for BatchAccount SynchronizeAutoStorageKeys. */ public final class BatchAccountSynchronizeAutoStorageKeysSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountSynchronizeAutoStorageKeys.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountSynchronizeAutoStorageKeys.json */ /** * Sample code: BatchAccountSynchronizeAutoStorageKeys. @@ -696,7 +681,8 @@ public final class BatchAccountSynchronizeAutoStorageKeysSamples { public static void batchAccountSynchronizeAutoStorageKeys(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .synchronizeAutoStorageKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .synchronizeAutoStorageKeysWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } ``` @@ -704,14 +690,13 @@ public final class BatchAccountSynchronizeAutoStorageKeysSamples { ### BatchAccount_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; import com.azure.resourcemanager.batch.models.BatchAccount; /** Samples for BatchAccount Update. */ public final class BatchAccountUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountUpdate.json */ /** * Sample code: BatchAccountUpdate. @@ -722,7 +707,8 @@ public final class BatchAccountUpdateSamples { BatchAccount resource = manager .batchAccounts() - .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE) + .getByResourceGroupWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -738,12 +724,10 @@ public final class BatchAccountUpdateSamples { ### Certificate_CancelDeletion ```java -import com.azure.core.util.Context; - /** Samples for Certificate CancelDeletion. */ public final class CertificateCancelDeletionSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCancelDeletion.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCancelDeletion.json */ /** * Sample code: CertificateCancelDeletion. @@ -757,7 +741,7 @@ public final class CertificateCancelDeletionSamples { "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -770,7 +754,7 @@ import com.azure.resourcemanager.batch.models.CertificateFormat; /** Samples for Certificate Create. */ public final class CertificateCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_Full.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_Full.json */ /** * Sample code: CreateCertificate - Full. @@ -790,7 +774,7 @@ public final class CertificateCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_Minimal.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_Minimal.json */ /** * Sample code: CreateCertificate - Minimal Pfx. @@ -807,7 +791,7 @@ public final class CertificateCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_MinimalCer.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_MinimalCer.json */ /** * Sample code: CreateCertificate - Minimal Cer. @@ -828,12 +812,10 @@ public final class CertificateCreateSamples { ### Certificate_Delete ```java -import com.azure.core.util.Context; - /** Samples for Certificate Delete. */ public final class CertificateDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateDelete.json */ /** * Sample code: CertificateDelete. @@ -847,7 +829,7 @@ public final class CertificateDeleteSamples { "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -855,12 +837,10 @@ public final class CertificateDeleteSamples { ### Certificate_Get ```java -import com.azure.core.util.Context; - /** Samples for Certificate Get. */ public final class CertificateGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateGetWithDeletionError.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateGetWithDeletionError.json */ /** * Sample code: Get Certificate with Deletion Error. @@ -874,11 +854,11 @@ public final class CertificateGetSamples { "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateGet.json */ /** * Sample code: Get Certificate. @@ -892,7 +872,7 @@ public final class CertificateGetSamples { "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -900,12 +880,10 @@ public final class CertificateGetSamples { ### Certificate_ListByBatchAccount ```java -import com.azure.core.util.Context; - /** Samples for Certificate ListByBatchAccount. */ public final class CertificateListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateListWithFilter.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateListWithFilter.json */ /** * Sample code: ListCertificates - Filter and Select. @@ -922,11 +900,11 @@ public final class CertificateListByBatchAccountSamples { "properties/format,properties/provisioningState", "properties/provisioningStateTransitionTime gt '2017-05-01' or properties/provisioningState eq" + " 'Failed'", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateList.json */ /** * Sample code: ListCertificates. @@ -936,7 +914,8 @@ public final class CertificateListByBatchAccountSamples { public static void listCertificates(com.azure.resourcemanager.batch.BatchManager manager) { manager .certificates() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 1, null, null, Context.NONE); + .listByBatchAccount( + "default-azurebatch-japaneast", "sampleacct", 1, null, null, com.azure.core.util.Context.NONE); } } ``` @@ -944,13 +923,12 @@ public final class CertificateListByBatchAccountSamples { ### Certificate_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.Certificate; /** Samples for Certificate Update. */ public final class CertificateUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateUpdate.json */ /** * Sample code: UpdateCertificate. @@ -965,7 +943,7 @@ public final class CertificateUpdateSamples { "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE) + com.azure.core.util.Context.NONE) .getValue(); resource.update().withData("MIIJsgIBAzCCCW4GCSqGSIb3DQE...").withPassword("").apply(); } @@ -975,13 +953,12 @@ public final class CertificateUpdateSamples { ### Location_CheckNameAvailability ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; /** Samples for Location CheckNameAvailability. */ public final class LocationCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_AlreadyExists.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationCheckNameAvailability_AlreadyExists.json */ /** * Sample code: LocationCheckNameAvailability_AlreadyExists. @@ -993,11 +970,13 @@ public final class LocationCheckNameAvailabilitySamples { manager .locations() .checkNameAvailabilityWithResponse( - "japaneast", new CheckNameAvailabilityParameters().withName("existingaccountname"), Context.NONE); + "japaneast", + new CheckNameAvailabilityParameters().withName("existingaccountname"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_Available.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationCheckNameAvailability_Available.json */ /** * Sample code: LocationCheckNameAvailability_Available. @@ -1008,7 +987,9 @@ public final class LocationCheckNameAvailabilitySamples { manager .locations() .checkNameAvailabilityWithResponse( - "japaneast", new CheckNameAvailabilityParameters().withName("newaccountname"), Context.NONE); + "japaneast", + new CheckNameAvailabilityParameters().withName("newaccountname"), + com.azure.core.util.Context.NONE); } } ``` @@ -1016,12 +997,10 @@ public final class LocationCheckNameAvailabilitySamples { ### Location_GetQuotas ```java -import com.azure.core.util.Context; - /** Samples for Location GetQuotas. */ public final class LocationGetQuotasSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationGetQuotas.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationGetQuotas.json */ /** * Sample code: LocationGetQuotas. @@ -1029,7 +1008,7 @@ public final class LocationGetQuotasSamples { * @param manager Entry point to BatchManager. */ public static void locationGetQuotas(com.azure.resourcemanager.batch.BatchManager manager) { - manager.locations().getQuotasWithResponse("japaneast", Context.NONE); + manager.locations().getQuotasWithResponse("japaneast", com.azure.core.util.Context.NONE); } } ``` @@ -1037,12 +1016,10 @@ public final class LocationGetQuotasSamples { ### Location_ListSupportedCloudServiceSkus ```java -import com.azure.core.util.Context; - /** Samples for Location ListSupportedCloudServiceSkus. */ public final class LocationListSupportedCloudServiceSkusSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListCloudServiceSkus.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationListCloudServiceSkus.json */ /** * Sample code: LocationListCloudServiceSkus. @@ -1050,7 +1027,7 @@ public final class LocationListSupportedCloudServiceSkusSamples { * @param manager Entry point to BatchManager. */ public static void locationListCloudServiceSkus(com.azure.resourcemanager.batch.BatchManager manager) { - manager.locations().listSupportedCloudServiceSkus("japaneast", null, null, Context.NONE); + manager.locations().listSupportedCloudServiceSkus("japaneast", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1058,12 +1035,10 @@ public final class LocationListSupportedCloudServiceSkusSamples { ### Location_ListSupportedVirtualMachineSkus ```java -import com.azure.core.util.Context; - /** Samples for Location ListSupportedVirtualMachineSkus. */ public final class LocationListSupportedVirtualMachineSkusSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListVirtualMachineSkus.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationListVirtualMachineSkus.json */ /** * Sample code: LocationListVirtualMachineSkus. @@ -1071,7 +1046,7 @@ public final class LocationListSupportedVirtualMachineSkusSamples { * @param manager Entry point to BatchManager. */ public static void locationListVirtualMachineSkus(com.azure.resourcemanager.batch.BatchManager manager) { - manager.locations().listSupportedVirtualMachineSkus("japaneast", null, null, Context.NONE); + manager.locations().listSupportedVirtualMachineSkus("japaneast", null, null, com.azure.core.util.Context.NONE); } } ``` @@ -1079,12 +1054,10 @@ public final class LocationListSupportedVirtualMachineSkusSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/OperationsList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/OperationsList.json */ /** * Sample code: OperationsList. @@ -1092,7 +1065,7 @@ public final class OperationsListSamples { * @param manager Entry point to BatchManager. */ public static void operationsList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -1160,7 +1133,7 @@ import java.util.Map; /** Samples for Pool Create. */ public final class PoolCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_SharedImageGallery.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_SharedImageGallery.json */ /** * Sample code: CreatePool - Custom Image. @@ -1186,7 +1159,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_CloudServiceConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_CloudServiceConfiguration.json */ /** * Sample code: CreatePool - Full CloudServiceConfiguration. @@ -1285,7 +1258,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json */ /** * Sample code: CreatePool - Minimal CloudServiceConfiguration. @@ -1307,7 +1280,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Minimal VirtualMachineConfiguration. @@ -1342,7 +1315,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_NoPublicIPAddresses.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_NoPublicIPAddresses.json */ /** * Sample code: CreatePool - No public IP. @@ -1375,7 +1348,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration Extensions. @@ -1404,22 +1377,16 @@ public final class PoolCreateSamples { .asList( new VMExtension() .withName("batchextension1") - .withPublisher("Microsoft.Azure.Security.Monitoring") - .withType("SecurityMonitoringForLinux") - .withTypeHandlerVersion("1.0") + .withPublisher("Microsoft.Azure.KeyVault") + .withType("KeyVaultForLinux") + .withTypeHandlerVersion("2.0") .withAutoUpgradeMinorVersion(true) + .withEnableAutomaticUpgrade(true) .withSettings( SerializerFactory .createDefaultManagementSerializerAdapter() .deserialize( - "{\"settingsKey\":\"settingsValue\"}", - Object.class, - SerializerEncoding.JSON)) - .withProtectedSettings( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"protectedSettingsKey\":\"protectedSettingsValue\"}", + "{\"authenticationSettingsKey\":\"authenticationSettingsValue\",\"secretsManagementSettingsKey\":\"secretsManagementSettingsValue\"}", Object.class, SerializerEncoding.JSON)))))) .withScaleSettings( @@ -1433,7 +1400,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_UserAssignedIdentities.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_UserAssignedIdentities.json */ /** * Sample code: CreatePool - UserAssignedIdentities. @@ -1476,7 +1443,7 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_PublicIPs.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_PublicIPs.json */ /** * Sample code: CreatePool - Public IPs. @@ -1513,7 +1480,43 @@ public final class PoolCreateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_VirtualMachineConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-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/2023-05-01/examples/PoolCreate_VirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Full VirtualMachineConfiguration. @@ -1614,12 +1617,10 @@ public final class PoolCreateSamples { ### Pool_Delete ```java -import com.azure.core.util.Context; - /** Samples for Pool Delete. */ public final class PoolDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolDelete.json */ /** * Sample code: DeletePool. @@ -1627,7 +1628,9 @@ public final class PoolDeleteSamples { * @param manager Entry point to BatchManager. */ public static void deletePool(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().delete("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .delete("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } ``` @@ -1635,12 +1638,10 @@ public final class PoolDeleteSamples { ### Pool_DisableAutoScale ```java -import com.azure.core.util.Context; - /** Samples for Pool DisableAutoScale. */ public final class PoolDisableAutoScaleSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolDisableAutoScale.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolDisableAutoScale.json */ /** * Sample code: Disable AutoScale. @@ -1650,7 +1651,8 @@ public final class PoolDisableAutoScaleSamples { public static void disableAutoScale(com.azure.resourcemanager.batch.BatchManager manager) { manager .pools() - .disableAutoScaleWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + .disableAutoScaleWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } ``` @@ -1658,12 +1660,10 @@ public final class PoolDisableAutoScaleSamples { ### Pool_Get ```java -import com.azure.core.util.Context; - /** Samples for Pool Get. */ public final class PoolGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: GetPool - VirtualMachineConfiguration Extensions. @@ -1672,11 +1672,29 @@ public final class PoolGetSamples { */ public static void getPoolVirtualMachineConfigurationExtensions( com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet_AcceleratedNetworking.json + */ + /** + * Sample code: GetPool - AcceleratedNetworking. + * + * @param manager Entry point to BatchManager. + */ + public static void getPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet.json */ /** * Sample code: GetPool. @@ -1684,7 +1702,10 @@ public final class PoolGetSamples { * @param manager Entry point to BatchManager. */ public static void getPool(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } ``` @@ -1692,12 +1713,10 @@ public final class PoolGetSamples { ### Pool_ListByBatchAccount ```java -import com.azure.core.util.Context; - /** Samples for Pool ListByBatchAccount. */ public final class PoolListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolList.json */ /** * Sample code: ListPool. @@ -1707,11 +1726,12 @@ public final class PoolListByBatchAccountSamples { public static void listPool(com.azure.resourcemanager.batch.BatchManager manager) { manager .pools() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, null, null, Context.NONE); + .listByBatchAccount( + "default-azurebatch-japaneast", "sampleacct", null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolListWithFilter.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolListWithFilter.json */ /** * Sample code: ListPoolWithFilter. @@ -1728,7 +1748,7 @@ public final class PoolListByBatchAccountSamples { "properties/allocationState,properties/provisioningStateTransitionTime,properties/currentDedicatedNodes,properties/currentLowPriorityNodes", "startswith(name, 'po') or (properties/allocationState eq 'Steady' and" + " properties/provisioningStateTransitionTime lt datetime'2017-02-02')", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1736,12 +1756,10 @@ public final class PoolListByBatchAccountSamples { ### Pool_StopResize ```java -import com.azure.core.util.Context; - /** Samples for Pool StopResize. */ public final class PoolStopResizeSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolStopResize.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolStopResize.json */ /** * Sample code: StopPoolResize. @@ -1749,7 +1767,10 @@ public final class PoolStopResizeSamples { * @param manager Entry point to BatchManager. */ public static void stopPoolResize(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().stopResizeWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .stopResizeWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } ``` @@ -1757,7 +1778,6 @@ public final class PoolStopResizeSamples { ### Pool_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.ApplicationPackageReference; import com.azure.resourcemanager.batch.models.AutoScaleSettings; import com.azure.resourcemanager.batch.models.CertificateReference; @@ -1775,7 +1795,7 @@ import java.util.Arrays; /** Samples for Pool Update. */ public final class PoolUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_EnableAutoScale.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_EnableAutoScale.json */ /** * Sample code: UpdatePool - Enable Autoscale. @@ -1786,7 +1806,8 @@ public final class PoolUpdateSamples { Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -1796,7 +1817,7 @@ public final class PoolUpdateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_RemoveStartTask.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_RemoveStartTask.json */ /** * Sample code: UpdatePool - Remove Start Task. @@ -1807,13 +1828,14 @@ public final class PoolUpdateSamples { Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource.update().withStartTask(new StartTask()).apply(); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_ResizePool.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_ResizePool.json */ /** * Sample code: UpdatePool - Resize Pool. @@ -1824,7 +1846,8 @@ public final class PoolUpdateSamples { Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -1840,7 +1863,7 @@ public final class PoolUpdateSamples { } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_OtherProperties.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_OtherProperties.json */ /** * Sample code: UpdatePool - Other Properties. @@ -1851,7 +1874,8 @@ public final class PoolUpdateSamples { Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -1883,12 +1907,10 @@ public final class PoolUpdateSamples { ### PrivateEndpointConnection_Delete ```java -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnection Delete. */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionDelete.json */ /** * Sample code: PrivateEndpointConnectionDelete. @@ -1902,7 +1924,7 @@ public final class PrivateEndpointConnectionDeleteSamples { "default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1910,12 +1932,10 @@ public final class PrivateEndpointConnectionDeleteSamples { ### PrivateEndpointConnection_Get ```java -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnection Get. */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionGet.json */ /** * Sample code: GetPrivateEndpointConnection. @@ -1929,7 +1949,7 @@ public final class PrivateEndpointConnectionGetSamples { "default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1937,12 +1957,10 @@ public final class PrivateEndpointConnectionGetSamples { ### PrivateEndpointConnection_ListByBatchAccount ```java -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnection ListByBatchAccount. */ public final class PrivateEndpointConnectionListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionsList.json */ /** * Sample code: ListPrivateEndpointConnections. @@ -1952,7 +1970,7 @@ public final class PrivateEndpointConnectionListByBatchAccountSamples { public static void listPrivateEndpointConnections(com.azure.resourcemanager.batch.BatchManager manager) { manager .privateEndpointConnections() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE); } } ``` @@ -1960,7 +1978,6 @@ public final class PrivateEndpointConnectionListByBatchAccountSamples { ### PrivateEndpointConnection_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; @@ -1968,7 +1985,7 @@ import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus /** Samples for PrivateEndpointConnection Update. */ public final class PrivateEndpointConnectionUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionUpdate.json */ /** * Sample code: UpdatePrivateEndpointConnection. @@ -1988,7 +2005,7 @@ public final class PrivateEndpointConnectionUpdateSamples { .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) .withDescription("Approved by xyz.abc@company.com")), null, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1996,12 +2013,10 @@ public final class PrivateEndpointConnectionUpdateSamples { ### PrivateLinkResource_Get ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResource Get. */ public final class PrivateLinkResourceGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateLinkResourceGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateLinkResourceGet.json */ /** * Sample code: GetPrivateLinkResource. @@ -2011,7 +2026,8 @@ public final class PrivateLinkResourceGetSamples { public static void getPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { manager .privateLinkResources() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "batchAccount", Context.NONE); + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "batchAccount", com.azure.core.util.Context.NONE); } } ``` @@ -2019,12 +2035,10 @@ public final class PrivateLinkResourceGetSamples { ### PrivateLinkResource_ListByBatchAccount ```java -import com.azure.core.util.Context; - /** Samples for PrivateLinkResource ListByBatchAccount. */ public final class PrivateLinkResourceListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateLinkResourcesList.json */ /** * Sample code: ListPrivateLinkResource. @@ -2034,7 +2048,7 @@ public final class PrivateLinkResourceListByBatchAccountSamples { public static void listPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { manager .privateLinkResources() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml index 365e7cee91d1..dbc67cc9d869 100644 --- a/sdk/batch/azure-resourcemanager-batch/pom.xml +++ b/sdk/batch/azure-resourcemanager-batch/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ jar Microsoft Azure SDK for Batch Management - This package contains Microsoft Azure SDK for Batch Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Batch Client. Package tag package-2022-10. + 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-2023-05. https://github.com/Azure/azure-sdk-for-java @@ -38,8 +43,8 @@ UTF-8 - true - true + 0 + 0 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 e474055ae072..fbce220efc6e 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 @@ -235,7 +235,7 @@ public BatchManager authenticate(TokenCredential credential, AzureProfile profil .append("-") .append("com.azure.resourcemanager.batch") .append("/") - .append("1.1.0-beta.1"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") 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 8cffa2c9b800..04855fd34490 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 @@ -63,8 +63,7 @@ public final class ApplicationPackagesClientImpl implements ApplicationPackagesC public interface ApplicationPackagesService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}/versions/{versionName}/activate") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}/activate") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> activate( @@ -81,8 +80,7 @@ Mono> activate( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}/versions/{versionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -99,8 +97,7 @@ Mono> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}/versions/{versionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -116,8 +113,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}/versions/{versionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -133,8 +129,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}/versions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( 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 1c997182dbab..6b629109e998 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 @@ -62,8 +62,7 @@ public final class ApplicationsClientImpl implements ApplicationsClient { public interface ApplicationsService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @@ -79,8 +78,7 @@ Mono> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -95,8 +93,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -111,8 +108,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications/{applicationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -128,8 +124,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/applications") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( 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 417437735459..75c83298b502 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 @@ -76,8 +76,7 @@ public final class BatchAccountsClientImpl implements BatchAccountsClient { public interface BatchAccountsService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -92,8 +91,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -108,8 +106,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -123,8 +120,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -149,8 +145,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch" - + "/batchAccounts") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -163,8 +158,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/syncAutoStorageKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/syncAutoStorageKeys") @ExpectedResponses({204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> synchronizeAutoStorageKeys( @@ -178,8 +172,7 @@ Mono> synchronizeAutoStorageKeys( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/regenerateKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/regenerateKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> regenerateKey( @@ -194,8 +187,7 @@ Mono> regenerateKey( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/listKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/listKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getKeys( @@ -209,8 +201,7 @@ Mono> getKeys( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/detectors") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/detectors") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listDetectors( @@ -224,8 +215,7 @@ Mono> listDetectors( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/detectors/{detectorId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/detectors/{detectorId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getDetector( @@ -240,8 +230,7 @@ Mono> getDetector( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/outboundNetworkDependenciesEndpoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/outboundNetworkDependenciesEndpoints") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listOutboundNetworkDependenciesEndpoints( @@ -487,7 +476,7 @@ private PollerFlux, BatchAccountInner> beginCreate @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchAccountInner> beginCreate( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters) { - return beginCreateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, accountName, parameters).getSyncPoller(); } /** @@ -509,7 +498,7 @@ public SyncPoller, BatchAccountInner> beginCreate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, BatchAccountInner> beginCreate( String resourceGroupName, String accountName, BatchAccountCreateParameters parameters, Context context) { - return beginCreateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); + return this.beginCreateAsync(resourceGroupName, accountName, parameters, context).getSyncPoller(); } /** @@ -910,7 +899,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) { - return beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, accountName).getSyncPoller(); } /** @@ -927,7 +916,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller(); } /** 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 74c88b27e64a..36b566aae7c7 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 @@ -247,7 +247,7 @@ public PoolsClient getPools() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-10-01"; + this.apiVersion = "2023-05-01"; this.batchAccounts = new BatchAccountsClientImpl(this); this.applicationPackages = new ApplicationPackagesClientImpl(this); this.applications = new ApplicationsClientImpl(this); diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java index 4679a6c540a8..c4e692a7d921 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/implementation/CertificatesClientImpl.java @@ -73,8 +73,7 @@ public final class CertificatesClientImpl implements CertificatesClient { public interface CertificatesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/certificates") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByBatchAccount( @@ -91,8 +90,7 @@ Mono> listByBatchAccount( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/certificates/{certificateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono create( @@ -110,8 +108,7 @@ Mono create( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/certificates/{certificateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono update( @@ -128,8 +125,7 @@ Mono update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/certificates/{certificateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -144,8 +140,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/certificates/{certificateName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono get( @@ -160,8 +155,7 @@ Mono get( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/certificates/{certificateName}/cancelDelete") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono cancelDeletion( @@ -1117,7 +1111,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String certificateName) { - return beginDeleteAsync(resourceGroupName, accountName, certificateName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, accountName, certificateName).getSyncPoller(); } /** @@ -1139,7 +1133,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String certificateName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, certificateName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, accountName, certificateName, context).getSyncPoller(); } /** 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 c423daafd155..35054b27ce41 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 @@ -72,8 +72,7 @@ public final class PoolsClientImpl implements PoolsClient { public interface PoolsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/pools") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByBatchAccount( @@ -90,8 +89,7 @@ Mono> listByBatchAccount( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/pools/{poolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono create( @@ -109,8 +107,7 @@ Mono create( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/pools/{poolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono update( @@ -127,8 +124,7 @@ Mono update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/pools/{poolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -143,8 +139,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/pools/{poolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono get( @@ -159,8 +154,7 @@ Mono get( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/pools/{poolName}/disableAutoScale") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/disableAutoScale") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono disableAutoScale( @@ -175,8 +169,7 @@ Mono disableAutoScale( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/pools/{poolName}/stopResize") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/pools/{poolName}/stopResize") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono stopResize( @@ -1044,7 +1037,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String poolName) { - return beginDeleteAsync(resourceGroupName, accountName, poolName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, accountName, poolName).getSyncPoller(); } /** @@ -1062,7 +1055,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String poolName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, poolName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, accountName, poolName, context).getSyncPoller(); } /** 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 2cd1f4e12ef2..f20615b354c0 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 @@ -68,8 +68,7 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi public interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/privateEndpointConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByBatchAccount( @@ -84,8 +83,7 @@ Mono> listByBatchAccount( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -100,8 +98,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -118,8 +115,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -797,7 +793,8 @@ public SyncPoller, PrivateEndpointCon String privateEndpointConnectionName, PrivateEndpointConnectionInner parameters) { final String ifMatch = null; - return beginUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch) + return this + .beginUpdateAsync(resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch) .getSyncPoller(); } @@ -826,7 +823,8 @@ public SyncPoller, PrivateEndpointCon PrivateEndpointConnectionInner parameters, String ifMatch, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, accountName, privateEndpointConnectionName, parameters, ifMatch, context) .getSyncPoller(); } @@ -1143,7 +1141,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String privateEndpointConnectionName) { - return beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName).getSyncPoller(); } /** @@ -1162,7 +1160,9 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String accountName, String privateEndpointConnectionName, Context context) { - return beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName, context).getSyncPoller(); + return this + .beginDeleteAsync(resourceGroupName, accountName, privateEndpointConnectionName, context) + .getSyncPoller(); } /** 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 08d6a5b3eeeb..bb82d8dbac4f 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 @@ -59,8 +59,7 @@ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResource public interface PrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByBatchAccount( @@ -75,8 +74,7 @@ Mono> listByBatchAccount( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts" - + "/{accountName}/privateLinkResources/{privateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( 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 5d4d1d67409a..38c0eee21dc9 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 @@ -15,7 +15,7 @@ * Batch account encryption configuration or when `ManagedIdentity` is selected as the auto-storage authentication mode. */ @Fluent -public class BatchAccountIdentity { +public final class BatchAccountIdentity { /* * The principal id of the Batch account. This property will only be provided for a system assigned identity. */ 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 7ec5d5a75c8e..6dfb560cb641 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 @@ -15,7 +15,7 @@ * the new vms which are created after the pool shrinks to 0 will have the updated identities. */ @Fluent -public class BatchPoolIdentity { +public final class BatchPoolIdentity { /* * The type of identity used for the Batch Pool. */ diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java index 96811efe7f46..1b912a5ef720 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerConfiguration.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.batch.models; import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -15,7 +16,7 @@ public final class ContainerConfiguration { * The container technology to be used. */ @JsonProperty(value = "type", required = true) - private String type = "DockerCompatible"; + private ContainerType type; /* * The collection of container image names. @@ -37,7 +38,6 @@ public final class ContainerConfiguration { /** Creates an instance of ContainerConfiguration class. */ public ContainerConfiguration() { - type = "DockerCompatible"; } /** @@ -45,7 +45,7 @@ public ContainerConfiguration() { * * @return the type value. */ - public String type() { + public ContainerType type() { return this.type; } @@ -55,7 +55,7 @@ public String type() { * @param type the type value to set. * @return the ContainerConfiguration object itself. */ - public ContainerConfiguration withType(String type) { + public ContainerConfiguration withType(ContainerType type) { this.type = type; return this; } @@ -118,8 +118,15 @@ public ContainerConfiguration withContainerRegistries(List co * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (type() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ContainerConfiguration")); + } if (containerRegistries() != null) { containerRegistries().forEach(e -> e.validate()); } } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerConfiguration.class); } diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerType.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerType.java new file mode 100644 index 000000000000..c08c6533fc6c --- /dev/null +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/ContainerType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.batch.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The container technology to be used. */ +public final class ContainerType extends ExpandableStringEnum { + /** Static value DockerCompatible for ContainerType. */ + public static final ContainerType DOCKER_COMPATIBLE = fromString("DockerCompatible"); + + /** Static value CriCompatible for ContainerType. */ + public static final ContainerType CRI_COMPATIBLE = fromString("CriCompatible"); + + /** + * Creates a new instance of ContainerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContainerType() { + } + + /** + * Creates or finds a ContainerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerType. + */ + @JsonCreator + public static ContainerType fromString(String name) { + return fromString(name, ContainerType.class); + } + + /** + * Gets known ContainerType values. + * + * @return known ContainerType values. + */ + public static Collection values() { + return values(ContainerType.class); + } +} 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 982172fa85fd..4555b81389e1 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 @@ -11,9 +11,9 @@ @Fluent public final class KeyVaultProperties { /* - * Full path to the versioned secret. Example - * https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable the following - * prerequisites must be met: + * Full path to the secret with or without version. Example + * https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. or + * https://mykeyvault.vault.azure.net/keys/testkey. To be usable the following prerequisites must be met: * * The Batch Account has a System Assigned identity * The account identity has been granted Key/Get, Key/Unwrap and Key/Wrap permissions @@ -27,9 +27,9 @@ public KeyVaultProperties() { } /** - * Get the keyIdentifier property: Full path to the versioned secret. Example - * https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable the following - * prerequisites must be met: + * Get the keyIdentifier property: Full path to the secret with or without version. Example + * https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. or + * https://mykeyvault.vault.azure.net/keys/testkey. To be usable the following prerequisites must be met: * *

The Batch Account has a System Assigned identity The account identity has been granted Key/Get, Key/Unwrap and * Key/Wrap permissions The KeyVault has soft-delete and purge protection enabled. @@ -41,9 +41,9 @@ public String keyIdentifier() { } /** - * Set the keyIdentifier property: Full path to the versioned secret. Example - * https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. To be usable the following - * prerequisites must be met: + * Set the keyIdentifier property: Full path to the secret with or without version. Example + * https://mykeyvault.vault.azure.net/keys/testkey/6e34a81fef704045975661e297a4c053. or + * https://mykeyvault.vault.azure.net/keys/testkey. To be usable the following prerequisites must be met: * *

The Batch Account has a System Assigned identity The account identity has been granted Key/Get, Key/Unwrap and * Key/Wrap permissions The KeyVault has soft-delete and purge protection enabled. 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 acf05265bbb2..5dab27038157 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 @@ -53,6 +53,16 @@ public final class NetworkConfiguration { @JsonProperty(value = "publicIPAddressConfiguration") private PublicIpAddressConfiguration publicIpAddressConfiguration; + /* + * Whether this pool should enable accelerated networking. + * + * Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved + * networking performance. For more details, see: + * https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. + */ + @JsonProperty(value = "enableAcceleratedNetworking") + private Boolean enableAcceleratedNetworking; + /** Creates an instance of NetworkConfiguration class. */ public NetworkConfiguration() { } @@ -178,6 +188,34 @@ public NetworkConfiguration withPublicIpAddressConfiguration( return this; } + /** + * Get the enableAcceleratedNetworking property: Whether this pool should enable accelerated networking. + * + *

Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved + * networking performance. For more details, see: + * https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. + * + * @return the enableAcceleratedNetworking value. + */ + public Boolean enableAcceleratedNetworking() { + return this.enableAcceleratedNetworking; + } + + /** + * Set the enableAcceleratedNetworking property: Whether this pool should enable accelerated networking. + * + *

Accelerated networking enables single root I/O virtualization (SR-IOV) to a VM, which may lead to improved + * networking performance. For more details, see: + * https://learn.microsoft.com/azure/virtual-network/accelerated-networking-overview. + * + * @param enableAcceleratedNetworking the enableAcceleratedNetworking value to set. + * @return the NetworkConfiguration object itself. + */ + public NetworkConfiguration withEnableAcceleratedNetworking(Boolean enableAcceleratedNetworking) { + this.enableAcceleratedNetworking = enableAcceleratedNetworking; + return this; + } + /** * Validates the instance. * 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 d0ee0d8875b5..d7c5004944cf 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 @@ -13,7 +13,7 @@ *

Specify either the userName or autoUser property, but not both. */ @Fluent -public class UserIdentity { +public final class UserIdentity { /* * The name of the user identity under which the task is run. * diff --git a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMExtension.java b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMExtension.java index 4b06f8edfac0..bfca0d6e7b2a 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMExtension.java +++ b/sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/models/VMExtension.java @@ -44,6 +44,13 @@ public final class VMExtension { @JsonProperty(value = "autoUpgradeMinorVersion") private Boolean autoUpgradeMinorVersion; + /* + * Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of + * the extension available. + */ + @JsonProperty(value = "enableAutomaticUpgrade") + private Boolean enableAutomaticUpgrade; + /* * JSON formatted public settings for the extension. */ @@ -173,6 +180,28 @@ public VMExtension withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) return this; } + /** + * Get the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version of the extension available. + * + * @return the enableAutomaticUpgrade value. + */ + public Boolean enableAutomaticUpgrade() { + return this.enableAutomaticUpgrade; + } + + /** + * Set the enableAutomaticUpgrade property: Indicates whether the extension should be automatically upgraded by the + * platform if there is a newer version of the extension available. + * + * @param enableAutomaticUpgrade the enableAutomaticUpgrade value to set. + * @return the VMExtension object itself. + */ + public VMExtension withEnableAutomaticUpgrade(Boolean enableAutomaticUpgrade) { + this.enableAutomaticUpgrade = enableAutomaticUpgrade; + return this; + } + /** * Get the settings property: JSON formatted public settings for the extension. * 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 173953ca90ba..2f12315b5a6b 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 @@ -7,7 +7,7 @@ /** Samples for Application Create. */ public final class ApplicationCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationCreate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/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 12e304b03216..113b009951ba 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Application Delete. */ public final class ApplicationDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationDelete.json */ /** * Sample code: ApplicationDelete. @@ -17,6 +15,8 @@ public final class ApplicationDeleteSamples { * @param manager Entry point to BatchManager. */ public static void applicationDelete(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applications().deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + manager + .applications() + .deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE); } } 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 e84b46688d78..7de47bb0b88c 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Application Get. */ public final class ApplicationGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationGet.json */ /** * Sample code: ApplicationGet. @@ -17,6 +15,8 @@ public final class ApplicationGetSamples { * @param manager Entry point to BatchManager. */ public static void applicationGet(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applications().getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE); + manager + .applications() + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE); } } 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 24e577e49574..f404e8e41147 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Application List. */ public final class ApplicationListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationList.json */ /** * Sample code: ApplicationList. @@ -17,6 +15,8 @@ public final class ApplicationListSamples { * @param manager Entry point to BatchManager. */ public static void applicationList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applications().list("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + manager + .applications() + .list("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE); } } 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 314dcbcb8a8f..8de6619cfd5a 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; /** Samples for ApplicationPackage Activate. */ public final class ApplicationPackageActivateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageActivate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageActivate.json */ /** * Sample code: ApplicationPackageActivate. @@ -26,6 +25,6 @@ public static void applicationPackageActivate(com.azure.resourcemanager.batch.Ba "app1", "1", new ActivateApplicationPackageParameters().withFormat("zip"), - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 78ef9dbf73a4..8c7452041c67 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 @@ -7,7 +7,7 @@ /** Samples for ApplicationPackage Create. */ public final class ApplicationPackageCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageCreate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/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 d8048d09eb2f..561e2b3f1502 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for ApplicationPackage Delete. */ public final class ApplicationPackageDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageDelete.json */ /** * Sample code: ApplicationPackageDelete. @@ -19,6 +17,7 @@ public final class ApplicationPackageDeleteSamples { public static void applicationPackageDelete(com.azure.resourcemanager.batch.BatchManager manager) { manager .applicationPackages() - .deleteWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); + .deleteWithResponse( + "default-azurebatch-japaneast", "sampleacct", "app1", "1", com.azure.core.util.Context.NONE); } } 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 fe38389d92b6..82f35c55ffe1 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for ApplicationPackage Get. */ public final class ApplicationPackageGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageGet.json */ /** * Sample code: ApplicationPackageGet. @@ -19,6 +17,7 @@ public final class ApplicationPackageGetSamples { public static void applicationPackageGet(com.azure.resourcemanager.batch.BatchManager manager) { manager .applicationPackages() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", "1", Context.NONE); + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "app1", "1", com.azure.core.util.Context.NONE); } } 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 eaf3a61bf2a6..55ca5ab07c09 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for ApplicationPackage List. */ public final class ApplicationPackageListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationPackageList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationPackageList.json */ /** * Sample code: ApplicationPackageList. @@ -17,6 +15,8 @@ public final class ApplicationPackageListSamples { * @param manager Entry point to BatchManager. */ public static void applicationPackageList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.applicationPackages().list("default-azurebatch-japaneast", "sampleacct", "app1", null, Context.NONE); + manager + .applicationPackages() + .list("default-azurebatch-japaneast", "sampleacct", "app1", null, com.azure.core.util.Context.NONE); } } 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 950e8eff6ba4..346491ed8da6 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.Application; /** Samples for Application Update. */ public final class ApplicationUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/ApplicationUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/ApplicationUpdate.json */ /** * Sample code: ApplicationUpdate. @@ -21,7 +20,7 @@ public static void applicationUpdate(com.azure.resourcemanager.batch.BatchManage Application resource = manager .applications() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", Context.NONE) + .getWithResponse("default-azurebatch-japaneast", "sampleacct", "app1", com.azure.core.util.Context.NONE) .getValue(); resource.update().withDisplayName("myAppName").withAllowUpdates(true).withDefaultVersion("2").apply(); } 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 da0733da72f1..283704bba3a2 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 @@ -17,7 +17,7 @@ /** Samples for BatchAccount Create. */ public final class BatchAccountCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_BYOS.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_BYOS.json */ /** * Sample code: BatchAccountCreate_BYOS. @@ -44,7 +44,7 @@ public static void batchAccountCreateBYOS(com.azure.resourcemanager.batch.BatchM } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_UserAssignedIdentity.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_UserAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_UserAssignedIdentity. @@ -72,7 +72,7 @@ public static void batchAccountCreateUserAssignedIdentity(com.azure.resourcemana } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateBatchAccountCreate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateBatchAccountCreate.json */ /** * Sample code: PrivateBatchAccountCreate. @@ -99,7 +99,7 @@ public static void privateBatchAccountCreate(com.azure.resourcemanager.batch.Bat } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_SystemAssignedIdentity.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_SystemAssignedIdentity.json */ /** * Sample code: BatchAccountCreate_SystemAssignedIdentity. @@ -121,7 +121,7 @@ public static void batchAccountCreateSystemAssignedIdentity(com.azure.resourcema } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountCreate_Default.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountCreate_Default.json */ /** * Sample code: BatchAccountCreate_Default. 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 9d9a03abd30f..13482213ce4b 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount Delete. */ public final class BatchAccountDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountDelete.json */ /** * Sample code: BatchAccountDelete. @@ -17,6 +15,6 @@ public final class BatchAccountDeleteSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountDelete(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().delete("default-azurebatch-japaneast", "sampleacct", Context.NONE); + manager.batchAccounts().delete("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } 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 10b6f886cb5b..2633d883cfe7 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount GetByResourceGroup. */ public final class BatchAccountGetByResourceGroupSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateBatchAccountGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateBatchAccountGet.json */ /** * Sample code: PrivateBatchAccountGet. @@ -19,11 +17,12 @@ public final class BatchAccountGetByResourceGroupSamples { public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .getByResourceGroupWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountGet.json */ /** * Sample code: BatchAccountGet. @@ -33,6 +32,7 @@ public static void privateBatchAccountGet(com.azure.resourcemanager.batch.BatchM public static void batchAccountGet(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .getByResourceGroupWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetDetectorSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountGetDetectorSamples.java index d20062b3e2f7..8ab5cc08d686 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount GetDetector. */ public final class BatchAccountGetDetectorSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/DetectorGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/DetectorGet.json */ /** * Sample code: GetDetector. @@ -19,6 +17,7 @@ public final class BatchAccountGetDetectorSamples { public static void getDetector(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .getDetectorWithResponse("default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", Context.NONE); + .getDetectorWithResponse( + "default-azurebatch-japaneast", "sampleacct", "poolsAndNodes", com.azure.core.util.Context.NONE); } } 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 3d194fe75099..14652254479b 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount GetKeys. */ public final class BatchAccountGetKeysSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountGetKeys.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountGetKeys.json */ /** * Sample code: BatchAccountGetKeys. @@ -17,6 +15,8 @@ public final class BatchAccountGetKeysSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountGetKeys(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + manager + .batchAccounts() + .getKeysWithResponse("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } 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 412865b0116e..3326c37232a4 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount ListByResourceGroup. */ public final class BatchAccountListByResourceGroupSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountListByResourceGroup.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountListByResourceGroup.json */ /** * Sample code: BatchAccountListByResourceGroup. @@ -17,6 +15,6 @@ public final class BatchAccountListByResourceGroupSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountListByResourceGroup(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().listByResourceGroup("default-azurebatch-japaneast", Context.NONE); + manager.batchAccounts().listByResourceGroup("default-azurebatch-japaneast", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListDetectorsSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/BatchAccountListDetectorsSamples.java index 77b437df5e36..9583b573cbd1 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount ListDetectors. */ public final class BatchAccountListDetectorsSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/DetectorList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/DetectorList.json */ /** * Sample code: ListDetectors. @@ -17,6 +15,8 @@ public final class BatchAccountListDetectorsSamples { * @param manager Entry point to BatchManager. */ public static void listDetectors(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().listDetectors("default-azurebatch-japaneast", "sampleacct", Context.NONE); + manager + .batchAccounts() + .listDetectors("default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } 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 01d3f89073c5..7cd5d102fc67 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount ListOutboundNetworkDependenciesEndpoints. */ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountListOutboundNetworkDependenciesEndpoints.json */ /** * Sample code: ListOutboundNetworkDependencies. @@ -19,6 +17,7 @@ public final class BatchAccountListOutboundNetworkDependenciesEndpointsSamples { public static void listOutboundNetworkDependencies(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .listOutboundNetworkDependenciesEndpoints("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .listOutboundNetworkDependenciesEndpoints( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } 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 94cf177ee438..fb88c7948ef1 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount List. */ public final class BatchAccountListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountList.json */ /** * Sample code: BatchAccountList. @@ -17,6 +15,6 @@ public final class BatchAccountListSamples { * @param manager Entry point to BatchManager. */ public static void batchAccountList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.batchAccounts().list(Context.NONE); + manager.batchAccounts().list(com.azure.core.util.Context.NONE); } } 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 a19b2398fa60..6b70ed620fea 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 @@ -4,14 +4,13 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.AccountKeyType; import com.azure.resourcemanager.batch.models.BatchAccountRegenerateKeyParameters; /** Samples for BatchAccount RegenerateKey. */ public final class BatchAccountRegenerateKeySamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountRegenerateKey.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountRegenerateKey.json */ /** * Sample code: BatchAccountRegenerateKey. @@ -25,6 +24,6 @@ public static void batchAccountRegenerateKey(com.azure.resourcemanager.batch.Bat "default-azurebatch-japaneast", "sampleacct", new BatchAccountRegenerateKeyParameters().withKeyName(AccountKeyType.PRIMARY), - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 43bf1dc7f50d..1b3c99c4b66f 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for BatchAccount SynchronizeAutoStorageKeys. */ public final class BatchAccountSynchronizeAutoStorageKeysSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountSynchronizeAutoStorageKeys.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountSynchronizeAutoStorageKeys.json */ /** * Sample code: BatchAccountSynchronizeAutoStorageKeys. @@ -19,6 +17,7 @@ public final class BatchAccountSynchronizeAutoStorageKeysSamples { public static void batchAccountSynchronizeAutoStorageKeys(com.azure.resourcemanager.batch.BatchManager manager) { manager .batchAccounts() - .synchronizeAutoStorageKeysWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE); + .synchronizeAutoStorageKeysWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE); } } 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 54b0d806b0c3..55f1d4399f71 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 @@ -4,14 +4,13 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; import com.azure.resourcemanager.batch.models.BatchAccount; /** Samples for BatchAccount Update. */ public final class BatchAccountUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/BatchAccountUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/BatchAccountUpdate.json */ /** * Sample code: BatchAccountUpdate. @@ -22,7 +21,8 @@ public static void batchAccountUpdate(com.azure.resourcemanager.batch.BatchManag BatchAccount resource = manager .batchAccounts() - .getByResourceGroupWithResponse("default-azurebatch-japaneast", "sampleacct", Context.NONE) + .getByResourceGroupWithResponse( + "default-azurebatch-japaneast", "sampleacct", com.azure.core.util.Context.NONE) .getValue(); resource .update() 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 index 7334101c67c2..bc398412ea07 100644 --- 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Certificate CancelDeletion. */ public final class CertificateCancelDeletionSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCancelDeletion.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCancelDeletion.json */ /** * Sample code: CertificateCancelDeletion. @@ -23,6 +21,6 @@ public static void certificateCancelDeletion(com.azure.resourcemanager.batch.Bat "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + 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 index 3509ec369ee5..bf885dd90f81 100644 --- 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 @@ -9,7 +9,7 @@ /** Samples for Certificate Create. */ public final class CertificateCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_Full.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_Full.json */ /** * Sample code: CreateCertificate - Full. @@ -29,7 +29,7 @@ public static void createCertificateFull(com.azure.resourcemanager.batch.BatchMa } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_Minimal.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_Minimal.json */ /** * Sample code: CreateCertificate - Minimal Pfx. @@ -46,7 +46,7 @@ public static void createCertificateMinimalPfx(com.azure.resourcemanager.batch.B } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateCreate_MinimalCer.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateCreate_MinimalCer.json */ /** * Sample code: CreateCertificate - Minimal Cer. 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 index 08257f805278..306aaba2e1e9 100644 --- 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Certificate Delete. */ public final class CertificateDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateDelete.json */ /** * Sample code: CertificateDelete. @@ -23,6 +21,6 @@ public static void certificateDelete(com.azure.resourcemanager.batch.BatchManage "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + 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 index 6ae68e7bbe2c..7a0d90671fb9 100644 --- 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Certificate Get. */ public final class CertificateGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateGetWithDeletionError.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateGetWithDeletionError.json */ /** * Sample code: Get Certificate with Deletion Error. @@ -23,11 +21,11 @@ public static void getCertificateWithDeletionError(com.azure.resourcemanager.bat "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateGet.json */ /** * Sample code: Get Certificate. @@ -41,6 +39,6 @@ public static void getCertificate(com.azure.resourcemanager.batch.BatchManager m "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE); + 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 index 3c7acb289268..00056b27701d 100644 --- 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Certificate ListByBatchAccount. */ public final class CertificateListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateListWithFilter.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateListWithFilter.json */ /** * Sample code: ListCertificates - Filter and Select. @@ -26,11 +24,11 @@ public static void listCertificatesFilterAndSelect(com.azure.resourcemanager.bat "properties/format,properties/provisioningState", "properties/provisioningStateTransitionTime gt '2017-05-01' or properties/provisioningState eq" + " 'Failed'", - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateList.json */ /** * Sample code: ListCertificates. @@ -40,6 +38,7 @@ public static void listCertificatesFilterAndSelect(com.azure.resourcemanager.bat public static void listCertificates(com.azure.resourcemanager.batch.BatchManager manager) { manager .certificates() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", 1, null, null, Context.NONE); + .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 index 931c273f05d8..cf8208b0b74d 100644 --- 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.Certificate; /** Samples for Certificate Update. */ public final class CertificateUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/CertificateUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/CertificateUpdate.json */ /** * Sample code: UpdateCertificate. @@ -25,7 +24,7 @@ public static void updateCertificate(com.azure.resourcemanager.batch.BatchManage "default-azurebatch-japaneast", "sampleacct", "sha1-0a0e4f50d51beadeac1d35afc5116098e7902e6e", - Context.NONE) + 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 ba1a0bd7c6f0..a47f86dc4d93 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 @@ -4,13 +4,12 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; /** Samples for Location CheckNameAvailability. */ public final class LocationCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_AlreadyExists.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationCheckNameAvailability_AlreadyExists.json */ /** * Sample code: LocationCheckNameAvailability_AlreadyExists. @@ -22,11 +21,13 @@ public static void locationCheckNameAvailabilityAlreadyExists( manager .locations() .checkNameAvailabilityWithResponse( - "japaneast", new CheckNameAvailabilityParameters().withName("existingaccountname"), Context.NONE); + "japaneast", + new CheckNameAvailabilityParameters().withName("existingaccountname"), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationCheckNameAvailability_Available.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationCheckNameAvailability_Available.json */ /** * Sample code: LocationCheckNameAvailability_Available. @@ -37,6 +38,8 @@ public static void locationCheckNameAvailabilityAvailable(com.azure.resourcemana manager .locations() .checkNameAvailabilityWithResponse( - "japaneast", new CheckNameAvailabilityParameters().withName("newaccountname"), Context.NONE); + "japaneast", + new CheckNameAvailabilityParameters().withName("newaccountname"), + 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 ce1b9ccf7062..78fc7b37bcba 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Location GetQuotas. */ public final class LocationGetQuotasSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationGetQuotas.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationGetQuotas.json */ /** * Sample code: LocationGetQuotas. @@ -17,6 +15,6 @@ public final class LocationGetQuotasSamples { * @param manager Entry point to BatchManager. */ public static void locationGetQuotas(com.azure.resourcemanager.batch.BatchManager manager) { - manager.locations().getQuotasWithResponse("japaneast", Context.NONE); + manager.locations().getQuotasWithResponse("japaneast", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedCloudServiceSkusSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedCloudServiceSkusSamples.java index a1f5fcf5bec2..563fb6822c47 100644 --- a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedCloudServiceSkusSamples.java +++ b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/LocationListSupportedCloudServiceSkusSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Location ListSupportedCloudServiceSkus. */ public final class LocationListSupportedCloudServiceSkusSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListCloudServiceSkus.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationListCloudServiceSkus.json */ /** * Sample code: LocationListCloudServiceSkus. @@ -17,6 +15,6 @@ public final class LocationListSupportedCloudServiceSkusSamples { * @param manager Entry point to BatchManager. */ public static void locationListCloudServiceSkus(com.azure.resourcemanager.batch.BatchManager manager) { - manager.locations().listSupportedCloudServiceSkus("japaneast", null, null, Context.NONE); + manager.locations().listSupportedCloudServiceSkus("japaneast", null, null, com.azure.core.util.Context.NONE); } } 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 ff6f712c4b41..da89a649cff5 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Location ListSupportedVirtualMachineSkus. */ public final class LocationListSupportedVirtualMachineSkusSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/LocationListVirtualMachineSkus.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/LocationListVirtualMachineSkus.json */ /** * Sample code: LocationListVirtualMachineSkus. @@ -17,6 +15,6 @@ public final class LocationListSupportedVirtualMachineSkusSamples { * @param manager Entry point to BatchManager. */ public static void locationListVirtualMachineSkus(com.azure.resourcemanager.batch.BatchManager manager) { - manager.locations().listSupportedVirtualMachineSkus("japaneast", null, null, Context.NONE); + manager.locations().listSupportedVirtualMachineSkus("japaneast", null, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/OperationsListSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/OperationsListSamples.java index eb1743c6c103..2edfd1de6e72 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/OperationsList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/OperationsList.json */ /** * Sample code: OperationsList. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to BatchManager. */ public static void operationsList(com.azure.resourcemanager.batch.BatchManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } 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 17b224df92b3..9d47f3952143 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 @@ -64,7 +64,7 @@ /** Samples for Pool Create. */ public final class PoolCreateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_SharedImageGallery.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_SharedImageGallery.json */ /** * Sample code: CreatePool - Custom Image. @@ -90,7 +90,7 @@ public static void createPoolCustomImage(com.azure.resourcemanager.batch.BatchMa } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_CloudServiceConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_CloudServiceConfiguration.json */ /** * Sample code: CreatePool - Full CloudServiceConfiguration. @@ -189,7 +189,7 @@ public static void createPoolFullCloudServiceConfiguration(com.azure.resourceman } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json */ /** * Sample code: CreatePool - Minimal CloudServiceConfiguration. @@ -211,7 +211,7 @@ public static void createPoolMinimalCloudServiceConfiguration( } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Minimal VirtualMachineConfiguration. @@ -246,7 +246,7 @@ public static void createPoolMinimalVirtualMachineConfiguration( } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_NoPublicIPAddresses.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_NoPublicIPAddresses.json */ /** * Sample code: CreatePool - No public IP. @@ -279,7 +279,7 @@ public static void createPoolNoPublicIP(com.azure.resourcemanager.batch.BatchMan } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: CreatePool - VirtualMachineConfiguration Extensions. @@ -308,22 +308,16 @@ public static void createPoolVirtualMachineConfigurationExtensions( .asList( new VMExtension() .withName("batchextension1") - .withPublisher("Microsoft.Azure.Security.Monitoring") - .withType("SecurityMonitoringForLinux") - .withTypeHandlerVersion("1.0") + .withPublisher("Microsoft.Azure.KeyVault") + .withType("KeyVaultForLinux") + .withTypeHandlerVersion("2.0") .withAutoUpgradeMinorVersion(true) + .withEnableAutomaticUpgrade(true) .withSettings( SerializerFactory .createDefaultManagementSerializerAdapter() .deserialize( - "{\"settingsKey\":\"settingsValue\"}", - Object.class, - SerializerEncoding.JSON)) - .withProtectedSettings( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"protectedSettingsKey\":\"protectedSettingsValue\"}", + "{\"authenticationSettingsKey\":\"authenticationSettingsValue\",\"secretsManagementSettingsKey\":\"secretsManagementSettingsValue\"}", Object.class, SerializerEncoding.JSON)))))) .withScaleSettings( @@ -337,7 +331,7 @@ public static void createPoolVirtualMachineConfigurationExtensions( } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_UserAssignedIdentities.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_UserAssignedIdentities.json */ /** * Sample code: CreatePool - UserAssignedIdentities. @@ -380,7 +374,7 @@ public static void createPoolUserAssignedIdentities(com.azure.resourcemanager.ba } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_PublicIPs.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolCreate_PublicIPs.json */ /** * Sample code: CreatePool - Public IPs. @@ -417,7 +411,43 @@ public static void createPoolPublicIPs(com.azure.resourcemanager.batch.BatchMana } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolCreate_VirtualMachineConfiguration.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-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/2023-05-01/examples/PoolCreate_VirtualMachineConfiguration.json */ /** * Sample code: CreatePool - Full VirtualMachineConfiguration. 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 a3ef98deef0a..76398dc6f610 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Pool Delete. */ public final class PoolDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolDelete.json */ /** * Sample code: DeletePool. @@ -17,6 +15,8 @@ public final class PoolDeleteSamples { * @param manager Entry point to BatchManager. */ public static void deletePool(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().delete("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .delete("default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } 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 f0cddd5123ec..4b3a1bcf9020 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Pool DisableAutoScale. */ public final class PoolDisableAutoScaleSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolDisableAutoScale.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolDisableAutoScale.json */ /** * Sample code: Disable AutoScale. @@ -19,6 +17,7 @@ public final class PoolDisableAutoScaleSamples { public static void disableAutoScale(com.azure.resourcemanager.batch.BatchManager manager) { manager .pools() - .disableAutoScaleWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + .disableAutoScaleWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } diff --git a/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolGetSamples.java b/sdk/batch/azure-resourcemanager-batch/src/samples/java/com/azure/resourcemanager/batch/generated/PoolGetSamples.java index 0f79569f6771..00df46c6bad6 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Pool Get. */ public final class PoolGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet_VirtualMachineConfiguration_Extensions.json */ /** * Sample code: GetPool - VirtualMachineConfiguration Extensions. @@ -18,11 +16,29 @@ public final class PoolGetSamples { */ public static void getPoolVirtualMachineConfigurationExtensions( com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet_AcceleratedNetworking.json + */ + /** + * Sample code: GetPool - AcceleratedNetworking. + * + * @param manager Entry point to BatchManager. + */ + public static void getPoolAcceleratedNetworking(com.azure.resourcemanager.batch.BatchManager manager) { + manager + .pools() + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolGet.json */ /** * Sample code: GetPool. @@ -30,6 +46,9 @@ public static void getPoolVirtualMachineConfigurationExtensions( * @param manager Entry point to BatchManager. */ public static void getPool(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } 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 9aeaf71c5c5b..0dddba5ab18c 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Pool ListByBatchAccount. */ public final class PoolListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolList.json */ /** * Sample code: ListPool. @@ -19,11 +17,12 @@ public final class PoolListByBatchAccountSamples { public static void listPool(com.azure.resourcemanager.batch.BatchManager manager) { manager .pools() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, null, null, Context.NONE); + .listByBatchAccount( + "default-azurebatch-japaneast", "sampleacct", null, null, null, com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolListWithFilter.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolListWithFilter.json */ /** * Sample code: ListPoolWithFilter. @@ -40,6 +39,6 @@ public static void listPoolWithFilter(com.azure.resourcemanager.batch.BatchManag "properties/allocationState,properties/provisioningStateTransitionTime,properties/currentDedicatedNodes,properties/currentLowPriorityNodes", "startswith(name, 'po') or (properties/allocationState eq 'Steady' and" + " properties/provisioningStateTransitionTime lt datetime'2017-02-02')", - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 96873425b78a..c0e3cb30c7eb 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for Pool StopResize. */ public final class PoolStopResizeSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolStopResize.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolStopResize.json */ /** * Sample code: StopPoolResize. @@ -17,6 +15,9 @@ public final class PoolStopResizeSamples { * @param manager Entry point to BatchManager. */ public static void stopPoolResize(com.azure.resourcemanager.batch.BatchManager manager) { - manager.pools().stopResizeWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE); + manager + .pools() + .stopResizeWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE); } } 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 6ce182d5b99a..1e21d00ccb63 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.models.ApplicationPackageReference; import com.azure.resourcemanager.batch.models.AutoScaleSettings; import com.azure.resourcemanager.batch.models.CertificateReference; @@ -22,7 +21,7 @@ /** Samples for Pool Update. */ public final class PoolUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_EnableAutoScale.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_EnableAutoScale.json */ /** * Sample code: UpdatePool - Enable Autoscale. @@ -33,7 +32,8 @@ public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.Bat Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -43,7 +43,7 @@ public static void updatePoolEnableAutoscale(com.azure.resourcemanager.batch.Bat } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_RemoveStartTask.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_RemoveStartTask.json */ /** * Sample code: UpdatePool - Remove Start Task. @@ -54,13 +54,14 @@ public static void updatePoolRemoveStartTask(com.azure.resourcemanager.batch.Bat Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource.update().withStartTask(new StartTask()).apply(); } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_ResizePool.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_ResizePool.json */ /** * Sample code: UpdatePool - Resize Pool. @@ -71,7 +72,8 @@ public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchMan Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -87,7 +89,7 @@ public static void updatePoolResizePool(com.azure.resourcemanager.batch.BatchMan } /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PoolUpdate_OtherProperties.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PoolUpdate_OtherProperties.json */ /** * Sample code: UpdatePool - Other Properties. @@ -98,7 +100,8 @@ public static void updatePoolOtherProperties(com.azure.resourcemanager.batch.Bat Pool resource = manager .pools() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "testpool", Context.NONE) + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "testpool", com.azure.core.util.Context.NONE) .getValue(); resource .update() 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 18aeb604b3b6..63623525303d 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnection Delete. */ public final class PrivateEndpointConnectionDeleteSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionDelete.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionDelete.json */ /** * Sample code: PrivateEndpointConnectionDelete. @@ -23,6 +21,6 @@ public static void privateEndpointConnectionDelete(com.azure.resourcemanager.bat "default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 0f8c6872d7db..3618dc85ee8e 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnection Get. */ public final class PrivateEndpointConnectionGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionGet.json */ /** * Sample code: GetPrivateEndpointConnection. @@ -23,6 +21,6 @@ public static void getPrivateEndpointConnection(com.azure.resourcemanager.batch. "default-azurebatch-japaneast", "sampleacct", "testprivateEndpointConnection5testprivateEndpointConnection5.24d6b4b5-e65c-4330-bbe9-3a290d62f8e0", - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 d7a2d4eaa003..6298c8ea6a33 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for PrivateEndpointConnection ListByBatchAccount. */ public final class PrivateEndpointConnectionListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionsList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionsList.json */ /** * Sample code: ListPrivateEndpointConnections. @@ -19,6 +17,6 @@ public final class PrivateEndpointConnectionListByBatchAccountSamples { public static void listPrivateEndpointConnections(com.azure.resourcemanager.batch.BatchManager manager) { manager .privateEndpointConnections() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE); } } 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 521db1986934..675b9eb3782c 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 @@ -4,7 +4,6 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; @@ -12,7 +11,7 @@ /** Samples for PrivateEndpointConnection Update. */ public final class PrivateEndpointConnectionUpdateSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateEndpointConnectionUpdate.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateEndpointConnectionUpdate.json */ /** * Sample code: UpdatePrivateEndpointConnection. @@ -32,6 +31,6 @@ public static void updatePrivateEndpointConnection(com.azure.resourcemanager.bat .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) .withDescription("Approved by xyz.abc@company.com")), null, - Context.NONE); + com.azure.core.util.Context.NONE); } } 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 688d6f9c51c3..0d9074986f37 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResource Get. */ public final class PrivateLinkResourceGetSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateLinkResourceGet.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateLinkResourceGet.json */ /** * Sample code: GetPrivateLinkResource. @@ -19,6 +17,7 @@ public final class PrivateLinkResourceGetSamples { public static void getPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { manager .privateLinkResources() - .getWithResponse("default-azurebatch-japaneast", "sampleacct", "batchAccount", Context.NONE); + .getWithResponse( + "default-azurebatch-japaneast", "sampleacct", "batchAccount", com.azure.core.util.Context.NONE); } } 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 23c7fffc9d4f..2924a35f3f71 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 @@ -4,12 +4,10 @@ package com.azure.resourcemanager.batch.generated; -import com.azure.core.util.Context; - /** Samples for PrivateLinkResource ListByBatchAccount. */ public final class PrivateLinkResourceListByBatchAccountSamples { /* - * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2022-10-01/examples/PrivateLinkResourcesList.json + * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-05-01/examples/PrivateLinkResourcesList.json */ /** * Sample code: ListPrivateLinkResource. @@ -19,6 +17,6 @@ public final class PrivateLinkResourceListByBatchAccountSamples { public static void listPrivateLinkResource(com.azure.resourcemanager.batch.BatchManager manager) { manager .privateLinkResources() - .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, Context.NONE); + .listByBatchAccount("default-azurebatch-japaneast", "sampleacct", null, com.azure.core.util.Context.NONE); } } 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 deleted file mode 100644 index 129443c5df61..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ActivateApplicationPackageParametersTests.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.ActivateApplicationPackageParameters; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ActivateApplicationPackageParametersTests { - @Test - public void testDeserialize() { - ActivateApplicationPackageParameters model = - BinaryData.fromString("{\"format\":\"ufufsrp\"}").toObject(ActivateApplicationPackageParameters.class); - Assertions.assertEquals("ufufsrp", model.format()); - } - - @Test - public void testSerialize() { - ActivateApplicationPackageParameters model = new ActivateApplicationPackageParameters().withFormat("ufufsrp"); - model = BinaryData.fromObject(model).toObject(ActivateApplicationPackageParameters.class); - Assertions.assertEquals("ufufsrp", 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 deleted file mode 100644 index 7c380df0cfd2..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationInnerTests.java +++ /dev/null @@ -1,37 +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.fluent.models.ApplicationInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ApplicationInnerTests { - @Test - public void testDeserialize() { - ApplicationInner model = - BinaryData - .fromString( - "{\"properties\":{\"displayName\":\"ifiyipjxsqwpgrj\",\"allowUpdates\":true,\"defaultVersion\":\"rcjxvsnbyxqabn\"},\"etag\":\"cpc\",\"id\":\"shurzafbljjgpbto\",\"name\":\"c\",\"type\":\"mkljavb\"}") - .toObject(ApplicationInner.class); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.displayName()); - Assertions.assertEquals(true, model.allowUpdates()); - Assertions.assertEquals("rcjxvsnbyxqabn", model.defaultVersion()); - } - - @Test - public void testSerialize() { - ApplicationInner model = - new ApplicationInner() - .withDisplayName("ifiyipjxsqwpgrj") - .withAllowUpdates(true) - .withDefaultVersion("rcjxvsnbyxqabn"); - model = BinaryData.fromObject(model).toObject(ApplicationInner.class); - Assertions.assertEquals("ifiyipjxsqwpgrj", model.displayName()); - Assertions.assertEquals(true, model.allowUpdates()); - Assertions.assertEquals("rcjxvsnbyxqabn", model.defaultVersion()); - } -} 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 deleted file mode 100644 index eccd2935a930..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageInnerTests.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.fluent.models.ApplicationPackageInner; -import org.junit.jupiter.api.Test; - -public final class ApplicationPackageInnerTests { - @Test - public void testDeserialize() { - ApplicationPackageInner model = - BinaryData - .fromString( - "{\"properties\":{\"state\":\"Active\",\"format\":\"nsez\",\"storageUrl\":\"tbzsgfyccs\",\"storageUrlExpiry\":\"2021-01-11T19:46:12Z\",\"lastActivationTime\":\"2021-01-16T10:20:52Z\"},\"etag\":\"z\",\"id\":\"eiachboosflnr\",\"name\":\"sfqpteehz\",\"type\":\"vypyqrimzinpv\"}") - .toObject(ApplicationPackageInner.class); - } - - @Test - public void testSerialize() { - ApplicationPackageInner model = new ApplicationPackageInner(); - model = BinaryData.fromObject(model).toObject(ApplicationPackageInner.class); - } -} 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 deleted file mode 100644 index b0f4e587083f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagePropertiesTests.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.fluent.models.ApplicationPackageProperties; -import org.junit.jupiter.api.Test; - -public final class ApplicationPackagePropertiesTests { - @Test - public void testDeserialize() { - ApplicationPackageProperties model = - BinaryData - .fromString( - "{\"state\":\"Active\",\"format\":\"kirsoodqxhc\",\"storageUrl\":\"nohjt\",\"storageUrlExpiry\":\"2020-12-26T05:08:12Z\",\"lastActivationTime\":\"2021-01-23T02:14:07Z\"}") - .toObject(ApplicationPackageProperties.class); - } - - @Test - public void testSerialize() { - ApplicationPackageProperties model = new ApplicationPackageProperties(); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index 7af187b04c01..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackageReferenceTests.java +++ /dev/null @@ -1,28 +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.ApplicationPackageReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ApplicationPackageReferenceTests { - @Test - public void testDeserialize() { - ApplicationPackageReference model = - BinaryData.fromString("{\"id\":\"ywggx\",\"version\":\"lla\"}").toObject(ApplicationPackageReference.class); - Assertions.assertEquals("ywggx", model.id()); - Assertions.assertEquals("lla", model.version()); - } - - @Test - public void testSerialize() { - ApplicationPackageReference model = new ApplicationPackageReference().withId("ywggx").withVersion("lla"); - model = BinaryData.fromObject(model).toObject(ApplicationPackageReference.class); - Assertions.assertEquals("ywggx", model.id()); - Assertions.assertEquals("lla", 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 deleted file mode 100644 index 8584b23724c9..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesActivateWithResponseMockTests.java +++ /dev/null @@ -1,75 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ActivateApplicationPackageParameters; -import com.azure.resourcemanager.batch.models.ApplicationPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationPackagesActivateWithResponseMockTests { - @Test - public void testActivateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"state\":\"Pending\",\"format\":\"nuuzkopbm\",\"storageUrl\":\"rfdwoyu\",\"storageUrlExpiry\":\"2021-03-01T11:30:13Z\",\"lastActivationTime\":\"2020-12-20T18:42:28Z\"},\"etag\":\"efozbhdms\",\"id\":\"l\",\"name\":\"zqhof\",\"type\":\"rmaequ\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationPackage response = - manager - .applicationPackages() - .activateWithResponse( - "tdlmkkzevd", - "hewpusdsttwv", - "gvbbejdcng", - "qmoa", - new ActivateApplicationPackageParameters().withFormat("ufgmjzrwrdg"), - Context.NONE) - .getValue(); - } -} 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 deleted file mode 100644 index b0e99b550572..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesCreateWithResponseMockTests.java +++ /dev/null @@ -1,68 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ApplicationPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationPackagesCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"state\":\"Pending\",\"format\":\"wkqnyhg\",\"storageUrl\":\"j\",\"storageUrlExpiry\":\"2021-03-05T18:22:33Z\",\"lastActivationTime\":\"2021-01-15T08:47:59Z\"},\"etag\":\"zs\",\"id\":\"ab\",\"name\":\"bsystawfsdjpvk\",\"type\":\"p\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationPackage response = - manager - .applicationPackages() - .define("unyowxwl") - .withExistingApplication("nhltiugcxn", "vvwxqi", "y") - .create(); - } -} 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 deleted file mode 100644 index e3d8a597b419..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesDeleteWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationPackagesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.applicationPackages().deleteWithResponse("ah", "icslfaoq", "piyylhalnswhccsp", "kaivwit", 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 deleted file mode 100644 index 88aa17aff94b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesGetWithResponseMockTests.java +++ /dev/null @@ -1,68 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ApplicationPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationPackagesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"state\":\"Active\",\"format\":\"cccnxqhuexmktt\",\"storageUrl\":\"tvlz\",\"storageUrlExpiry\":\"2021-10-30T19:56:42Z\",\"lastActivationTime\":\"2021-08-13T19:06:52Z\"},\"etag\":\"rncsdtclu\",\"id\":\"iypbsfgytgusl\",\"name\":\"eadcygqukyhejhz\",\"type\":\"sx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ApplicationPackage response = - manager - .applicationPackages() - .getWithResponse("scywuggwoluhc", "bwemhairs", "rgzdwmsweyp", "w", Context.NONE) - .getValue(); - } -} 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 deleted file mode 100644 index a50ca33a3a59..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPackagesListMockTests.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.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ApplicationPackage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationPackagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"state\":\"Pending\",\"format\":\"r\",\"storageUrl\":\"swibyr\",\"storageUrlExpiry\":\"2021-01-18T20:33:29Z\",\"lastActivationTime\":\"2021-10-26T18:16:31Z\"},\"etag\":\"hfwpracstwit\",\"id\":\"khevxccedc\",\"name\":\"nmdyodnwzxl\",\"type\":\"jc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.applicationPackages().list("fpel", "lppvksrpq", "ujzra", 2035738208, Context.NONE); - } -} 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 deleted file mode 100644 index 63e22c431867..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationPropertiesTests.java +++ /dev/null @@ -1,37 +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.fluent.models.ApplicationProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ApplicationPropertiesTests { - @Test - public void testDeserialize() { - ApplicationProperties model = - BinaryData - .fromString( - "{\"displayName\":\"dtqajzyulpkudj\",\"allowUpdates\":false,\"defaultVersion\":\"hbzhfepg\"}") - .toObject(ApplicationProperties.class); - Assertions.assertEquals("dtqajzyulpkudj", model.displayName()); - Assertions.assertEquals(false, model.allowUpdates()); - Assertions.assertEquals("hbzhfepg", model.defaultVersion()); - } - - @Test - public void testSerialize() { - ApplicationProperties model = - new ApplicationProperties() - .withDisplayName("dtqajzyulpkudj") - .withAllowUpdates(false) - .withDefaultVersion("hbzhfepg"); - model = BinaryData.fromObject(model).toObject(ApplicationProperties.class); - Assertions.assertEquals("dtqajzyulpkudj", model.displayName()); - Assertions.assertEquals(false, model.allowUpdates()); - Assertions.assertEquals("hbzhfepg", 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 deleted file mode 100644 index 9a41406dc64e..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsCreateWithResponseMockTests.java +++ /dev/null @@ -1,76 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.Application; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"hqamvdkf\",\"allowUpdates\":true,\"defaultVersion\":\"cvtbv\"},\"etag\":\"yhmtnvyqiat\",\"id\":\"zwpcnpwzcjaesg\",\"name\":\"v\",\"type\":\"ccyajg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Application response = - manager - .applications() - .define("wws") - .withExistingBatchAccount("tvsexsowuel", "qhhahhxvrhmzkwpj") - .withDisplayName("hftqsxhqxujxukn") - .withAllowUpdates(true) - .withDefaultVersion("grjguufzd") - .create(); - - Assertions.assertEquals("hqamvdkf", response.displayName()); - Assertions.assertEquals(true, response.allowUpdates()); - Assertions.assertEquals("cvtbv", response.defaultVersion()); - } -} 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 deleted file mode 100644 index d07adea821bc..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsDeleteWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.applications().deleteWithResponse("jxbkzbzkdvn", "jabudurgkakmo", "zhjjklffhmouwq", 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 deleted file mode 100644 index fcdd2f5aa9b5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.Application; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"vtldgmfpgvmpip\",\"allowUpdates\":false,\"defaultVersion\":\"haq\"},\"etag\":\"ss\",\"id\":\"wutwbdsre\",\"name\":\"pdrhne\",\"type\":\"yowqkdwytisibir\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Application response = - manager.applications().getWithResponse("gzrf", "eeyebi", "ikayuhqlbjbsybb", Context.NONE).getValue(); - - Assertions.assertEquals("vtldgmfpgvmpip", response.displayName()); - Assertions.assertEquals(false, response.allowUpdates()); - Assertions.assertEquals("haq", 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 deleted file mode 100644 index ce8a6711ded3..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ApplicationsListMockTests.java +++ /dev/null @@ -1,71 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.Application; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ApplicationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"cirgzp\",\"allowUpdates\":false,\"defaultVersion\":\"zszrnwoiindfpw\"},\"etag\":\"ylwbtlhflsjcdhsz\",\"id\":\"jvfbgofelja\",\"name\":\"rqmq\",\"type\":\"ldvriiiojnalghfk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.applications().list("gpikpzimejza", "lfzxiavrmbzonoki", 988966310, Context.NONE); - - Assertions.assertEquals("cirgzp", response.iterator().next().displayName()); - Assertions.assertEquals(false, response.iterator().next().allowUpdates()); - Assertions.assertEquals("zszrnwoiindfpw", 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 deleted file mode 100644 index 3ad3057a82f5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoScaleSettingsTests.java +++ /dev/null @@ -1,32 +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.AutoScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoScaleSettingsTests { - @Test - public void testDeserialize() { - AutoScaleSettings model = - BinaryData - .fromString("{\"formula\":\"h\",\"evaluationInterval\":\"PT43H13M53S\"}") - .toObject(AutoScaleSettings.class); - Assertions.assertEquals("h", model.formula()); - Assertions.assertEquals(Duration.parse("PT43H13M53S"), model.evaluationInterval()); - } - - @Test - public void testSerialize() { - AutoScaleSettings model = - new AutoScaleSettings().withFormula("h").withEvaluationInterval(Duration.parse("PT43H13M53S")); - model = BinaryData.fromObject(model).toObject(AutoScaleSettings.class); - Assertions.assertEquals("h", model.formula()); - Assertions.assertEquals(Duration.parse("PT43H13M53S"), 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 deleted file mode 100644 index 5fb3cddc49e7..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoStorageBasePropertiesTests.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.AutoStorageAuthenticationMode; -import com.azure.resourcemanager.batch.models.AutoStorageBaseProperties; -import com.azure.resourcemanager.batch.models.ComputeNodeIdentityReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoStorageBasePropertiesTests { - @Test - public void testDeserialize() { - AutoStorageBaseProperties model = - BinaryData - .fromString( - "{\"storageAccountId\":\"lhqgnufooojy\",\"authenticationMode\":\"BatchAccountManagedIdentity\",\"nodeIdentityReference\":{\"resourceId\":\"esaagdfm\"}}") - .toObject(AutoStorageBaseProperties.class); - Assertions.assertEquals("lhqgnufooojy", model.storageAccountId()); - Assertions - .assertEquals(AutoStorageAuthenticationMode.BATCH_ACCOUNT_MANAGED_IDENTITY, model.authenticationMode()); - Assertions.assertEquals("esaagdfm", model.nodeIdentityReference().resourceId()); - } - - @Test - public void testSerialize() { - AutoStorageBaseProperties model = - new AutoStorageBaseProperties() - .withStorageAccountId("lhqgnufooojy") - .withAuthenticationMode(AutoStorageAuthenticationMode.BATCH_ACCOUNT_MANAGED_IDENTITY) - .withNodeIdentityReference(new ComputeNodeIdentityReference().withResourceId("esaagdfm")); - model = BinaryData.fromObject(model).toObject(AutoStorageBaseProperties.class); - Assertions.assertEquals("lhqgnufooojy", model.storageAccountId()); - Assertions - .assertEquals(AutoStorageAuthenticationMode.BATCH_ACCOUNT_MANAGED_IDENTITY, model.authenticationMode()); - Assertions.assertEquals("esaagdfm", 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 deleted file mode 100644 index d2dff6b29efb..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/AutoUserSpecificationTests.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.AutoUserScope; -import com.azure.resourcemanager.batch.models.AutoUserSpecification; -import com.azure.resourcemanager.batch.models.ElevationLevel; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AutoUserSpecificationTests { - @Test - public void testDeserialize() { - AutoUserSpecification model = - BinaryData - .fromString("{\"scope\":\"Pool\",\"elevationLevel\":\"Admin\"}") - .toObject(AutoUserSpecification.class); - Assertions.assertEquals(AutoUserScope.POOL, model.scope()); - Assertions.assertEquals(ElevationLevel.ADMIN, model.elevationLevel()); - } - - @Test - public void testSerialize() { - AutoUserSpecification model = - new AutoUserSpecification().withScope(AutoUserScope.POOL).withElevationLevel(ElevationLevel.ADMIN); - model = BinaryData.fromObject(model).toObject(AutoUserSpecification.class); - Assertions.assertEquals(AutoUserScope.POOL, model.scope()); - Assertions.assertEquals(ElevationLevel.ADMIN, model.elevationLevel()); - } -} 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 deleted file mode 100644 index af1bf4bd7014..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountIdentityTests.java +++ /dev/null @@ -1,49 +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.BatchAccountIdentity; -import com.azure.resourcemanager.batch.models.ResourceIdentityType; -import com.azure.resourcemanager.batch.models.UserAssignedIdentities; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BatchAccountIdentityTests { - @Test - public void testDeserialize() { - BatchAccountIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"jbpzvgnwzsymg\",\"tenantId\":\"uf\",\"type\":\"None\",\"userAssignedIdentities\":{\"ithxqhabifpi\":{\"principalId\":\"hdbihan\",\"clientId\":\"hfcbjysa\"},\"ivyqniwbybrkxvd\":{\"principalId\":\"wczbys\",\"clientId\":\"pqxu\"}}}") - .toObject(BatchAccountIdentity.class); - Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); - } - - @Test - public void testSerialize() { - BatchAccountIdentity model = - new BatchAccountIdentity() - .withType(ResourceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "ithxqhabifpi", new UserAssignedIdentities(), "ivyqniwbybrkxvd", new UserAssignedIdentities())); - model = BinaryData.fromObject(model).toObject(BatchAccountIdentity.class); - Assertions.assertEquals(ResourceIdentityType.NONE, model.type()); - } - - @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/BatchAccountKeysInnerTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountKeysInnerTests.java deleted file mode 100644 index 27148082eb8e..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountKeysInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.BatchAccountKeysInner; -import org.junit.jupiter.api.Test; - -public final class BatchAccountKeysInnerTests { - @Test - public void testDeserialize() { - BatchAccountKeysInner model = - BinaryData - .fromString("{\"accountName\":\"htymw\",\"primary\":\"dkfthwxmnt\",\"secondary\":\"waopvkmijcmmxd\"}") - .toObject(BatchAccountKeysInner.class); - } - - @Test - public void testSerialize() { - 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/BatchAccountListResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountListResultTests.java deleted file mode 100644 index 202872cc7c79..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountListResultTests.java +++ /dev/null @@ -1,91 +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.fluent.models.BatchAccountInner; -import com.azure.resourcemanager.batch.models.BatchAccountIdentity; -import com.azure.resourcemanager.batch.models.BatchAccountListResult; -import com.azure.resourcemanager.batch.models.PublicNetworkAccessType; -import com.azure.resourcemanager.batch.models.ResourceIdentityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BatchAccountListResultTests { - @Test - public void testDeserialize() { - BatchAccountListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"accountEndpoint\":\"ulngsntn\",\"nodeManagementEndpoint\":\"bkzgcwrwclx\",\"provisioningState\":\"Deleting\",\"poolAllocationMode\":\"BatchService\",\"publicNetworkAccess\":\"Disabled\",\"privateEndpointConnections\":[],\"dedicatedCoreQuota\":1132832602,\"lowPriorityCoreQuota\":422670277,\"dedicatedCoreQuotaPerVMFamily\":[],\"dedicatedCoreQuotaPerVMFamilyEnforced\":true,\"poolQuota\":747491790,\"activeJobAndJobScheduleQuota\":1343054120,\"allowedAuthenticationModes\":[]},\"identity\":{\"principalId\":\"bnjbiksqrglssain\",\"tenantId\":\"jwnzlljfmp\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"bvmgxsabkyqduuji\",\"tags\":{\"dhkrwpdappdsbdk\":\"czdzev\",\"nhutjeltmrldhugj\":\"wrwjfeu\",\"ablgphuticndvk\":\"zdatqxhocdg\"},\"id\":\"ozwyiftyhxhuro\",\"name\":\"ftyxolniw\",\"type\":\"wcukjfkgiawxk\"},{\"properties\":{\"accountEndpoint\":\"plwckbas\",\"nodeManagementEndpoint\":\"pnddhsgcbacphejk\",\"provisioningState\":\"Creating\",\"poolAllocationMode\":\"BatchService\",\"publicNetworkAccess\":\"Disabled\",\"privateEndpointConnections\":[],\"dedicatedCoreQuota\":250588386,\"lowPriorityCoreQuota\":485783320,\"dedicatedCoreQuotaPerVMFamily\":[],\"dedicatedCoreQuotaPerVMFamilyEnforced\":false,\"poolQuota\":892676084,\"activeJobAndJobScheduleQuota\":1579471908,\"allowedAuthenticationModes\":[]},\"identity\":{\"principalId\":\"dgak\",\"tenantId\":\"s\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"bzqqedqytbciq\",\"tags\":{\"smodmgloug\":\"flmmnk\",\"wtmutduq\":\"b\"},\"id\":\"ta\",\"name\":\"spwgcuertumkdosv\",\"type\":\"whbmd\"},{\"properties\":{\"accountEndpoint\":\"jfddgmbmbe\",\"nodeManagementEndpoint\":\"pbhtqqrolfpfpsa\",\"provisioningState\":\"Failed\",\"poolAllocationMode\":\"BatchService\",\"publicNetworkAccess\":\"Disabled\",\"privateEndpointConnections\":[],\"dedicatedCoreQuota\":161079646,\"lowPriorityCoreQuota\":243879376,\"dedicatedCoreQuotaPerVMFamily\":[],\"dedicatedCoreQuotaPerVMFamilyEnforced\":false,\"poolQuota\":628087679,\"activeJobAndJobScheduleQuota\":1951867342,\"allowedAuthenticationModes\":[]},\"identity\":{\"principalId\":\"rkujy\",\"tenantId\":\"l\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"vfqawrlyxwjkcpr\",\"tags\":{\"gjvtbv\":\"b\",\"uouq\":\"ysszdnrujqguh\"},\"id\":\"prwzwbnguitnwui\",\"name\":\"gazxuf\",\"type\":\"zuckyfi\"}],\"nextLink\":\"fidfvzw\"}") - .toObject(BatchAccountListResult.class); - Assertions.assertEquals("bvmgxsabkyqduuji", model.value().get(0).location()); - Assertions.assertEquals("czdzev", model.value().get(0).tags().get("dhkrwpdappdsbdk")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("fidfvzw", model.nextLink()); - } - - @Test - public void testSerialize() { - BatchAccountListResult model = - new BatchAccountListResult() - .withValue( - Arrays - .asList( - new BatchAccountInner() - .withLocation("bvmgxsabkyqduuji") - .withTags( - mapOf( - "dhkrwpdappdsbdk", - "czdzev", - "nhutjeltmrldhugj", - "wrwjfeu", - "ablgphuticndvk", - "zdatqxhocdg")) - .withIdentity( - new BatchAccountIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED), - new BatchAccountInner() - .withLocation("bzqqedqytbciq") - .withTags(mapOf("smodmgloug", "flmmnk", "wtmutduq", "b")) - .withIdentity( - new BatchAccountIdentity() - .withType(ResourceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED), - new BatchAccountInner() - .withLocation("vfqawrlyxwjkcpr") - .withTags(mapOf("gjvtbv", "b", "uouq", "ysszdnrujqguh")) - .withIdentity( - new BatchAccountIdentity() - .withType(ResourceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED))) - .withNextLink("fidfvzw"); - model = BinaryData.fromObject(model).toObject(BatchAccountListResult.class); - Assertions.assertEquals("bvmgxsabkyqduuji", model.value().get(0).location()); - Assertions.assertEquals("czdzev", model.value().get(0).tags().get("dhkrwpdappdsbdk")); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals(PublicNetworkAccessType.DISABLED, model.value().get(0).publicNetworkAccess()); - Assertions.assertEquals("fidfvzw", model.nextLink()); - } - - @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/BatchAccountsDeleteMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsDeleteMockTests.java deleted file mode 100644 index 6aa210220c39..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsDeleteMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchAccountsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.batchAccounts().delete("uzqogsexnevf", "nwnwme", 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 deleted file mode 100644 index fe30dd9404d5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,68 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.DetectorResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchAccountsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"value\":\"gdknnqv\"},\"etag\":\"znqntoru\",\"id\":\"sgsahmkycgr\",\"name\":\"uwjuetaeburuvdmo\",\"type\":\"s\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DetectorResponse response = - manager.batchAccounts().getDetectorWithResponse("xqtvcofu", "f", "vkg", Context.NONE).getValue(); - - Assertions.assertEquals("gdknnqv", 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 deleted file mode 100644 index dd0a53869e3d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsGetKeysWithResponseMockTests.java +++ /dev/null @@ -1,64 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.BatchAccountKeys; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchAccountsGetKeysWithResponseMockTests { - @Test - public void testGetKeysWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"accountName\":\"paztzpofncck\",\"primary\":\"fz\",\"secondary\":\"hxx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BatchAccountKeys response = - manager.batchAccounts().getKeysWithResponse("cvinvkjjxdxrbuuk", "clewyhm", 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 deleted file mode 100644 index 0be9cbd65b87..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListDetectorsMockTests.java +++ /dev/null @@ -1,69 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.DetectorResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchAccountsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"value\":\"rjaltolmncw\"},\"etag\":\"bqwcsdbnwdcf\",\"id\":\"ucqdpfuvglsb\",\"name\":\"jcanvxbvtvudut\",\"type\":\"cormr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.batchAccounts().listDetectors("uyqaxzfeqztppr", "o", Context.NONE); - - Assertions.assertEquals("rjaltolmncw", 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 deleted file mode 100644 index 63ce899140fb..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsListOutboundNetworkDependenciesEndpointsMockTests.java +++ /dev/null @@ -1,68 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.OutboundEnvironmentEndpoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchAccountsListOutboundNetworkDependenciesEndpointsMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpoints() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"category\":\"kfbtndoaongbjc\",\"endpoints\":[{\"domainName\":\"i\",\"description\":\"jed\",\"endpointDetails\":[]},{\"domainName\":\"ae\",\"description\":\"ojvdcpzfoqo\",\"endpointDetails\":[]},{\"domainName\":\"bxarzgszufoxci\",\"description\":\"p\",\"endpointDetails\":[]}]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .batchAccounts() - .listOutboundNetworkDependenciesEndpoints("zlxwabmqoefkifr", "tpuqujmq", 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 deleted file mode 100644 index c30067d51aa8..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchAccountsSynchronizeAutoStorageKeysWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchAccountsSynchronizeAutoStorageKeysWithResponseMockTests { - @Test - public void testSynchronizeAutoStorageKeysWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(204); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.batchAccounts().synchronizeAutoStorageKeysWithResponse("r", "tiagx", 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 deleted file mode 100644 index fccf6ad34591..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchLocationQuotaInnerTests.java +++ /dev/null @@ -1,23 +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.fluent.models.BatchLocationQuotaInner; -import org.junit.jupiter.api.Test; - -public final class BatchLocationQuotaInnerTests { - @Test - public void testDeserialize() { - BatchLocationQuotaInner model = - BinaryData.fromString("{\"accountQuota\":1593493877}").toObject(BatchLocationQuotaInner.class); - } - - @Test - public void testSerialize() { - BatchLocationQuotaInner model = new BatchLocationQuotaInner(); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index 4afc3f9bb9ca..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/BatchPoolIdentityTests.java +++ /dev/null @@ -1,52 +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.BatchPoolIdentity; -import com.azure.resourcemanager.batch.models.PoolIdentityType; -import com.azure.resourcemanager.batch.models.UserAssignedIdentities; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BatchPoolIdentityTests { - @Test - public void testDeserialize() { - BatchPoolIdentity model = - BinaryData - .fromString( - "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zzikhlyfjhdg\":{\"principalId\":\"mjwosytx\",\"clientId\":\"cskfcktqumiekk\"},\"dsuvarmywdmjsjqb\":{\"principalId\":\"gebdunygaeq\",\"clientId\":\"bqfatpxllrxcyjmo\"}}}") - .toObject(BatchPoolIdentity.class); - Assertions.assertEquals(PoolIdentityType.USER_ASSIGNED, model.type()); - } - - @Test - public void testSerialize() { - BatchPoolIdentity model = - new BatchPoolIdentity() - .withType(PoolIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "zzikhlyfjhdg", - new UserAssignedIdentities(), - "dsuvarmywdmjsjqb", - new UserAssignedIdentities())); - model = BinaryData.fromObject(model).toObject(BatchPoolIdentity.class); - Assertions.assertEquals(PoolIdentityType.USER_ASSIGNED, model.type()); - } - - @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/CertificateBasePropertiesTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateBasePropertiesTests.java deleted file mode 100644 index d834d9f5c168..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateBasePropertiesTests.java +++ /dev/null @@ -1,37 +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; -import org.junit.jupiter.api.Test; - -public final class CertificateBasePropertiesTests { - @Test - public void testDeserialize() { - CertificateBaseProperties model = - BinaryData - .fromString("{\"thumbprintAlgorithm\":\"tko\",\"thumbprint\":\"kouknvudwtiu\",\"format\":\"Cer\"}") - .toObject(CertificateBaseProperties.class); - Assertions.assertEquals("tko", model.thumbprintAlgorithm()); - Assertions.assertEquals("kouknvudwtiu", model.thumbprint()); - Assertions.assertEquals(CertificateFormat.CER, model.format()); - } - - @Test - public void testSerialize() { - CertificateBaseProperties model = - new CertificateBaseProperties() - .withThumbprintAlgorithm("tko") - .withThumbprint("kouknvudwtiu") - .withFormat(CertificateFormat.CER); - model = BinaryData.fromObject(model).toObject(CertificateBaseProperties.class); - Assertions.assertEquals("tko", model.thumbprintAlgorithm()); - Assertions.assertEquals("kouknvudwtiu", model.thumbprint()); - Assertions.assertEquals(CertificateFormat.CER, 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 c58c483a152f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificateReferenceTests.java +++ /dev/null @@ -1,43 +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; -import org.junit.jupiter.api.Test; - -public final class CertificateReferenceTests { - @Test - public void testDeserialize() { - CertificateReference model = - BinaryData - .fromString( - "{\"id\":\"vpa\",\"storeLocation\":\"LocalMachine\",\"storeName\":\"qqu\",\"visibility\":[\"RemoteUser\"]}") - .toObject(CertificateReference.class); - Assertions.assertEquals("vpa", model.id()); - Assertions.assertEquals(CertificateStoreLocation.LOCAL_MACHINE, model.storeLocation()); - Assertions.assertEquals("qqu", model.storeName()); - Assertions.assertEquals(CertificateVisibility.REMOTE_USER, model.visibility().get(0)); - } - - @Test - public void testSerialize() { - CertificateReference model = - new CertificateReference() - .withId("vpa") - .withStoreLocation(CertificateStoreLocation.LOCAL_MACHINE) - .withStoreName("qqu") - .withVisibility(Arrays.asList(CertificateVisibility.REMOTE_USER)); - model = BinaryData.fromObject(model).toObject(CertificateReference.class); - Assertions.assertEquals("vpa", model.id()); - Assertions.assertEquals(CertificateStoreLocation.LOCAL_MACHINE, model.storeLocation()); - Assertions.assertEquals("qqu", model.storeName()); - Assertions.assertEquals(CertificateVisibility.REMOTE_USER, 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 43811a81bc01..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CertificatesDeleteMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("eaxhcexdrrvqahqk", "htpwij", "hyjsvfycx", 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 deleted file mode 100644 index 8fc321047145..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityParametersTests.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.CheckNameAvailabilityParameters; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityParametersTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityParameters model = - BinaryData.fromString("{\"name\":\"oczvy\"}").toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("oczvy", model.name()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityParameters model = new CheckNameAvailabilityParameters().withName("oczvy"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityParameters.class); - Assertions.assertEquals("oczvy", model.name()); - } -} 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 deleted file mode 100644 index 69956b96f39f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CheckNameAvailabilityResultInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.CheckNameAvailabilityResultInner; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityResultInnerTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityResultInner model = - BinaryData - .fromString("{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"dvjsllrmvvdf\"}") - .toObject(CheckNameAvailabilityResultInner.class); - } - - @Test - public void testSerialize() { - 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/CloudServiceConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CloudServiceConfigurationTests.java deleted file mode 100644 index 8d8039a81f91..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/CloudServiceConfigurationTests.java +++ /dev/null @@ -1,31 +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.CloudServiceConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CloudServiceConfigurationTests { - @Test - public void testDeserialize() { - CloudServiceConfiguration model = - BinaryData - .fromString("{\"osFamily\":\"b\",\"osVersion\":\"ceopzfqrhhuaopp\"}") - .toObject(CloudServiceConfiguration.class); - Assertions.assertEquals("b", model.osFamily()); - Assertions.assertEquals("ceopzfqrhhuaopp", model.osVersion()); - } - - @Test - public void testSerialize() { - CloudServiceConfiguration model = - new CloudServiceConfiguration().withOsFamily("b").withOsVersion("ceopzfqrhhuaopp"); - model = BinaryData.fromObject(model).toObject(CloudServiceConfiguration.class); - Assertions.assertEquals("b", model.osFamily()); - Assertions.assertEquals("ceopzfqrhhuaopp", model.osVersion()); - } -} 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 deleted file mode 100644 index efe3f4b326eb..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ComputeNodeIdentityReferenceTests.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.ComputeNodeIdentityReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ComputeNodeIdentityReferenceTests { - @Test - public void testDeserialize() { - ComputeNodeIdentityReference model = - BinaryData.fromString("{\"resourceId\":\"zlhjxrifkwmrvkt\"}").toObject(ComputeNodeIdentityReference.class); - Assertions.assertEquals("zlhjxrifkwmrvkt", model.resourceId()); - } - - @Test - public void testSerialize() { - ComputeNodeIdentityReference model = new ComputeNodeIdentityReference().withResourceId("zlhjxrifkwmrvkt"); - model = BinaryData.fromObject(model).toObject(ComputeNodeIdentityReference.class); - Assertions.assertEquals("zlhjxrifkwmrvkt", model.resourceId()); - } -} 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 deleted file mode 100644 index aaca3b2f0d41..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DataDiskTests.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; - -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.StorageAccountType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DataDiskTests { - @Test - public void testDeserialize() { - DataDisk model = - BinaryData - .fromString( - "{\"lun\":1420775781,\"caching\":\"ReadWrite\",\"diskSizeGB\":75465955,\"storageAccountType\":\"Standard_LRS\"}") - .toObject(DataDisk.class); - Assertions.assertEquals(1420775781, model.lun()); - Assertions.assertEquals(CachingType.READ_WRITE, model.caching()); - Assertions.assertEquals(75465955, model.diskSizeGB()); - Assertions.assertEquals(StorageAccountType.STANDARD_LRS, model.storageAccountType()); - } - - @Test - public void testSerialize() { - DataDisk model = - new DataDisk() - .withLun(1420775781) - .withCaching(CachingType.READ_WRITE) - .withDiskSizeGB(75465955) - .withStorageAccountType(StorageAccountType.STANDARD_LRS); - model = BinaryData.fromObject(model).toObject(DataDisk.class); - Assertions.assertEquals(1420775781, model.lun()); - Assertions.assertEquals(CachingType.READ_WRITE, model.caching()); - Assertions.assertEquals(75465955, model.diskSizeGB()); - Assertions.assertEquals(StorageAccountType.STANDARD_LRS, model.storageAccountType()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DeploymentConfigurationTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DeploymentConfigurationTests.java deleted file mode 100644 index e436a354f157..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DeploymentConfigurationTests.java +++ /dev/null @@ -1,203 +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.CachingType; -import com.azure.resourcemanager.batch.models.CloudServiceConfiguration; -import com.azure.resourcemanager.batch.models.ContainerConfiguration; -import com.azure.resourcemanager.batch.models.DataDisk; -import com.azure.resourcemanager.batch.models.DeploymentConfiguration; -import com.azure.resourcemanager.batch.models.DiskEncryptionConfiguration; -import com.azure.resourcemanager.batch.models.DiskEncryptionTarget; -import com.azure.resourcemanager.batch.models.ImageReference; -import com.azure.resourcemanager.batch.models.NodePlacementConfiguration; -import com.azure.resourcemanager.batch.models.NodePlacementPolicyType; -import com.azure.resourcemanager.batch.models.OSDisk; -import com.azure.resourcemanager.batch.models.StorageAccountType; -import com.azure.resourcemanager.batch.models.VMExtension; -import com.azure.resourcemanager.batch.models.VirtualMachineConfiguration; -import com.azure.resourcemanager.batch.models.WindowsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DeploymentConfigurationTests { - @Test - public void testDeserialize() { - DeploymentConfiguration model = - BinaryData - .fromString( - "{\"cloudServiceConfiguration\":{\"osFamily\":\"lupj\",\"osVersion\":\"hfxobbcswsrtj\"},\"virtualMachineConfiguration\":{\"imageReference\":{\"publisher\":\"lrbpbewtghfgbl\",\"offer\":\"wxzvlvqhjkb\",\"sku\":\"ibtnmxiebwwaloay\",\"version\":\"gwrtzju\",\"id\":\"wyzmhtxon\"},\"nodeAgentSkuId\":\"mtsavjcbpwxqp\",\"windowsConfiguration\":{\"enableAutomaticUpdates\":true},\"dataDisks\":[{\"lun\":810124654,\"caching\":\"None\",\"diskSizeGB\":1935483255,\"storageAccountType\":\"Premium_LRS\"},{\"lun\":2067966148,\"caching\":\"ReadWrite\",\"diskSizeGB\":499230067,\"storageAccountType\":\"Premium_LRS\"},{\"lun\":1448281883,\"caching\":\"ReadOnly\",\"diskSizeGB\":1468047146,\"storageAccountType\":\"Premium_LRS\"}],\"licenseType\":\"riwwroy\",\"containerConfiguration\":{\"containerImageNames\":[\"rmcqiby\",\"nojvknmefqsg\",\"vah\",\"pjyzhpv\"],\"containerRegistries\":[]},\"diskEncryptionConfiguration\":{\"targets\":[\"TemporaryDisk\",\"TemporaryDisk\",\"OsDisk\"]},\"nodePlacementConfiguration\":{\"policy\":\"Zonal\"},\"extensions\":[{\"name\":\"lxkvu\",\"publisher\":\"fhzovawjvzunluth\",\"type\":\"n\",\"typeHandlerVersion\":\"nxipeil\",\"autoUpgradeMinorVersion\":false,\"settings\":\"dataaejxd\",\"protectedSettings\":\"datatskzbbtdzumveek\",\"provisionAfterExtensions\":[]},{\"name\":\"wozuhkf\",\"publisher\":\"bsjyofdx\",\"type\":\"uusdttouwa\",\"typeHandlerVersion\":\"ekqvkeln\",\"autoUpgradeMinorVersion\":true,\"settings\":\"dataxwyjsflhhc\",\"protectedSettings\":\"datalnjixisxya\",\"provisionAfterExtensions\":[]},{\"name\":\"oyaqcslyjpkiid\",\"publisher\":\"yexz\",\"type\":\"eli\",\"typeHandlerVersion\":\"nr\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datalhbnxkna\",\"protectedSettings\":\"dataulppggdtpnapnyir\",\"provisionAfterExtensions\":[]},{\"name\":\"uhpigvp\",\"publisher\":\"ylgqgitxmedjvcsl\",\"type\":\"n\",\"typeHandlerVersion\":\"wncwzzhxgktrmg\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datapkteo\",\"protectedSettings\":\"datalwptfdy\",\"provisionAfterExtensions\":[]}],\"osDisk\":{}}}") - .toObject(DeploymentConfiguration.class); - Assertions.assertEquals("lupj", model.cloudServiceConfiguration().osFamily()); - Assertions.assertEquals("hfxobbcswsrtj", model.cloudServiceConfiguration().osVersion()); - Assertions.assertEquals("lrbpbewtghfgbl", model.virtualMachineConfiguration().imageReference().publisher()); - Assertions.assertEquals("wxzvlvqhjkb", model.virtualMachineConfiguration().imageReference().offer()); - Assertions.assertEquals("ibtnmxiebwwaloay", model.virtualMachineConfiguration().imageReference().sku()); - Assertions.assertEquals("gwrtzju", model.virtualMachineConfiguration().imageReference().version()); - Assertions.assertEquals("wyzmhtxon", model.virtualMachineConfiguration().imageReference().id()); - Assertions.assertEquals("mtsavjcbpwxqp", model.virtualMachineConfiguration().nodeAgentSkuId()); - Assertions - .assertEquals(true, model.virtualMachineConfiguration().windowsConfiguration().enableAutomaticUpdates()); - Assertions.assertEquals(810124654, model.virtualMachineConfiguration().dataDisks().get(0).lun()); - Assertions.assertEquals(CachingType.NONE, model.virtualMachineConfiguration().dataDisks().get(0).caching()); - Assertions.assertEquals(1935483255, model.virtualMachineConfiguration().dataDisks().get(0).diskSizeGB()); - Assertions - .assertEquals( - StorageAccountType.PREMIUM_LRS, - model.virtualMachineConfiguration().dataDisks().get(0).storageAccountType()); - Assertions.assertEquals("riwwroy", model.virtualMachineConfiguration().licenseType()); - Assertions - .assertEquals( - "rmcqiby", model.virtualMachineConfiguration().containerConfiguration().containerImageNames().get(0)); - Assertions - .assertEquals( - DiskEncryptionTarget.TEMPORARY_DISK, - model.virtualMachineConfiguration().diskEncryptionConfiguration().targets().get(0)); - Assertions - .assertEquals( - NodePlacementPolicyType.ZONAL, - model.virtualMachineConfiguration().nodePlacementConfiguration().policy()); - Assertions.assertEquals("lxkvu", model.virtualMachineConfiguration().extensions().get(0).name()); - Assertions - .assertEquals("fhzovawjvzunluth", model.virtualMachineConfiguration().extensions().get(0).publisher()); - Assertions.assertEquals("n", model.virtualMachineConfiguration().extensions().get(0).type()); - Assertions - .assertEquals("nxipeil", model.virtualMachineConfiguration().extensions().get(0).typeHandlerVersion()); - Assertions - .assertEquals(false, model.virtualMachineConfiguration().extensions().get(0).autoUpgradeMinorVersion()); - } - - @Test - public void testSerialize() { - DeploymentConfiguration model = - new DeploymentConfiguration() - .withCloudServiceConfiguration( - new CloudServiceConfiguration().withOsFamily("lupj").withOsVersion("hfxobbcswsrtj")) - .withVirtualMachineConfiguration( - new VirtualMachineConfiguration() - .withImageReference( - new ImageReference() - .withPublisher("lrbpbewtghfgbl") - .withOffer("wxzvlvqhjkb") - .withSku("ibtnmxiebwwaloay") - .withVersion("gwrtzju") - .withId("wyzmhtxon")) - .withNodeAgentSkuId("mtsavjcbpwxqp") - .withWindowsConfiguration(new WindowsConfiguration().withEnableAutomaticUpdates(true)) - .withDataDisks( - Arrays - .asList( - new DataDisk() - .withLun(810124654) - .withCaching(CachingType.NONE) - .withDiskSizeGB(1935483255) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS), - new DataDisk() - .withLun(2067966148) - .withCaching(CachingType.READ_WRITE) - .withDiskSizeGB(499230067) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS), - new DataDisk() - .withLun(1448281883) - .withCaching(CachingType.READ_ONLY) - .withDiskSizeGB(1468047146) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS))) - .withLicenseType("riwwroy") - .withContainerConfiguration( - new ContainerConfiguration() - .withContainerImageNames(Arrays.asList("rmcqiby", "nojvknmefqsg", "vah", "pjyzhpv")) - .withContainerRegistries(Arrays.asList())) - .withDiskEncryptionConfiguration( - new DiskEncryptionConfiguration() - .withTargets( - Arrays - .asList( - DiskEncryptionTarget.TEMPORARY_DISK, - DiskEncryptionTarget.TEMPORARY_DISK, - DiskEncryptionTarget.OS_DISK))) - .withNodePlacementConfiguration( - new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.ZONAL)) - .withExtensions( - Arrays - .asList( - new VMExtension() - .withName("lxkvu") - .withPublisher("fhzovawjvzunluth") - .withType("n") - .withTypeHandlerVersion("nxipeil") - .withAutoUpgradeMinorVersion(false) - .withSettings("dataaejxd") - .withProtectedSettings("datatskzbbtdzumveek") - .withProvisionAfterExtensions(Arrays.asList()), - new VMExtension() - .withName("wozuhkf") - .withPublisher("bsjyofdx") - .withType("uusdttouwa") - .withTypeHandlerVersion("ekqvkeln") - .withAutoUpgradeMinorVersion(true) - .withSettings("dataxwyjsflhhc") - .withProtectedSettings("datalnjixisxya") - .withProvisionAfterExtensions(Arrays.asList()), - new VMExtension() - .withName("oyaqcslyjpkiid") - .withPublisher("yexz") - .withType("eli") - .withTypeHandlerVersion("nr") - .withAutoUpgradeMinorVersion(true) - .withSettings("datalhbnxkna") - .withProtectedSettings("dataulppggdtpnapnyir") - .withProvisionAfterExtensions(Arrays.asList()), - new VMExtension() - .withName("uhpigvp") - .withPublisher("ylgqgitxmedjvcsl") - .withType("n") - .withTypeHandlerVersion("wncwzzhxgktrmg") - .withAutoUpgradeMinorVersion(true) - .withSettings("datapkteo") - .withProtectedSettings("datalwptfdy") - .withProvisionAfterExtensions(Arrays.asList()))) - .withOsDisk(new OSDisk())); - model = BinaryData.fromObject(model).toObject(DeploymentConfiguration.class); - Assertions.assertEquals("lupj", model.cloudServiceConfiguration().osFamily()); - Assertions.assertEquals("hfxobbcswsrtj", model.cloudServiceConfiguration().osVersion()); - Assertions.assertEquals("lrbpbewtghfgbl", model.virtualMachineConfiguration().imageReference().publisher()); - Assertions.assertEquals("wxzvlvqhjkb", model.virtualMachineConfiguration().imageReference().offer()); - Assertions.assertEquals("ibtnmxiebwwaloay", model.virtualMachineConfiguration().imageReference().sku()); - Assertions.assertEquals("gwrtzju", model.virtualMachineConfiguration().imageReference().version()); - Assertions.assertEquals("wyzmhtxon", model.virtualMachineConfiguration().imageReference().id()); - Assertions.assertEquals("mtsavjcbpwxqp", model.virtualMachineConfiguration().nodeAgentSkuId()); - Assertions - .assertEquals(true, model.virtualMachineConfiguration().windowsConfiguration().enableAutomaticUpdates()); - Assertions.assertEquals(810124654, model.virtualMachineConfiguration().dataDisks().get(0).lun()); - Assertions.assertEquals(CachingType.NONE, model.virtualMachineConfiguration().dataDisks().get(0).caching()); - Assertions.assertEquals(1935483255, model.virtualMachineConfiguration().dataDisks().get(0).diskSizeGB()); - Assertions - .assertEquals( - StorageAccountType.PREMIUM_LRS, - model.virtualMachineConfiguration().dataDisks().get(0).storageAccountType()); - Assertions.assertEquals("riwwroy", model.virtualMachineConfiguration().licenseType()); - Assertions - .assertEquals( - "rmcqiby", model.virtualMachineConfiguration().containerConfiguration().containerImageNames().get(0)); - Assertions - .assertEquals( - DiskEncryptionTarget.TEMPORARY_DISK, - model.virtualMachineConfiguration().diskEncryptionConfiguration().targets().get(0)); - Assertions - .assertEquals( - NodePlacementPolicyType.ZONAL, - model.virtualMachineConfiguration().nodePlacementConfiguration().policy()); - Assertions.assertEquals("lxkvu", model.virtualMachineConfiguration().extensions().get(0).name()); - Assertions - .assertEquals("fhzovawjvzunluth", model.virtualMachineConfiguration().extensions().get(0).publisher()); - Assertions.assertEquals("n", model.virtualMachineConfiguration().extensions().get(0).type()); - Assertions - .assertEquals("nxipeil", model.virtualMachineConfiguration().extensions().get(0).typeHandlerVersion()); - Assertions - .assertEquals(false, model.virtualMachineConfiguration().extensions().get(0).autoUpgradeMinorVersion()); - } -} 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 deleted file mode 100644 index 7eacbb6fe7e1..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorListResultTests.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; - -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 org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DetectorListResultTests { - @Test - public void testDeserialize() { - DetectorListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"value\":\"dpydn\"},\"etag\":\"hxdeoejz\",\"id\":\"cwif\",\"name\":\"jttgzf\",\"type\":\"ishc\"},{\"properties\":{\"value\":\"ajdeyeamdphaga\"},\"etag\":\"buxwgip\",\"id\":\"honowkgshwank\",\"name\":\"xzbinjeputt\",\"type\":\"rywn\"},{\"properties\":{\"value\":\"qftiy\"},\"etag\":\"rnkcqvyxlw\",\"id\":\"zlsico\",\"name\":\"oqqnwvlryav\",\"type\":\"hheunmmqhgyx\"},{\"properties\":{\"value\":\"noc\"},\"etag\":\"oklyaxuconuq\",\"id\":\"zf\",\"name\":\"beypewrmjmw\",\"type\":\"vjektcxsenh\"}],\"nextLink\":\"rsffrzpwvlqdqgbi\"}") - .toObject(DetectorListResult.class); - Assertions.assertEquals("dpydn", model.value().get(0).value()); - Assertions.assertEquals("rsffrzpwvlqdqgbi", model.nextLink()); - } - - @Test - public void testSerialize() { - DetectorListResult model = - new DetectorListResult() - .withValue( - Arrays - .asList( - new DetectorResponseInner().withValue("dpydn"), - new DetectorResponseInner().withValue("ajdeyeamdphaga"), - new DetectorResponseInner().withValue("qftiy"), - new DetectorResponseInner().withValue("noc"))) - .withNextLink("rsffrzpwvlqdqgbi"); - model = BinaryData.fromObject(model).toObject(DetectorListResult.class); - Assertions.assertEquals("dpydn", model.value().get(0).value()); - Assertions.assertEquals("rsffrzpwvlqdqgbi", 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 deleted file mode 100644 index 3c0003c25c38..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponseInnerTests.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.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.DetectorResponseInner; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DetectorResponseInnerTests { - @Test - public void testDeserialize() { - DetectorResponseInner model = - BinaryData - .fromString( - "{\"properties\":{\"value\":\"ihkaetcktvfc\"},\"etag\":\"fsnkymuctq\",\"id\":\"jf\",\"name\":\"ebrjcxe\",\"type\":\"fuwutttxf\"}") - .toObject(DetectorResponseInner.class); - Assertions.assertEquals("ihkaetcktvfc", model.value()); - } - - @Test - public void testSerialize() { - DetectorResponseInner model = new DetectorResponseInner().withValue("ihkaetcktvfc"); - model = BinaryData.fromObject(model).toObject(DetectorResponseInner.class); - Assertions.assertEquals("ihkaetcktvfc", 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 deleted file mode 100644 index 8ebc0e508d89..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DetectorResponsePropertiesTests.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.fluent.models.DetectorResponseProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DetectorResponsePropertiesTests { - @Test - public void testDeserialize() { - DetectorResponseProperties model = - BinaryData.fromString("{\"value\":\"rbirphxe\"}").toObject(DetectorResponseProperties.class); - Assertions.assertEquals("rbirphxe", model.value()); - } - - @Test - public void testSerialize() { - DetectorResponseProperties model = new DetectorResponseProperties().withValue("rbirphxe"); - model = BinaryData.fromObject(model).toObject(DetectorResponseProperties.class); - Assertions.assertEquals("rbirphxe", 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 deleted file mode 100644 index 87493fd5c2db..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiffDiskSettingsTests.java +++ /dev/null @@ -1,27 +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.DiffDiskPlacement; -import com.azure.resourcemanager.batch.models.DiffDiskSettings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiffDiskSettingsTests { - @Test - public void testDeserialize() { - DiffDiskSettings model = - BinaryData.fromString("{\"placement\":\"CacheDisk\"}").toObject(DiffDiskSettings.class); - Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.placement()); - } - - @Test - public void testSerialize() { - DiffDiskSettings model = new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK); - model = BinaryData.fromObject(model).toObject(DiffDiskSettings.class); - Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.placement()); - } -} 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 48574b5016f4..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/DiskEncryptionConfigurationTests.java +++ /dev/null @@ -1,32 +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; -import org.junit.jupiter.api.Test; - -public final class DiskEncryptionConfigurationTests { - @Test - public void testDeserialize() { - DiskEncryptionConfiguration model = - BinaryData - .fromString("{\"targets\":[\"TemporaryDisk\",\"OsDisk\"]}") - .toObject(DiskEncryptionConfiguration.class); - Assertions.assertEquals(DiskEncryptionTarget.TEMPORARY_DISK, model.targets().get(0)); - } - - @Test - public void testSerialize() { - DiskEncryptionConfiguration model = - new DiskEncryptionConfiguration() - .withTargets(Arrays.asList(DiskEncryptionTarget.TEMPORARY_DISK, DiskEncryptionTarget.OS_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/EndpointAccessProfileTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointAccessProfileTests.java deleted file mode 100644 index 6f0ee62f0c66..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointAccessProfileTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.EndpointAccessDefaultAction; -import com.azure.resourcemanager.batch.models.EndpointAccessProfile; -import com.azure.resourcemanager.batch.models.IpRule; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EndpointAccessProfileTests { - @Test - public void testDeserialize() { - EndpointAccessProfile model = - BinaryData - .fromString( - "{\"defaultAction\":\"Allow\",\"ipRules\":[{\"value\":\"uksjtxukcdmp\"},{\"value\":\"rcryuanzwuxzdxta\"},{\"value\":\"rlhm\"}]}") - .toObject(EndpointAccessProfile.class); - Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals("uksjtxukcdmp", model.ipRules().get(0).value()); - } - - @Test - public void testSerialize() { - EndpointAccessProfile model = - new EndpointAccessProfile() - .withDefaultAction(EndpointAccessDefaultAction.ALLOW) - .withIpRules( - Arrays - .asList( - new IpRule().withValue("uksjtxukcdmp"), - new IpRule().withValue("rcryuanzwuxzdxta"), - new IpRule().withValue("rlhm"))); - model = BinaryData.fromObject(model).toObject(EndpointAccessProfile.class); - Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.defaultAction()); - Assertions.assertEquals("uksjtxukcdmp", 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 deleted file mode 100644 index b0ab22481e2d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDependencyTests.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.EndpointDependency; -import org.junit.jupiter.api.Test; - -public final class EndpointDependencyTests { - @Test - public void testDeserialize() { - EndpointDependency model = - BinaryData - .fromString( - "{\"domainName\":\"cqqudf\",\"description\":\"yxbaaabjyvayf\",\"endpointDetails\":[{\"port\":1578513386}]}") - .toObject(EndpointDependency.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 481e79d1b081..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EndpointDetailTests.java +++ /dev/null @@ -1,22 +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.EndpointDetail; -import org.junit.jupiter.api.Test; - -public final class EndpointDetailTests { - @Test - public void testDeserialize() { - EndpointDetail model = BinaryData.fromString("{\"port\":543650546}").toObject(EndpointDetail.class); - } - - @Test - public void testSerialize() { - EndpointDetail model = new EndpointDetail(); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index b06d01bbfa4d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/EnvironmentSettingTests.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.EnvironmentSetting; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentSettingTests { - @Test - public void testDeserialize() { - EnvironmentSetting model = - BinaryData - .fromString("{\"name\":\"mypyynpcdpu\",\"value\":\"zgmwznmabikns\"}") - .toObject(EnvironmentSetting.class); - Assertions.assertEquals("mypyynpcdpu", model.name()); - Assertions.assertEquals("zgmwznmabikns", model.value()); - } - - @Test - public void testSerialize() { - EnvironmentSetting model = new EnvironmentSetting().withName("mypyynpcdpu").withValue("zgmwznmabikns"); - model = BinaryData.fromObject(model).toObject(EnvironmentSetting.class); - Assertions.assertEquals("mypyynpcdpu", model.name()); - Assertions.assertEquals("zgmwznmabikns", 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 deleted file mode 100644 index d113bc44eadc..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/FixedScaleSettingsTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.ComputeNodeDeallocationOption; -import com.azure.resourcemanager.batch.models.FixedScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class FixedScaleSettingsTests { - @Test - public void testDeserialize() { - FixedScaleSettings model = - BinaryData - .fromString( - "{\"resizeTimeout\":\"PT105H19S\",\"targetDedicatedNodes\":1458027183,\"targetLowPriorityNodes\":1149443455,\"nodeDeallocationOption\":\"TaskCompletion\"}") - .toObject(FixedScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT105H19S"), model.resizeTimeout()); - Assertions.assertEquals(1458027183, model.targetDedicatedNodes()); - Assertions.assertEquals(1149443455, model.targetLowPriorityNodes()); - Assertions.assertEquals(ComputeNodeDeallocationOption.TASK_COMPLETION, model.nodeDeallocationOption()); - } - - @Test - public void testSerialize() { - FixedScaleSettings model = - new FixedScaleSettings() - .withResizeTimeout(Duration.parse("PT105H19S")) - .withTargetDedicatedNodes(1458027183) - .withTargetLowPriorityNodes(1149443455) - .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION); - model = BinaryData.fromObject(model).toObject(FixedScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT105H19S"), model.resizeTimeout()); - Assertions.assertEquals(1458027183, model.targetDedicatedNodes()); - Assertions.assertEquals(1149443455, 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/ImageReferenceTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ImageReferenceTests.java deleted file mode 100644 index f4708881d706..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ImageReferenceTests.java +++ /dev/null @@ -1,43 +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.ImageReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ImageReferenceTests { - @Test - public void testDeserialize() { - ImageReference model = - BinaryData - .fromString( - "{\"publisher\":\"qfsubcgjbirx\",\"offer\":\"ybsrfbjfdtwss\",\"sku\":\"ftpvjzbexil\",\"version\":\"nfqqnvwp\",\"id\":\"taruoujmkcj\"}") - .toObject(ImageReference.class); - Assertions.assertEquals("qfsubcgjbirx", model.publisher()); - Assertions.assertEquals("ybsrfbjfdtwss", model.offer()); - Assertions.assertEquals("ftpvjzbexil", model.sku()); - Assertions.assertEquals("nfqqnvwp", model.version()); - Assertions.assertEquals("taruoujmkcj", model.id()); - } - - @Test - public void testSerialize() { - ImageReference model = - new ImageReference() - .withPublisher("qfsubcgjbirx") - .withOffer("ybsrfbjfdtwss") - .withSku("ftpvjzbexil") - .withVersion("nfqqnvwp") - .withId("taruoujmkcj"); - model = BinaryData.fromObject(model).toObject(ImageReference.class); - Assertions.assertEquals("qfsubcgjbirx", model.publisher()); - Assertions.assertEquals("ybsrfbjfdtwss", model.offer()); - Assertions.assertEquals("ftpvjzbexil", model.sku()); - Assertions.assertEquals("nfqqnvwp", model.version()); - Assertions.assertEquals("taruoujmkcj", model.id()); - } -} 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 deleted file mode 100644 index 8b248a4b5e67..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/InboundNatPoolTests.java +++ /dev/null @@ -1,79 +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.InboundEndpointProtocol; -import com.azure.resourcemanager.batch.models.InboundNatPool; -import com.azure.resourcemanager.batch.models.NetworkSecurityGroupRule; -import com.azure.resourcemanager.batch.models.NetworkSecurityGroupRuleAccess; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class InboundNatPoolTests { - @Test - public void testDeserialize() { - InboundNatPool model = - BinaryData - .fromString( - "{\"name\":\"bhjpglkfgohdne\",\"protocol\":\"TCP\",\"backendPort\":1635108212,\"frontendPortRangeStart\":2052379315,\"frontendPortRangeEnd\":1976701075,\"networkSecurityGroupRules\":[{\"priority\":2019789161,\"access\":\"Deny\",\"sourceAddressPrefix\":\"htozfikdow\",\"sourcePortRanges\":[\"uvxzxclvi\",\"hhqzonosgg\"]},{\"priority\":745673634,\"access\":\"Allow\",\"sourceAddressPrefix\":\"ohfwds\",\"sourcePortRanges\":[\"aljutiiswac\"]},{\"priority\":1975902978,\"access\":\"Allow\",\"sourceAddressPrefix\":\"dkzzewkfvhqcrail\",\"sourcePortRanges\":[\"ppfufl\"]},{\"priority\":888986239,\"access\":\"Deny\",\"sourceAddressPrefix\":\"mh\",\"sourcePortRanges\":[\"yjrxsagafcnih\",\"wqapnedgfbcvk\",\"vq\",\"pkeqdcvdrhvoo\"]}]}") - .toObject(InboundNatPool.class); - Assertions.assertEquals("bhjpglkfgohdne", model.name()); - Assertions.assertEquals(InboundEndpointProtocol.TCP, model.protocol()); - Assertions.assertEquals(1635108212, model.backendPort()); - Assertions.assertEquals(2052379315, model.frontendPortRangeStart()); - Assertions.assertEquals(1976701075, model.frontendPortRangeEnd()); - Assertions.assertEquals(2019789161, model.networkSecurityGroupRules().get(0).priority()); - Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("htozfikdow", model.networkSecurityGroupRules().get(0).sourceAddressPrefix()); - Assertions.assertEquals("uvxzxclvi", model.networkSecurityGroupRules().get(0).sourcePortRanges().get(0)); - } - - @Test - public void testSerialize() { - InboundNatPool model = - new InboundNatPool() - .withName("bhjpglkfgohdne") - .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(1635108212) - .withFrontendPortRangeStart(2052379315) - .withFrontendPortRangeEnd(1976701075) - .withNetworkSecurityGroupRules( - Arrays - .asList( - new NetworkSecurityGroupRule() - .withPriority(2019789161) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("htozfikdow") - .withSourcePortRanges(Arrays.asList("uvxzxclvi", "hhqzonosgg")), - new NetworkSecurityGroupRule() - .withPriority(745673634) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("ohfwds") - .withSourcePortRanges(Arrays.asList("aljutiiswac")), - new NetworkSecurityGroupRule() - .withPriority(1975902978) - .withAccess(NetworkSecurityGroupRuleAccess.ALLOW) - .withSourceAddressPrefix("dkzzewkfvhqcrail") - .withSourcePortRanges(Arrays.asList("ppfufl")), - new NetworkSecurityGroupRule() - .withPriority(888986239) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("mh") - .withSourcePortRanges( - Arrays.asList("yjrxsagafcnih", "wqapnedgfbcvk", "vq", "pkeqdcvdrhvoo")))); - model = BinaryData.fromObject(model).toObject(InboundNatPool.class); - Assertions.assertEquals("bhjpglkfgohdne", model.name()); - Assertions.assertEquals(InboundEndpointProtocol.TCP, model.protocol()); - Assertions.assertEquals(1635108212, model.backendPort()); - Assertions.assertEquals(2052379315, model.frontendPortRangeStart()); - Assertions.assertEquals(1976701075, model.frontendPortRangeEnd()); - Assertions.assertEquals(2019789161, model.networkSecurityGroupRules().get(0).priority()); - Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.networkSecurityGroupRules().get(0).access()); - Assertions.assertEquals("htozfikdow", model.networkSecurityGroupRules().get(0).sourceAddressPrefix()); - Assertions.assertEquals("uvxzxclvi", 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 deleted file mode 100644 index 4960427517c1..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/IpRuleTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.IpRule; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IpRuleTests { - @Test - public void testDeserialize() { - IpRule model = BinaryData.fromString("{\"value\":\"hfpmrqobmtukknr\"}").toObject(IpRule.class); - Assertions.assertEquals("hfpmrqobmtukknr", model.value()); - } - - @Test - public void testSerialize() { - IpRule model = new IpRule().withValue("hfpmrqobmtukknr"); - model = BinaryData.fromObject(model).toObject(IpRule.class); - Assertions.assertEquals("hfpmrqobmtukknr", 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 deleted file mode 100644 index 9c701bc465d1..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/KeyVaultReferenceTests.java +++ /dev/null @@ -1,28 +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.KeyVaultReference; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class KeyVaultReferenceTests { - @Test - public void testDeserialize() { - KeyVaultReference model = - BinaryData.fromString("{\"id\":\"izntocipao\",\"url\":\"ajpsquc\"}").toObject(KeyVaultReference.class); - Assertions.assertEquals("izntocipao", model.id()); - Assertions.assertEquals("ajpsquc", model.url()); - } - - @Test - public void testSerialize() { - KeyVaultReference model = new KeyVaultReference().withId("izntocipao").withUrl("ajpsquc"); - model = BinaryData.fromObject(model).toObject(KeyVaultReference.class); - Assertions.assertEquals("izntocipao", model.id()); - Assertions.assertEquals("ajpsquc", 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 deleted file mode 100644 index 3739f8717848..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationPackagesResultTests.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.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 org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ListApplicationPackagesResultTests { - @Test - public void testDeserialize() { - ListApplicationPackagesResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"state\":\"Active\",\"format\":\"whijcoejctbza\",\"storageUrl\":\"qsycbkbfkgu\",\"storageUrlExpiry\":\"2021-02-11T20:09:09Z\",\"lastActivationTime\":\"2021-09-14T22:19:30Z\"},\"etag\":\"ppofmxaxcfjpgdd\",\"id\":\"ocjjxhvpmouexh\",\"name\":\"zxibqeoj\",\"type\":\"xqbzvddntwnd\"},{\"properties\":{\"state\":\"Active\",\"format\":\"w\",\"storageUrl\":\"zao\",\"storageUrlExpiry\":\"2021-06-27T05:29:39Z\",\"lastActivationTime\":\"2021-09-17T10:09:05Z\"},\"etag\":\"cffcyddglmj\",\"id\":\"hjq\",\"name\":\"wpyeicxmqciwqvh\",\"type\":\"hix\"},{\"properties\":{\"state\":\"Pending\",\"format\":\"opbobj\",\"storageUrl\":\"hm\",\"storageUrlExpiry\":\"2021-10-27T21:17:16Z\",\"lastActivationTime\":\"2021-10-29T01:50:02Z\"},\"etag\":\"uhrzayvvt\",\"id\":\"gvdfgiotkftutq\",\"name\":\"ln\",\"type\":\"xlefgugnxkrx\"},{\"properties\":{\"state\":\"Pending\",\"format\":\"tthzrvqd\",\"storageUrl\":\"bhj\",\"storageUrlExpiry\":\"2021-09-14T02:51:19Z\",\"lastActivationTime\":\"2021-06-25T18:07:24Z\"},\"etag\":\"oqfbowskanyk\",\"id\":\"zlcuiywgqywgndrv\",\"name\":\"nhzgpphrcgyn\",\"type\":\"ocpecfvmmco\"}],\"nextLink\":\"sxlzevgbmqj\"}") - .toObject(ListApplicationPackagesResult.class); - Assertions.assertEquals("sxlzevgbmqj", model.nextLink()); - } - - @Test - public void testSerialize() { - ListApplicationPackagesResult model = - new ListApplicationPackagesResult() - .withValue( - Arrays - .asList( - new ApplicationPackageInner(), - new ApplicationPackageInner(), - new ApplicationPackageInner(), - new ApplicationPackageInner())) - .withNextLink("sxlzevgbmqj"); - model = BinaryData.fromObject(model).toObject(ListApplicationPackagesResult.class); - Assertions.assertEquals("sxlzevgbmqj", 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 deleted file mode 100644 index 4ba7f9ba8cb7..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListApplicationsResultTests.java +++ /dev/null @@ -1,46 +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.fluent.models.ApplicationInner; -import com.azure.resourcemanager.batch.models.ListApplicationsResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ListApplicationsResultTests { - @Test - public void testDeserialize() { - ListApplicationsResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"zloc\",\"allowUpdates\":false,\"defaultVersion\":\"aierhhb\"},\"etag\":\"glu\",\"id\":\"majtjaod\",\"name\":\"obnbdxkqpxokaj\",\"type\":\"onpimexgstxg\"}],\"nextLink\":\"odgmaajrmvdjwz\"}") - .toObject(ListApplicationsResult.class); - Assertions.assertEquals("zloc", model.value().get(0).displayName()); - Assertions.assertEquals(false, model.value().get(0).allowUpdates()); - Assertions.assertEquals("aierhhb", model.value().get(0).defaultVersion()); - Assertions.assertEquals("odgmaajrmvdjwz", model.nextLink()); - } - - @Test - public void testSerialize() { - ListApplicationsResult model = - new ListApplicationsResult() - .withValue( - Arrays - .asList( - new ApplicationInner() - .withDisplayName("zloc") - .withAllowUpdates(false) - .withDefaultVersion("aierhhb"))) - .withNextLink("odgmaajrmvdjwz"); - model = BinaryData.fromObject(model).toObject(ListApplicationsResult.class); - Assertions.assertEquals("zloc", model.value().get(0).displayName()); - Assertions.assertEquals(false, model.value().get(0).allowUpdates()); - Assertions.assertEquals("aierhhb", model.value().get(0).defaultVersion()); - Assertions.assertEquals("odgmaajrmvdjwz", model.nextLink()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListCertificatesResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListCertificatesResultTests.java deleted file mode 100644 index 6220da18cc1d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListCertificatesResultTests.java +++ /dev/null @@ -1,47 +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.fluent.models.CertificateInner; -import com.azure.resourcemanager.batch.models.CertificateFormat; -import com.azure.resourcemanager.batch.models.ListCertificatesResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ListCertificatesResultTests { - @Test - public void testDeserialize() { - ListCertificatesResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"provisioningStateTransitionTime\":\"2021-11-08T07:16:59Z\",\"previousProvisioningState\":\"Deleting\",\"previousProvisioningStateTransitionTime\":\"2021-05-09T09:45:07Z\",\"publicData\":\"czwtruwiqzbqjv\",\"thumbprintAlgorithm\":\"myokacspkwlh\",\"thumbprint\":\"obpxjmflbvvn\",\"format\":\"Cer\"},\"etag\":\"cciw\",\"id\":\"zjuqkhrsaj\",\"name\":\"wkuofoskghsauu\",\"type\":\"mjmvxieduugidyjr\"}],\"nextLink\":\"byao\"}") - .toObject(ListCertificatesResult.class); - Assertions.assertEquals("myokacspkwlh", model.value().get(0).thumbprintAlgorithm()); - Assertions.assertEquals("obpxjmflbvvn", model.value().get(0).thumbprint()); - Assertions.assertEquals(CertificateFormat.CER, model.value().get(0).format()); - Assertions.assertEquals("byao", model.nextLink()); - } - - @Test - public void testSerialize() { - ListCertificatesResult model = - new ListCertificatesResult() - .withValue( - Arrays - .asList( - new CertificateInner() - .withThumbprintAlgorithm("myokacspkwlh") - .withThumbprint("obpxjmflbvvn") - .withFormat(CertificateFormat.CER))) - .withNextLink("byao"); - model = BinaryData.fromObject(model).toObject(ListCertificatesResult.class); - Assertions.assertEquals("myokacspkwlh", model.value().get(0).thumbprintAlgorithm()); - Assertions.assertEquals("obpxjmflbvvn", model.value().get(0).thumbprint()); - Assertions.assertEquals(CertificateFormat.CER, model.value().get(0).format()); - Assertions.assertEquals("byao", model.nextLink()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPoolsResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPoolsResultTests.java deleted file mode 100644 index b4e5e09fa77f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPoolsResultTests.java +++ /dev/null @@ -1,129 +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.fluent.models.PoolInner; -import com.azure.resourcemanager.batch.models.BatchPoolIdentity; -import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; -import com.azure.resourcemanager.batch.models.ListPoolsResult; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; -import com.azure.resourcemanager.batch.models.PoolIdentityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ListPoolsResultTests { - @Test - public void testDeserialize() { - ListPoolsResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"bniwdj\",\"lastModified\":\"2021-04-13T19:54:16Z\",\"creationTime\":\"2021-09-04T13:55:51Z\",\"provisioningState\":\"Succeeded\",\"provisioningStateTransitionTime\":\"2020-12-28T00:18:51Z\",\"allocationState\":\"Stopping\",\"allocationStateTransitionTime\":\"2020-12-28T21:21:46Z\",\"vmSize\":\"hpzxbzpfzab\",\"currentDedicatedNodes\":2112719993,\"currentLowPriorityNodes\":2068547199,\"interNodeCommunication\":\"Enabled\",\"taskSlotsPerNode\":228169976,\"userAccounts\":[],\"metadata\":[],\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[],\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Classic\",\"currentNodeCommunicationMode\":\"Simplified\"},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{}},\"etag\":\"uosvmkfssxqukk\",\"id\":\"plgmgsxnk\",\"name\":\"zkd\",\"type\":\"slpvlop\"},{\"properties\":{\"displayName\":\"ighxpk\",\"lastModified\":\"2021-07-23T09:06:10Z\",\"creationTime\":\"2021-11-18T13:59:23Z\",\"provisioningState\":\"Deleting\",\"provisioningStateTransitionTime\":\"2021-05-16T00:27:54Z\",\"allocationState\":\"Steady\",\"allocationStateTransitionTime\":\"2021-01-25T19:39:32Z\",\"vmSize\":\"yqupedeojnabckh\",\"currentDedicatedNodes\":1104061727,\"currentLowPriorityNodes\":2144077110,\"interNodeCommunication\":\"Disabled\",\"taskSlotsPerNode\":1926869194,\"userAccounts\":[],\"metadata\":[],\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[],\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Classic\",\"currentNodeCommunicationMode\":\"Simplified\"},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{}},\"etag\":\"ldwkyzxuutkn\",\"id\":\"ws\",\"name\":\"wsvlxotogtwrupqs\",\"type\":\"vnm\"},{\"properties\":{\"displayName\":\"kvceoveilovnotyf\",\"lastModified\":\"2021-11-08T07:56:07Z\",\"creationTime\":\"2021-12-10T12:36:27Z\",\"provisioningState\":\"Succeeded\",\"provisioningStateTransitionTime\":\"2021-07-23T19:08:12Z\",\"allocationState\":\"Steady\",\"allocationStateTransitionTime\":\"2021-07-21T19:51:01Z\",\"vmSize\":\"tkphywpnvjtoqn\",\"currentDedicatedNodes\":927719856,\"currentLowPriorityNodes\":661305446,\"interNodeCommunication\":\"Enabled\",\"taskSlotsPerNode\":1113646218,\"userAccounts\":[],\"metadata\":[],\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[],\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Classic\",\"currentNodeCommunicationMode\":\"Default\"},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{}},\"etag\":\"ugxywpmueef\",\"id\":\"zwfqkqujidsuyon\",\"name\":\"bglaocqxtccm\",\"type\":\"yudxytlmoy\"},{\"properties\":{\"displayName\":\"wfudwpzntxhdzhl\",\"lastModified\":\"2021-08-04T21:14:04Z\",\"creationTime\":\"2021-03-06T10:40:17Z\",\"provisioningState\":\"Deleting\",\"provisioningStateTransitionTime\":\"2021-02-03T03:57:15Z\",\"allocationState\":\"Steady\",\"allocationStateTransitionTime\":\"2021-10-29T04:01:01Z\",\"vmSize\":\"bkyvp\",\"currentDedicatedNodes\":220305332,\"currentLowPriorityNodes\":106855620,\"interNodeCommunication\":\"Disabled\",\"taskSlotsPerNode\":172271307,\"userAccounts\":[],\"metadata\":[],\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[],\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Classic\",\"currentNodeCommunicationMode\":\"Default\"},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{}},\"etag\":\"us\",\"id\":\"tslhspkdeem\",\"name\":\"ofmxagkvtmelmqkr\",\"type\":\"ahvljuaha\"}],\"nextLink\":\"hcdhmdual\"}") - .toObject(ListPoolsResult.class); - Assertions.assertEquals(PoolIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("bniwdj", model.value().get(0).displayName()); - Assertions.assertEquals("hpzxbzpfzab", model.value().get(0).vmSize()); - Assertions.assertEquals(InterNodeCommunicationState.ENABLED, model.value().get(0).interNodeCommunication()); - Assertions.assertEquals(228169976, model.value().get(0).taskSlotsPerNode()); - Assertions.assertEquals(NodeCommunicationMode.CLASSIC, model.value().get(0).targetNodeCommunicationMode()); - Assertions.assertEquals("hcdhmdual", model.nextLink()); - } - - @Test - public void testSerialize() { - ListPoolsResult model = - new ListPoolsResult() - .withValue( - Arrays - .asList( - new PoolInner() - .withIdentity( - new BatchPoolIdentity() - .withType(PoolIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withDisplayName("bniwdj") - .withVmSize("hpzxbzpfzab") - .withInterNodeCommunication(InterNodeCommunicationState.ENABLED) - .withTaskSlotsPerNode(228169976) - .withUserAccounts(Arrays.asList()) - .withMetadata(Arrays.asList()) - .withCertificates(Arrays.asList()) - .withApplicationPackages(Arrays.asList()) - .withApplicationLicenses(Arrays.asList()) - .withMountConfiguration(Arrays.asList()) - .withTargetNodeCommunicationMode(NodeCommunicationMode.CLASSIC), - new PoolInner() - .withIdentity( - new BatchPoolIdentity() - .withType(PoolIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withDisplayName("ighxpk") - .withVmSize("yqupedeojnabckh") - .withInterNodeCommunication(InterNodeCommunicationState.DISABLED) - .withTaskSlotsPerNode(1926869194) - .withUserAccounts(Arrays.asList()) - .withMetadata(Arrays.asList()) - .withCertificates(Arrays.asList()) - .withApplicationPackages(Arrays.asList()) - .withApplicationLicenses(Arrays.asList()) - .withMountConfiguration(Arrays.asList()) - .withTargetNodeCommunicationMode(NodeCommunicationMode.CLASSIC), - new PoolInner() - .withIdentity( - new BatchPoolIdentity() - .withType(PoolIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withDisplayName("kvceoveilovnotyf") - .withVmSize("tkphywpnvjtoqn") - .withInterNodeCommunication(InterNodeCommunicationState.ENABLED) - .withTaskSlotsPerNode(1113646218) - .withUserAccounts(Arrays.asList()) - .withMetadata(Arrays.asList()) - .withCertificates(Arrays.asList()) - .withApplicationPackages(Arrays.asList()) - .withApplicationLicenses(Arrays.asList()) - .withMountConfiguration(Arrays.asList()) - .withTargetNodeCommunicationMode(NodeCommunicationMode.CLASSIC), - new PoolInner() - .withIdentity( - new BatchPoolIdentity() - .withType(PoolIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withDisplayName("wfudwpzntxhdzhl") - .withVmSize("bkyvp") - .withInterNodeCommunication(InterNodeCommunicationState.DISABLED) - .withTaskSlotsPerNode(172271307) - .withUserAccounts(Arrays.asList()) - .withMetadata(Arrays.asList()) - .withCertificates(Arrays.asList()) - .withApplicationPackages(Arrays.asList()) - .withApplicationLicenses(Arrays.asList()) - .withMountConfiguration(Arrays.asList()) - .withTargetNodeCommunicationMode(NodeCommunicationMode.CLASSIC))) - .withNextLink("hcdhmdual"); - model = BinaryData.fromObject(model).toObject(ListPoolsResult.class); - Assertions.assertEquals(PoolIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("bniwdj", model.value().get(0).displayName()); - Assertions.assertEquals("hpzxbzpfzab", model.value().get(0).vmSize()); - Assertions.assertEquals(InterNodeCommunicationState.ENABLED, model.value().get(0).interNodeCommunication()); - Assertions.assertEquals(228169976, model.value().get(0).taskSlotsPerNode()); - Assertions.assertEquals(NodeCommunicationMode.CLASSIC, model.value().get(0).targetNodeCommunicationMode()); - Assertions.assertEquals("hcdhmdual", model.nextLink()); - } - - @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/ListPrivateEndpointConnectionsResultTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateEndpointConnectionsResultTests.java deleted file mode 100644 index faf15c97529f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateEndpointConnectionsResultTests.java +++ /dev/null @@ -1,34 +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.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.batch.models.ListPrivateEndpointConnectionsResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ListPrivateEndpointConnectionsResultTests { - @Test - public void testDeserialize() { - ListPrivateEndpointConnectionsResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Cancelled\",\"groupIds\":[]},\"etag\":\"ckzywbiexzfeyue\",\"id\":\"xibxujwbhqwalm\",\"name\":\"zyoxaepdkzjan\",\"type\":\"ux\"}],\"nextLink\":\"d\"}") - .toObject(ListPrivateEndpointConnectionsResult.class); - Assertions.assertEquals("d", model.nextLink()); - } - - @Test - public void testSerialize() { - ListPrivateEndpointConnectionsResult model = - new ListPrivateEndpointConnectionsResult() - .withValue(Arrays.asList(new PrivateEndpointConnectionInner())) - .withNextLink("d"); - model = BinaryData.fromObject(model).toObject(ListPrivateEndpointConnectionsResult.class); - Assertions.assertEquals("d", 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 deleted file mode 100644 index 0d88b042a1d5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ListPrivateLinkResourcesResultTests.java +++ /dev/null @@ -1,34 +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.fluent.models.PrivateLinkResourceInner; -import com.azure.resourcemanager.batch.models.ListPrivateLinkResourcesResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ListPrivateLinkResourcesResultTests { - @Test - public void testDeserialize() { - ListPrivateLinkResourcesResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"hfnljkyq\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"etag\":\"ujqgidok\",\"id\":\"jljyoxgv\",\"name\":\"ltbgsncghkj\",\"type\":\"szzhbijhtxfvgxbf\"}],\"nextLink\":\"xnehmpvec\"}") - .toObject(ListPrivateLinkResourcesResult.class); - Assertions.assertEquals("xnehmpvec", model.nextLink()); - } - - @Test - public void testSerialize() { - ListPrivateLinkResourcesResult model = - new ListPrivateLinkResourcesResult() - .withValue(Arrays.asList(new PrivateLinkResourceInner())) - .withNextLink("xnehmpvec"); - model = BinaryData.fromObject(model).toObject(ListPrivateLinkResourcesResult.class); - Assertions.assertEquals("xnehmpvec", 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 deleted file mode 100644 index 9bbfd2d9d644..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,69 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.CheckNameAvailabilityParameters; -import com.azure.resourcemanager.batch.models.CheckNameAvailabilityResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"AlreadyExists\",\"message\":\"ftnkhtj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResult response = - manager - .locations() - .checkNameAvailabilityWithResponse( - "njv", new CheckNameAvailabilityParameters().withName("dw"), 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 deleted file mode 100644 index 41644d800cff..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsGetQuotasWithResponseMockTests.java +++ /dev/null @@ -1,63 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.BatchLocationQuota; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsGetQuotasWithResponseMockTests { - @Test - public void testGetQuotasWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"accountQuota\":376601626}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BatchLocationQuota response = manager.locations().getQuotasWithResponse("qfhwyg", Context.NONE).getValue(); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedCloudServiceSkusMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedCloudServiceSkusMockTests.java deleted file mode 100644 index aad2129218a7..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedCloudServiceSkusMockTests.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.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.SupportedSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsListSupportedCloudServiceSkusMockTests { - @Test - public void testListSupportedCloudServiceSkus() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"ob\",\"familyName\":\"gxedkow\",\"capabilities\":[{\"name\":\"pc\",\"value\":\"kbwcc\"}]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.locations().listSupportedCloudServiceSkus("feo", 1181848977, "rqwky", Context.NONE); - } -} 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 deleted file mode 100644 index 1aff6b2df0ed..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/LocationsListSupportedVirtualMachineSkusMockTests.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.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.SupportedSku; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LocationsListSupportedVirtualMachineSkusMockTests { - @Test - public void testListSupportedVirtualMachineSkus() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"psqxq\",\"familyName\":\"svuo\",\"capabilities\":[{\"name\":\"celve\",\"value\":\"ypql\"}]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.locations().listSupportedVirtualMachineSkus("dnkfx", 10642389, "emdwzrmuhapfc", Context.NONE); - } -} 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 deleted file mode 100644 index 206bc83ccb3d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/MetadataItemTests.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.MetadataItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class MetadataItemTests { - @Test - public void testDeserialize() { - MetadataItem model = - BinaryData - .fromString("{\"name\":\"ouyftaakc\",\"value\":\"wiyzvqtmnubexkp\"}") - .toObject(MetadataItem.class); - Assertions.assertEquals("ouyftaakc", model.name()); - Assertions.assertEquals("wiyzvqtmnubexkp", model.value()); - } - - @Test - public void testSerialize() { - MetadataItem model = new MetadataItem().withName("ouyftaakc").withValue("wiyzvqtmnubexkp"); - model = BinaryData.fromObject(model).toObject(MetadataItem.class); - Assertions.assertEquals("ouyftaakc", model.name()); - Assertions.assertEquals("wiyzvqtmnubexkp", 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 deleted file mode 100644 index 623f46c34c80..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkConfigurationTests.java +++ /dev/null @@ -1,97 +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.DynamicVNetAssignmentScope; -import com.azure.resourcemanager.batch.models.InboundEndpointProtocol; -import com.azure.resourcemanager.batch.models.InboundNatPool; -import com.azure.resourcemanager.batch.models.IpAddressProvisioningType; -import com.azure.resourcemanager.batch.models.NetworkConfiguration; -import com.azure.resourcemanager.batch.models.PoolEndpointConfiguration; -import com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NetworkConfigurationTests { - @Test - public void testDeserialize() { - NetworkConfiguration model = - BinaryData - .fromString( - "{\"subnetId\":\"z\",\"dynamicVnetAssignmentScope\":\"job\",\"endpointConfiguration\":{\"inboundNatPools\":[{\"name\":\"vmkqzeqq\",\"protocol\":\"TCP\",\"backendPort\":52302074,\"frontendPortRangeStart\":750386751,\"frontendPortRangeEnd\":1896660287,\"networkSecurityGroupRules\":[]},{\"name\":\"xmhhvhgureo\",\"protocol\":\"UDP\",\"backendPort\":1245356368,\"frontendPortRangeStart\":1250108412,\"frontendPortRangeEnd\":1368192153,\"networkSecurityGroupRules\":[]},{\"name\":\"agxti\",\"protocol\":\"TCP\",\"backendPort\":897567613,\"frontendPortRangeStart\":1120938995,\"frontendPortRangeEnd\":2091557827,\"networkSecurityGroupRules\":[]}]},\"publicIPAddressConfiguration\":{\"provision\":\"NoPublicIPAddresses\",\"ipAddressIds\":[\"gqxndlkzgxhuripl\",\"podxunkb\",\"bxmubyynt\",\"lrb\"]}}") - .toObject(NetworkConfiguration.class); - Assertions.assertEquals("z", model.subnetId()); - Assertions.assertEquals(DynamicVNetAssignmentScope.JOB, model.dynamicVnetAssignmentScope()); - Assertions.assertEquals("vmkqzeqq", model.endpointConfiguration().inboundNatPools().get(0).name()); - Assertions - .assertEquals( - InboundEndpointProtocol.TCP, model.endpointConfiguration().inboundNatPools().get(0).protocol()); - Assertions.assertEquals(52302074, model.endpointConfiguration().inboundNatPools().get(0).backendPort()); - Assertions - .assertEquals(750386751, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeStart()); - Assertions - .assertEquals(1896660287, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeEnd()); - Assertions - .assertEquals( - IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES, model.publicIpAddressConfiguration().provision()); - Assertions.assertEquals("gqxndlkzgxhuripl", model.publicIpAddressConfiguration().ipAddressIds().get(0)); - } - - @Test - public void testSerialize() { - NetworkConfiguration model = - new NetworkConfiguration() - .withSubnetId("z") - .withDynamicVnetAssignmentScope(DynamicVNetAssignmentScope.JOB) - .withEndpointConfiguration( - new PoolEndpointConfiguration() - .withInboundNatPools( - Arrays - .asList( - new InboundNatPool() - .withName("vmkqzeqq") - .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(52302074) - .withFrontendPortRangeStart(750386751) - .withFrontendPortRangeEnd(1896660287) - .withNetworkSecurityGroupRules(Arrays.asList()), - new InboundNatPool() - .withName("xmhhvhgureo") - .withProtocol(InboundEndpointProtocol.UDP) - .withBackendPort(1245356368) - .withFrontendPortRangeStart(1250108412) - .withFrontendPortRangeEnd(1368192153) - .withNetworkSecurityGroupRules(Arrays.asList()), - new InboundNatPool() - .withName("agxti") - .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(897567613) - .withFrontendPortRangeStart(1120938995) - .withFrontendPortRangeEnd(2091557827) - .withNetworkSecurityGroupRules(Arrays.asList())))) - .withPublicIpAddressConfiguration( - new PublicIpAddressConfiguration() - .withProvision(IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES) - .withIpAddressIds(Arrays.asList("gqxndlkzgxhuripl", "podxunkb", "bxmubyynt", "lrb"))); - model = BinaryData.fromObject(model).toObject(NetworkConfiguration.class); - Assertions.assertEquals("z", model.subnetId()); - Assertions.assertEquals(DynamicVNetAssignmentScope.JOB, model.dynamicVnetAssignmentScope()); - Assertions.assertEquals("vmkqzeqq", model.endpointConfiguration().inboundNatPools().get(0).name()); - Assertions - .assertEquals( - InboundEndpointProtocol.TCP, model.endpointConfiguration().inboundNatPools().get(0).protocol()); - Assertions.assertEquals(52302074, model.endpointConfiguration().inboundNatPools().get(0).backendPort()); - Assertions - .assertEquals(750386751, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeStart()); - Assertions - .assertEquals(1896660287, model.endpointConfiguration().inboundNatPools().get(0).frontendPortRangeEnd()); - Assertions - .assertEquals( - IpAddressProvisioningType.NO_PUBLIC_IPADDRESSES, model.publicIpAddressConfiguration().provision()); - Assertions.assertEquals("gqxndlkzgxhuripl", model.publicIpAddressConfiguration().ipAddressIds().get(0)); - } -} 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 deleted file mode 100644 index 6921594a253f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkProfileTests.java +++ /dev/null @@ -1,55 +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.EndpointAccessDefaultAction; -import com.azure.resourcemanager.batch.models.EndpointAccessProfile; -import com.azure.resourcemanager.batch.models.IpRule; -import com.azure.resourcemanager.batch.models.NetworkProfile; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NetworkProfileTests { - @Test - public void testDeserialize() { - NetworkProfile model = - BinaryData - .fromString( - "{\"accountAccess\":{\"defaultAction\":\"Allow\",\"ipRules\":[{\"value\":\"dkfo\"},{\"value\":\"knygjofjddeq\"}]},\"nodeManagementAccess\":{\"defaultAction\":\"Deny\",\"ipRules\":[{\"value\":\"pewnw\"},{\"value\":\"eitjz\"},{\"value\":\"flusarhmof\"},{\"value\":\"qhsmyurkdtml\"}]}}") - .toObject(NetworkProfile.class); - Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.accountAccess().defaultAction()); - Assertions.assertEquals("dkfo", model.accountAccess().ipRules().get(0).value()); - Assertions.assertEquals(EndpointAccessDefaultAction.DENY, model.nodeManagementAccess().defaultAction()); - Assertions.assertEquals("pewnw", model.nodeManagementAccess().ipRules().get(0).value()); - } - - @Test - public void testSerialize() { - NetworkProfile model = - new NetworkProfile() - .withAccountAccess( - new EndpointAccessProfile() - .withDefaultAction(EndpointAccessDefaultAction.ALLOW) - .withIpRules( - Arrays.asList(new IpRule().withValue("dkfo"), new IpRule().withValue("knygjofjddeq")))) - .withNodeManagementAccess( - new EndpointAccessProfile() - .withDefaultAction(EndpointAccessDefaultAction.DENY) - .withIpRules( - Arrays - .asList( - new IpRule().withValue("pewnw"), - new IpRule().withValue("eitjz"), - new IpRule().withValue("flusarhmof"), - new IpRule().withValue("qhsmyurkdtml")))); - model = BinaryData.fromObject(model).toObject(NetworkProfile.class); - Assertions.assertEquals(EndpointAccessDefaultAction.ALLOW, model.accountAccess().defaultAction()); - Assertions.assertEquals("dkfo", model.accountAccess().ipRules().get(0).value()); - Assertions.assertEquals(EndpointAccessDefaultAction.DENY, model.nodeManagementAccess().defaultAction()); - Assertions.assertEquals("pewnw", 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 deleted file mode 100644 index d18c310d7155..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NetworkSecurityGroupRuleTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.NetworkSecurityGroupRule; -import com.azure.resourcemanager.batch.models.NetworkSecurityGroupRuleAccess; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NetworkSecurityGroupRuleTests { - @Test - public void testDeserialize() { - NetworkSecurityGroupRule model = - BinaryData - .fromString( - "{\"priority\":1383619855,\"access\":\"Deny\",\"sourceAddressPrefix\":\"tbobz\",\"sourcePortRanges\":[\"cjwvn\",\"dldwmgxc\"]}") - .toObject(NetworkSecurityGroupRule.class); - Assertions.assertEquals(1383619855, model.priority()); - Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.access()); - Assertions.assertEquals("tbobz", model.sourceAddressPrefix()); - Assertions.assertEquals("cjwvn", model.sourcePortRanges().get(0)); - } - - @Test - public void testSerialize() { - NetworkSecurityGroupRule model = - new NetworkSecurityGroupRule() - .withPriority(1383619855) - .withAccess(NetworkSecurityGroupRuleAccess.DENY) - .withSourceAddressPrefix("tbobz") - .withSourcePortRanges(Arrays.asList("cjwvn", "dldwmgxc")); - model = BinaryData.fromObject(model).toObject(NetworkSecurityGroupRule.class); - Assertions.assertEquals(1383619855, model.priority()); - Assertions.assertEquals(NetworkSecurityGroupRuleAccess.DENY, model.access()); - Assertions.assertEquals("tbobz", model.sourceAddressPrefix()); - Assertions.assertEquals("cjwvn", model.sourcePortRanges().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 deleted file mode 100644 index 5a15b249a14c..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NfsMountConfigurationTests.java +++ /dev/null @@ -1,37 +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.NfsMountConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NfsMountConfigurationTests { - @Test - public void testDeserialize() { - NfsMountConfiguration model = - BinaryData - .fromString( - "{\"source\":\"wi\",\"relativeMountPath\":\"fnjhfjxwmszkkfo\",\"mountOptions\":\"eyfkzikfja\"}") - .toObject(NfsMountConfiguration.class); - Assertions.assertEquals("wi", model.source()); - Assertions.assertEquals("fnjhfjxwmszkkfo", model.relativeMountPath()); - Assertions.assertEquals("eyfkzikfja", model.mountOptions()); - } - - @Test - public void testSerialize() { - NfsMountConfiguration model = - new NfsMountConfiguration() - .withSource("wi") - .withRelativeMountPath("fnjhfjxwmszkkfo") - .withMountOptions("eyfkzikfja"); - model = BinaryData.fromObject(model).toObject(NfsMountConfiguration.class); - Assertions.assertEquals("wi", model.source()); - Assertions.assertEquals("fnjhfjxwmszkkfo", model.relativeMountPath()); - Assertions.assertEquals("eyfkzikfja", 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 deleted file mode 100644 index e9fe2d1935e7..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/NodePlacementConfigurationTests.java +++ /dev/null @@ -1,28 +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.NodePlacementConfiguration; -import com.azure.resourcemanager.batch.models.NodePlacementPolicyType; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NodePlacementConfigurationTests { - @Test - public void testDeserialize() { - NodePlacementConfiguration model = - BinaryData.fromString("{\"policy\":\"Regional\"}").toObject(NodePlacementConfiguration.class); - Assertions.assertEquals(NodePlacementPolicyType.REGIONAL, model.policy()); - } - - @Test - public void testSerialize() { - NodePlacementConfiguration model = - new NodePlacementConfiguration().withPolicy(NodePlacementPolicyType.REGIONAL); - model = BinaryData.fromObject(model).toObject(NodePlacementConfiguration.class); - Assertions.assertEquals(NodePlacementPolicyType.REGIONAL, 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 deleted file mode 100644 index 406f1058e2d4..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OSDiskTests.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.DiffDiskPlacement; -import com.azure.resourcemanager.batch.models.DiffDiskSettings; -import com.azure.resourcemanager.batch.models.OSDisk; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OSDiskTests { - @Test - public void testDeserialize() { - OSDisk model = - BinaryData.fromString("{\"ephemeralOSDiskSettings\":{\"placement\":\"CacheDisk\"}}").toObject(OSDisk.class); - Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.ephemeralOSDiskSettings().placement()); - } - - @Test - public void testSerialize() { - OSDisk model = - new OSDisk() - .withEphemeralOSDiskSettings(new DiffDiskSettings().withPlacement(DiffDiskPlacement.CACHE_DISK)); - model = BinaryData.fromObject(model).toObject(OSDisk.class); - Assertions.assertEquals(DiffDiskPlacement.CACHE_DISK, model.ephemeralOSDiskSettings().placement()); - } -} 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 deleted file mode 100644 index e043395d583f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationDisplayTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"ocfs\",\"operation\":\"s\",\"resource\":\"ddystkiiuxhqy\",\"description\":\"xorrqnb\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("ocfs", model.provider()); - Assertions.assertEquals("s", model.operation()); - Assertions.assertEquals("ddystkiiuxhqy", model.resource()); - Assertions.assertEquals("xorrqnb", model.description()); - } - - @Test - public void testSerialize() { - OperationDisplay model = - new OperationDisplay() - .withProvider("ocfs") - .withOperation("s") - .withResource("ddystkiiuxhqy") - .withDescription("xorrqnb"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("ocfs", model.provider()); - Assertions.assertEquals("s", model.operation()); - Assertions.assertEquals("ddystkiiuxhqy", model.resource()); - Assertions.assertEquals("xorrqnb", 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 deleted file mode 100644 index 4f2120566ae4..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationInnerTests.java +++ /dev/null @@ -1,53 +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.fluent.models.OperationInner; -import com.azure.resourcemanager.batch.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationInnerTests { - @Test - public void testDeserialize() { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"fhyhltrpmopjmcma\",\"isDataAction\":false,\"display\":{\"provider\":\"hfuiuaodsfc\",\"operation\":\"vxodpu\",\"resource\":\"myzydagfuaxbez\",\"description\":\"uokktwhrdxwz\"},\"origin\":\"q\",\"properties\":\"databsureximo\"}") - .toObject(OperationInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("hfuiuaodsfc", model.display().provider()); - Assertions.assertEquals("vxodpu", model.display().operation()); - Assertions.assertEquals("myzydagfuaxbez", model.display().resource()); - Assertions.assertEquals("uokktwhrdxwz", model.display().description()); - Assertions.assertEquals("q", model.origin()); - } - - @Test - public void testSerialize() { - OperationInner model = - new OperationInner() - .withName("fhyhltrpmopjmcma") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("hfuiuaodsfc") - .withOperation("vxodpu") - .withResource("myzydagfuaxbez") - .withDescription("uokktwhrdxwz")) - .withOrigin("q") - .withProperties("databsureximo"); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("fhyhltrpmopjmcma", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("hfuiuaodsfc", model.display().provider()); - Assertions.assertEquals("vxodpu", model.display().operation()); - Assertions.assertEquals("myzydagfuaxbez", model.display().resource()); - Assertions.assertEquals("uokktwhrdxwz", model.display().description()); - Assertions.assertEquals("q", 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 deleted file mode 100644 index e87de7e8a77f..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationListResultTests.java +++ /dev/null @@ -1,95 +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.fluent.models.OperationInner; -import com.azure.resourcemanager.batch.models.OperationDisplay; -import com.azure.resourcemanager.batch.models.OperationListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationListResultTests { - @Test - public void testDeserialize() { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"hcbonqvpkvlr\",\"isDataAction\":false,\"display\":{\"provider\":\"seiphe\",\"operation\":\"lokeyy\",\"resource\":\"nj\",\"description\":\"lwtgrhpdj\"},\"origin\":\"umasxazjpq\",\"properties\":\"datagual\"},{\"name\":\"xxhejjzzvd\",\"isDataAction\":true,\"display\":{\"provider\":\"slfhotwm\",\"operation\":\"npwlbjnpg\",\"resource\":\"ftadehxnltyfs\",\"description\":\"pusuesn\"},\"origin\":\"dejbavo\",\"properties\":\"datazdmohctbqvu\"},{\"name\":\"xdn\",\"isDataAction\":false,\"display\":{\"provider\":\"gujjugwdkcglh\",\"operation\":\"azjdyggd\",\"resource\":\"ixhbkuofqweykhm\",\"description\":\"evfyexfwhybcib\"},\"origin\":\"vdcsitynn\",\"properties\":\"datamdectehfiqscjey\"},{\"name\":\"hezrkgq\",\"isDataAction\":true,\"display\":{\"provider\":\"fovgmkqsleyyvxy\",\"operation\":\"pkc\",\"resource\":\"tpngjcrcczsqpjh\",\"description\":\"daj\"},\"origin\":\"ysou\",\"properties\":\"datae\"}],\"nextLink\":\"noae\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("hcbonqvpkvlr", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("seiphe", model.value().get(0).display().provider()); - Assertions.assertEquals("lokeyy", model.value().get(0).display().operation()); - Assertions.assertEquals("nj", model.value().get(0).display().resource()); - Assertions.assertEquals("lwtgrhpdj", model.value().get(0).display().description()); - Assertions.assertEquals("umasxazjpq", model.value().get(0).origin()); - Assertions.assertEquals("noae", model.nextLink()); - } - - @Test - public void testSerialize() { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("hcbonqvpkvlr") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("seiphe") - .withOperation("lokeyy") - .withResource("nj") - .withDescription("lwtgrhpdj")) - .withOrigin("umasxazjpq") - .withProperties("datagual"), - new OperationInner() - .withName("xxhejjzzvd") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("slfhotwm") - .withOperation("npwlbjnpg") - .withResource("ftadehxnltyfs") - .withDescription("pusuesn")) - .withOrigin("dejbavo") - .withProperties("datazdmohctbqvu"), - new OperationInner() - .withName("xdn") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("gujjugwdkcglh") - .withOperation("azjdyggd") - .withResource("ixhbkuofqweykhm") - .withDescription("evfyexfwhybcib")) - .withOrigin("vdcsitynn") - .withProperties("datamdectehfiqscjey"), - new OperationInner() - .withName("hezrkgq") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("fovgmkqsleyyvxy") - .withOperation("pkc") - .withResource("tpngjcrcczsqpjh") - .withDescription("daj")) - .withOrigin("ysou") - .withProperties("datae"))) - .withNextLink("noae"); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("hcbonqvpkvlr", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("seiphe", model.value().get(0).display().provider()); - Assertions.assertEquals("lokeyy", model.value().get(0).display().operation()); - Assertions.assertEquals("nj", model.value().get(0).display().resource()); - Assertions.assertEquals("lwtgrhpdj", model.value().get(0).display().description()); - Assertions.assertEquals("umasxazjpq", model.value().get(0).origin()); - Assertions.assertEquals("noae", 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 deleted file mode 100644 index 35daefc9bb8b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OperationsListMockTests.java +++ /dev/null @@ -1,74 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"i\",\"isDataAction\":false,\"display\":{\"provider\":\"atmtdhtmdvy\",\"operation\":\"ikdgszywkbir\",\"resource\":\"uzhlhkjoqrv\",\"description\":\"aatjinrvgoupmfi\"},\"origin\":\"fggjioolvr\",\"properties\":\"datakvtkkg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(Context.NONE); - - Assertions.assertEquals("i", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("atmtdhtmdvy", response.iterator().next().display().provider()); - Assertions.assertEquals("ikdgszywkbir", response.iterator().next().display().operation()); - Assertions.assertEquals("uzhlhkjoqrv", response.iterator().next().display().resource()); - Assertions.assertEquals("aatjinrvgoupmfi", response.iterator().next().display().description()); - Assertions.assertEquals("fggjioolvr", 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 deleted file mode 100644 index 00445a003323..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointCollectionTests.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.OutboundEnvironmentEndpointCollection; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OutboundEnvironmentEndpointCollectionTests { - @Test - public void testDeserialize() { - OutboundEnvironmentEndpointCollection model = - BinaryData - .fromString( - "{\"value\":[{\"category\":\"x\",\"endpoints\":[]},{\"category\":\"yc\",\"endpoints\":[]},{\"category\":\"p\",\"endpoints\":[]},{\"category\":\"ymareqnajxqugj\",\"endpoints\":[]}],\"nextLink\":\"ubeddg\"}") - .toObject(OutboundEnvironmentEndpointCollection.class); - Assertions.assertEquals("ubeddg", model.nextLink()); - } - - @Test - public void testSerialize() { - OutboundEnvironmentEndpointCollection model = - new OutboundEnvironmentEndpointCollection().withNextLink("ubeddg"); - model = BinaryData.fromObject(model).toObject(OutboundEnvironmentEndpointCollection.class); - Assertions.assertEquals("ubeddg", 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 deleted file mode 100644 index 2384220beb45..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/OutboundEnvironmentEndpointInnerTests.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.fluent.models.OutboundEnvironmentEndpointInner; -import org.junit.jupiter.api.Test; - -public final class OutboundEnvironmentEndpointInnerTests { - @Test - public void testDeserialize() { - OutboundEnvironmentEndpointInner model = - BinaryData - .fromString( - "{\"category\":\"ofwq\",\"endpoints\":[{\"domainName\":\"lkrm\",\"description\":\"i\",\"endpointDetails\":[]}]}") - .toObject(OutboundEnvironmentEndpointInner.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index e1c870217bc3..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolEndpointConfigurationTests.java +++ /dev/null @@ -1,65 +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.InboundEndpointProtocol; -import com.azure.resourcemanager.batch.models.InboundNatPool; -import com.azure.resourcemanager.batch.models.PoolEndpointConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PoolEndpointConfigurationTests { - @Test - public void testDeserialize() { - PoolEndpointConfiguration model = - BinaryData - .fromString( - "{\"inboundNatPools\":[{\"name\":\"koievseo\",\"protocol\":\"UDP\",\"backendPort\":143823433,\"frontendPortRangeStart\":1813369281,\"frontendPortRangeEnd\":209864806,\"networkSecurityGroupRules\":[]},{\"name\":\"muwlauwzizxbm\",\"protocol\":\"TCP\",\"backendPort\":2123049773,\"frontendPortRangeStart\":1983379457,\"frontendPortRangeEnd\":904231635,\"networkSecurityGroupRules\":[]},{\"name\":\"zmuvpbttdumorppx\",\"protocol\":\"UDP\",\"backendPort\":964392835,\"frontendPortRangeStart\":1702938248,\"frontendPortRangeEnd\":1538567031,\"networkSecurityGroupRules\":[]}]}") - .toObject(PoolEndpointConfiguration.class); - Assertions.assertEquals("koievseo", model.inboundNatPools().get(0).name()); - Assertions.assertEquals(InboundEndpointProtocol.UDP, model.inboundNatPools().get(0).protocol()); - Assertions.assertEquals(143823433, model.inboundNatPools().get(0).backendPort()); - Assertions.assertEquals(1813369281, model.inboundNatPools().get(0).frontendPortRangeStart()); - Assertions.assertEquals(209864806, model.inboundNatPools().get(0).frontendPortRangeEnd()); - } - - @Test - public void testSerialize() { - PoolEndpointConfiguration model = - new PoolEndpointConfiguration() - .withInboundNatPools( - Arrays - .asList( - new InboundNatPool() - .withName("koievseo") - .withProtocol(InboundEndpointProtocol.UDP) - .withBackendPort(143823433) - .withFrontendPortRangeStart(1813369281) - .withFrontendPortRangeEnd(209864806) - .withNetworkSecurityGroupRules(Arrays.asList()), - new InboundNatPool() - .withName("muwlauwzizxbm") - .withProtocol(InboundEndpointProtocol.TCP) - .withBackendPort(2123049773) - .withFrontendPortRangeStart(1983379457) - .withFrontendPortRangeEnd(904231635) - .withNetworkSecurityGroupRules(Arrays.asList()), - new InboundNatPool() - .withName("zmuvpbttdumorppx") - .withProtocol(InboundEndpointProtocol.UDP) - .withBackendPort(964392835) - .withFrontendPortRangeStart(1702938248) - .withFrontendPortRangeEnd(1538567031) - .withNetworkSecurityGroupRules(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(PoolEndpointConfiguration.class); - Assertions.assertEquals("koievseo", model.inboundNatPools().get(0).name()); - Assertions.assertEquals(InboundEndpointProtocol.UDP, model.inboundNatPools().get(0).protocol()); - Assertions.assertEquals(143823433, model.inboundNatPools().get(0).backendPort()); - Assertions.assertEquals(1813369281, model.inboundNatPools().get(0).frontendPortRangeStart()); - Assertions.assertEquals(209864806, model.inboundNatPools().get(0).frontendPortRangeEnd()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsCreateWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsCreateWithResponseMockTests.java deleted file mode 100644 index e1013f5589c1..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsCreateWithResponseMockTests.java +++ /dev/null @@ -1,140 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.BatchPoolIdentity; -import com.azure.resourcemanager.batch.models.ComputeNodeFillType; -import com.azure.resourcemanager.batch.models.DeploymentConfiguration; -import com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope; -import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; -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.PoolIdentityType; -import com.azure.resourcemanager.batch.models.ScaleSettings; -import com.azure.resourcemanager.batch.models.StartTask; -import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"spuunnoxyhkxgq\",\"lastModified\":\"2021-07-24T05:54:49Z\",\"creationTime\":\"2020-12-28T12:46:28Z\",\"provisioningState\":\"Succeeded\",\"provisioningStateTransitionTime\":\"2021-05-06T08:51:47Z\",\"allocationState\":\"Steady\",\"allocationStateTransitionTime\":\"2021-10-10T08:04:34Z\",\"vmSize\":\"wdaomdjvlpjxxkzb\",\"deploymentConfiguration\":{},\"currentDedicatedNodes\":1225406633,\"currentLowPriorityNodes\":1985792970,\"scaleSettings\":{},\"autoScaleRun\":{\"evaluationTime\":\"2021-02-04T06:42:43Z\",\"results\":\"ncj\"},\"interNodeCommunication\":\"Enabled\",\"networkConfiguration\":{\"subnetId\":\"oggculapz\",\"dynamicVnetAssignmentScope\":\"job\"},\"taskSlotsPerNode\":1569571564,\"taskSchedulingPolicy\":{\"nodeFillType\":\"Pack\"},\"userAccounts\":[],\"metadata\":[],\"startTask\":{\"commandLine\":\"b\",\"resourceFiles\":[],\"environmentSettings\":[],\"maxTaskRetryCount\":781075850,\"waitForSuccess\":false},\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[\"vfcibyfmowux\",\"kjpvdwxf\",\"wiivwzjbhyzsx\"],\"resizeOperationStatus\":{\"targetDedicatedNodes\":300385433,\"targetLowPriorityNodes\":2109306549,\"resizeTimeout\":\"PT11H6M1S\",\"nodeDeallocationOption\":\"Requeue\",\"startTime\":\"2021-03-06T04:34:10Z\",\"errors\":[]},\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Classic\",\"currentNodeCommunicationMode\":\"Classic\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"etag\":\"astjbkkdmflvestm\",\"id\":\"lx\",\"name\":\"ril\",\"type\":\"zapeewchpx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = - manager - .pools() - .define("loazuruocbgoo") - .withExistingBatchAccount("xkdmligo", "ibrxkp") - .withIdentity( - new BatchPoolIdentity() - .withType(PoolIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withDisplayName("eoybfhjxakvvjgs") - .withVmSize("xnyed") - .withDeploymentConfiguration(new DeploymentConfiguration()) - .withScaleSettings(new ScaleSettings()) - .withInterNodeCommunication(InterNodeCommunicationState.ENABLED) - .withNetworkConfiguration( - new NetworkConfiguration() - .withSubnetId("ybvpay") - .withDynamicVnetAssignmentScope(DynamicVNetAssignmentScope.JOB)) - .withTaskSlotsPerNode(417091375) - .withTaskSchedulingPolicy(new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.SPREAD)) - .withUserAccounts(Arrays.asList()) - .withMetadata(Arrays.asList()) - .withStartTask( - new StartTask() - .withCommandLine("gstcyohpf") - .withResourceFiles(Arrays.asList()) - .withEnvironmentSettings(Arrays.asList()) - .withMaxTaskRetryCount(172770191) - .withWaitForSuccess(true)) - .withCertificates(Arrays.asList()) - .withApplicationPackages(Arrays.asList()) - .withApplicationLicenses(Arrays.asList("nwqjnoba", "yhddvia")) - .withMountConfiguration(Arrays.asList()) - .withTargetNodeCommunicationMode(NodeCommunicationMode.SIMPLIFIED) - .withIfMatch("fcvlerch") - .withIfNoneMatch("qbmfpjbabwidf") - .create(); - - Assertions.assertEquals(PoolIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("spuunnoxyhkxgq", response.displayName()); - Assertions.assertEquals("wdaomdjvlpjxxkzb", response.vmSize()); - Assertions.assertEquals(InterNodeCommunicationState.ENABLED, response.interNodeCommunication()); - Assertions.assertEquals("oggculapz", response.networkConfiguration().subnetId()); - Assertions - .assertEquals(DynamicVNetAssignmentScope.JOB, response.networkConfiguration().dynamicVnetAssignmentScope()); - Assertions.assertEquals(1569571564, response.taskSlotsPerNode()); - Assertions.assertEquals(ComputeNodeFillType.PACK, response.taskSchedulingPolicy().nodeFillType()); - Assertions.assertEquals("b", response.startTask().commandLine()); - Assertions.assertEquals(781075850, response.startTask().maxTaskRetryCount()); - Assertions.assertEquals(false, response.startTask().waitForSuccess()); - Assertions.assertEquals("vfcibyfmowux", response.applicationLicenses().get(0)); - Assertions.assertEquals(NodeCommunicationMode.CLASSIC, response.targetNodeCommunicationMode()); - } - - @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/PoolsDeleteMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDeleteMockTests.java deleted file mode 100644 index 289d9241ab5b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDeleteMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.pools().delete("lkxt", "qjfsmlmbtxhw", "fwsrtawcoezbrhu", Context.NONE); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDisableAutoScaleWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDisableAutoScaleWithResponseMockTests.java deleted file mode 100644 index 62696625bf49..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsDisableAutoScaleWithResponseMockTests.java +++ /dev/null @@ -1,87 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ComputeNodeFillType; -import com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope; -import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; -import com.azure.resourcemanager.batch.models.Pool; -import com.azure.resourcemanager.batch.models.PoolIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsDisableAutoScaleWithResponseMockTests { - @Test - public void testDisableAutoScaleWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"wmd\",\"lastModified\":\"2021-09-16T09:36:53Z\",\"creationTime\":\"2020-12-31T05:30:07Z\",\"provisioningState\":\"Succeeded\",\"provisioningStateTransitionTime\":\"2021-06-30T21:52:17Z\",\"allocationState\":\"Steady\",\"allocationStateTransitionTime\":\"2021-01-18T09:11:28Z\",\"vmSize\":\"pgpqchiszepnnb\",\"deploymentConfiguration\":{},\"currentDedicatedNodes\":1194186280,\"currentLowPriorityNodes\":2110316602,\"scaleSettings\":{},\"autoScaleRun\":{\"evaluationTime\":\"2021-11-29T17:23:44Z\",\"results\":\"fozauorsuk\"},\"interNodeCommunication\":\"Enabled\",\"networkConfiguration\":{\"subnetId\":\"lhlv\",\"dynamicVnetAssignmentScope\":\"none\"},\"taskSlotsPerNode\":647520979,\"taskSchedulingPolicy\":{\"nodeFillType\":\"Pack\"},\"userAccounts\":[],\"metadata\":[],\"startTask\":{\"commandLine\":\"dweyuqdunv\",\"resourceFiles\":[],\"environmentSettings\":[],\"maxTaskRetryCount\":1205325724,\"waitForSuccess\":false},\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[\"wjhhgdnhxmsivf\",\"miloxggdufiqndie\",\"zaofjchvcyy\"],\"resizeOperationStatus\":{\"targetDedicatedNodes\":1812829551,\"targetLowPriorityNodes\":1377717439,\"resizeTimeout\":\"PT123H17M23S\",\"nodeDeallocationOption\":\"Terminate\",\"startTime\":\"2021-10-22T10:52:16Z\",\"errors\":[]},\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Classic\",\"currentNodeCommunicationMode\":\"Simplified\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"etag\":\"jeknizshq\",\"id\":\"cimpevfg\",\"name\":\"b\",\"type\":\"rrilbywdxsmic\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = - manager.pools().disableAutoScaleWithResponse("d", "utujba", "pjuohminyfl", Context.NONE).getValue(); - - Assertions.assertEquals(PoolIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("wmd", response.displayName()); - Assertions.assertEquals("pgpqchiszepnnb", response.vmSize()); - Assertions.assertEquals(InterNodeCommunicationState.ENABLED, response.interNodeCommunication()); - Assertions.assertEquals("lhlv", response.networkConfiguration().subnetId()); - Assertions - .assertEquals( - DynamicVNetAssignmentScope.NONE, response.networkConfiguration().dynamicVnetAssignmentScope()); - Assertions.assertEquals(647520979, response.taskSlotsPerNode()); - Assertions.assertEquals(ComputeNodeFillType.PACK, response.taskSchedulingPolicy().nodeFillType()); - Assertions.assertEquals("dweyuqdunv", response.startTask().commandLine()); - Assertions.assertEquals(1205325724, response.startTask().maxTaskRetryCount()); - Assertions.assertEquals(false, response.startTask().waitForSuccess()); - Assertions.assertEquals("wjhhgdnhxmsivf", response.applicationLicenses().get(0)); - Assertions.assertEquals(NodeCommunicationMode.CLASSIC, response.targetNodeCommunicationMode()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsGetWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsGetWithResponseMockTests.java deleted file mode 100644 index 75013d3dffd2..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,86 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ComputeNodeFillType; -import com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope; -import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; -import com.azure.resourcemanager.batch.models.Pool; -import com.azure.resourcemanager.batch.models.PoolIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"jb\",\"lastModified\":\"2021-03-17T22:00:43Z\",\"creationTime\":\"2021-04-28T23:02:30Z\",\"provisioningState\":\"Succeeded\",\"provisioningStateTransitionTime\":\"2021-07-07T02:32:57Z\",\"allocationState\":\"Resizing\",\"allocationStateTransitionTime\":\"2021-06-03T05:33:27Z\",\"vmSize\":\"fa\",\"deploymentConfiguration\":{},\"currentDedicatedNodes\":141630952,\"currentLowPriorityNodes\":764858532,\"scaleSettings\":{},\"autoScaleRun\":{\"evaluationTime\":\"2021-06-21T23:29Z\",\"results\":\"yjkqabqgzslesjcb\"},\"interNodeCommunication\":\"Enabled\",\"networkConfiguration\":{\"subnetId\":\"iew\",\"dynamicVnetAssignmentScope\":\"none\"},\"taskSlotsPerNode\":730948461,\"taskSchedulingPolicy\":{\"nodeFillType\":\"Spread\"},\"userAccounts\":[],\"metadata\":[],\"startTask\":{\"commandLine\":\"o\",\"resourceFiles\":[],\"environmentSettings\":[],\"maxTaskRetryCount\":569382071,\"waitForSuccess\":true},\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[\"xtdr\"],\"resizeOperationStatus\":{\"targetDedicatedNodes\":647279453,\"targetLowPriorityNodes\":730644177,\"resizeTimeout\":\"PT238H13M32S\",\"nodeDeallocationOption\":\"RetainedData\",\"startTime\":\"2021-06-12T20:57:35Z\",\"errors\":[]},\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Default\",\"currentNodeCommunicationMode\":\"Classic\"},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{}},\"etag\":\"uaadraufactkahzo\",\"id\":\"ajjziuxxpshne\",\"name\":\"kulfg\",\"type\":\"lqubkwdlen\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = manager.pools().getWithResponse("skh", "dyg", "ookk", Context.NONE).getValue(); - - Assertions.assertEquals(PoolIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("jb", response.displayName()); - Assertions.assertEquals("fa", response.vmSize()); - Assertions.assertEquals(InterNodeCommunicationState.ENABLED, response.interNodeCommunication()); - Assertions.assertEquals("iew", response.networkConfiguration().subnetId()); - Assertions - .assertEquals( - DynamicVNetAssignmentScope.NONE, response.networkConfiguration().dynamicVnetAssignmentScope()); - Assertions.assertEquals(730948461, response.taskSlotsPerNode()); - Assertions.assertEquals(ComputeNodeFillType.SPREAD, response.taskSchedulingPolicy().nodeFillType()); - Assertions.assertEquals("o", response.startTask().commandLine()); - Assertions.assertEquals(569382071, response.startTask().maxTaskRetryCount()); - Assertions.assertEquals(true, response.startTask().waitForSuccess()); - Assertions.assertEquals("xtdr", response.applicationLicenses().get(0)); - Assertions.assertEquals(NodeCommunicationMode.DEFAULT, response.targetNodeCommunicationMode()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsListByBatchAccountMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsListByBatchAccountMockTests.java deleted file mode 100644 index 066addc9e392..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsListByBatchAccountMockTests.java +++ /dev/null @@ -1,92 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ComputeNodeFillType; -import com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope; -import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; -import com.azure.resourcemanager.batch.models.Pool; -import com.azure.resourcemanager.batch.models.PoolIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsListByBatchAccountMockTests { - @Test - public void testListByBatchAccount() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"displayName\":\"czu\",\"lastModified\":\"2021-07-25T15:19:26Z\",\"creationTime\":\"2021-11-16T08:33:21Z\",\"provisioningState\":\"Succeeded\",\"provisioningStateTransitionTime\":\"2021-11-26T11:35:34Z\",\"allocationState\":\"Stopping\",\"allocationStateTransitionTime\":\"2021-07-23T13:28:16Z\",\"vmSize\":\"sx\",\"deploymentConfiguration\":{},\"currentDedicatedNodes\":1481595996,\"currentLowPriorityNodes\":1534377343,\"scaleSettings\":{},\"autoScaleRun\":{\"evaluationTime\":\"2021-09-03T19:15:23Z\",\"results\":\"cfzq\"},\"interNodeCommunication\":\"Enabled\",\"networkConfiguration\":{\"subnetId\":\"czheyd\",\"dynamicVnetAssignmentScope\":\"job\"},\"taskSlotsPerNode\":298651884,\"taskSchedulingPolicy\":{\"nodeFillType\":\"Pack\"},\"userAccounts\":[],\"metadata\":[],\"startTask\":{\"commandLine\":\"xu\",\"resourceFiles\":[],\"environmentSettings\":[],\"maxTaskRetryCount\":1041302406,\"waitForSuccess\":false},\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[\"ywrckp\"],\"resizeOperationStatus\":{\"targetDedicatedNodes\":2090411231,\"targetLowPriorityNodes\":1678517219,\"resizeTimeout\":\"PT17H37M51S\",\"nodeDeallocationOption\":\"Terminate\",\"startTime\":\"2021-05-05T06:19:09Z\",\"errors\":[]},\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Simplified\",\"currentNodeCommunicationMode\":\"Classic\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"etag\":\"stgktst\",\"id\":\"dxeclzedqbcvh\",\"name\":\"lhpl\",\"type\":\"dqkdlwwqfbu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.pools().listByBatchAccount("xcv", "srhnjivo", 1976490, "tnovqfzgemjdftul", "ltducea", Context.NONE); - - Assertions.assertEquals(PoolIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("czu", response.iterator().next().displayName()); - Assertions.assertEquals("sx", response.iterator().next().vmSize()); - Assertions - .assertEquals(InterNodeCommunicationState.ENABLED, response.iterator().next().interNodeCommunication()); - Assertions.assertEquals("czheyd", response.iterator().next().networkConfiguration().subnetId()); - Assertions - .assertEquals( - DynamicVNetAssignmentScope.JOB, - response.iterator().next().networkConfiguration().dynamicVnetAssignmentScope()); - Assertions.assertEquals(298651884, response.iterator().next().taskSlotsPerNode()); - Assertions - .assertEquals(ComputeNodeFillType.PACK, response.iterator().next().taskSchedulingPolicy().nodeFillType()); - Assertions.assertEquals("xu", response.iterator().next().startTask().commandLine()); - Assertions.assertEquals(1041302406, response.iterator().next().startTask().maxTaskRetryCount()); - Assertions.assertEquals(false, response.iterator().next().startTask().waitForSuccess()); - Assertions.assertEquals("ywrckp", response.iterator().next().applicationLicenses().get(0)); - Assertions - .assertEquals(NodeCommunicationMode.SIMPLIFIED, response.iterator().next().targetNodeCommunicationMode()); - } -} diff --git a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsStopResizeWithResponseMockTests.java b/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsStopResizeWithResponseMockTests.java deleted file mode 100644 index 8a890e773a4c..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PoolsStopResizeWithResponseMockTests.java +++ /dev/null @@ -1,87 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.ComputeNodeFillType; -import com.azure.resourcemanager.batch.models.DynamicVNetAssignmentScope; -import com.azure.resourcemanager.batch.models.InterNodeCommunicationState; -import com.azure.resourcemanager.batch.models.NodeCommunicationMode; -import com.azure.resourcemanager.batch.models.Pool; -import com.azure.resourcemanager.batch.models.PoolIdentityType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PoolsStopResizeWithResponseMockTests { - @Test - public void testStopResizeWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"displayName\":\"gyavu\",\"lastModified\":\"2021-11-26T06:56:03Z\",\"creationTime\":\"2021-08-30T13:25:29Z\",\"provisioningState\":\"Succeeded\",\"provisioningStateTransitionTime\":\"2021-06-19T05:16:04Z\",\"allocationState\":\"Resizing\",\"allocationStateTransitionTime\":\"2021-09-20T02:33:28Z\",\"vmSize\":\"bpimlqoljxkcgxxl\",\"deploymentConfiguration\":{},\"currentDedicatedNodes\":749906444,\"currentLowPriorityNodes\":1112510482,\"scaleSettings\":{},\"autoScaleRun\":{\"evaluationTime\":\"2021-03-28T18:15:03Z\",\"results\":\"vwlyoup\"},\"interNodeCommunication\":\"Disabled\",\"networkConfiguration\":{\"subnetId\":\"ubdyhgk\",\"dynamicVnetAssignmentScope\":\"none\"},\"taskSlotsPerNode\":610597873,\"taskSchedulingPolicy\":{\"nodeFillType\":\"Pack\"},\"userAccounts\":[],\"metadata\":[],\"startTask\":{\"commandLine\":\"ktlahbqa\",\"resourceFiles\":[],\"environmentSettings\":[],\"maxTaskRetryCount\":1226803488,\"waitForSuccess\":true},\"certificates\":[],\"applicationPackages\":[],\"applicationLicenses\":[\"gqqqxh\"],\"resizeOperationStatus\":{\"targetDedicatedNodes\":734515726,\"targetLowPriorityNodes\":1873190222,\"resizeTimeout\":\"PT22H19M27S\",\"nodeDeallocationOption\":\"Terminate\",\"startTime\":\"2021-04-05T16:50:28Z\",\"errors\":[]},\"mountConfiguration\":[],\"targetNodeCommunicationMode\":\"Simplified\",\"currentNodeCommunicationMode\":\"Simplified\"},\"identity\":{\"type\":\"None\",\"userAssignedIdentities\":{}},\"etag\":\"jlfrq\",\"id\":\"tbajlkatn\",\"name\":\"xyiopidkqqfku\",\"type\":\"s\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Pool response = - manager.pools().stopResizeWithResponse("wrwfscjfnyns", "qujizdvo", "ytibyow", Context.NONE).getValue(); - - Assertions.assertEquals(PoolIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("gyavu", response.displayName()); - Assertions.assertEquals("bpimlqoljxkcgxxl", response.vmSize()); - Assertions.assertEquals(InterNodeCommunicationState.DISABLED, response.interNodeCommunication()); - Assertions.assertEquals("ubdyhgk", response.networkConfiguration().subnetId()); - Assertions - .assertEquals( - DynamicVNetAssignmentScope.NONE, response.networkConfiguration().dynamicVnetAssignmentScope()); - Assertions.assertEquals(610597873, response.taskSlotsPerNode()); - Assertions.assertEquals(ComputeNodeFillType.PACK, response.taskSchedulingPolicy().nodeFillType()); - Assertions.assertEquals("ktlahbqa", response.startTask().commandLine()); - Assertions.assertEquals(1226803488, response.startTask().maxTaskRetryCount()); - Assertions.assertEquals(true, response.startTask().waitForSuccess()); - Assertions.assertEquals("gqqqxh", response.applicationLicenses().get(0)); - Assertions.assertEquals(NodeCommunicationMode.SIMPLIFIED, response.targetNodeCommunicationMode()); - } -} 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 deleted file mode 100644 index 8cb788005c50..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionInnerTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionInnerTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"Updating\",\"privateEndpoint\":{\"id\":\"fdatsc\"},\"groupIds\":[\"pjhulsuuvmkj\",\"zkrwfn\",\"iodjp\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"jdpvwryo\",\"actionsRequired\":\"soacctazakl\"}},\"etag\":\"ahbc\",\"id\":\"yffdfdos\",\"name\":\"gexpaojakhmsbz\",\"type\":\"hcrzevd\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jdpvwryo", model.privateLinkServiceConnectionState().description()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("jdpvwryo")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("jdpvwryo", model.privateLinkServiceConnectionState().description()); - } -} 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 deleted file mode 100644 index cae5c8ff3fc4..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionPropertiesTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointConnectionPropertiesTests { - @Test - public void testDeserialize() { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Cancelled\",\"privateEndpoint\":{\"id\":\"olthqtrgqjbp\"},\"groupIds\":[\"s\",\"n\",\"gvfcj\",\"wzo\"],\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"felluwfzitonpe\",\"actionsRequired\":\"pjkjlxofpdv\"}}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("felluwfzitonpe", model.privateLinkServiceConnectionState().description()); - } - - @Test - public void testSerialize() { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.APPROVED) - .withDescription("felluwfzitonpe")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("felluwfzitonpe", 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 deleted file mode 100644 index c740b77ec6df..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.PrivateEndpointConnection; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Cancelled\",\"privateEndpoint\":{\"id\":\"pjbi\"},\"groupIds\":[\"mfxumvfcluyovw\",\"nbkfezzxscy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"g\",\"actionsRequired\":\"ujb\"}},\"etag\":\"omvzzbtd\",\"id\":\"qvpn\",\"name\":\"yujviylwdshfssn\",\"type\":\"bgye\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("rydxtqm", "eoxorggufhyao", "tbghhavgrvkf", Context.NONE) - .getValue(); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.PENDING, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("g", 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 deleted file mode 100644 index 1b53f736c19d..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsListByBatchAccountMockTests.java +++ /dev/null @@ -1,74 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.PrivateEndpointConnection; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListByBatchAccountMockTests { - @Test - public void testListByBatchAccount() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"sgogczhonnxk\"},\"groupIds\":[\"nyhmossxkkgthr\",\"gh\",\"jbdhqxvc\"],\"privateLinkServiceConnectionState\":{\"status\":\"Disconnected\",\"description\":\"pdso\",\"actionsRequired\":\"shrnsvbuswdvz\"}},\"etag\":\"bycnunvjsrtkf\",\"id\":\"wnopqgikyzirtx\",\"name\":\"yuxzejntpsewgi\",\"type\":\"ilqu\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateEndpointConnections().listByBatchAccount("zronasxift", "zq", 418200584, Context.NONE); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.DISCONNECTED, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("pdso", 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 deleted file mode 100644 index 5399095a0edc..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointConnectionsUpdateMockTests.java +++ /dev/null @@ -1,86 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.batch.models.PrivateEndpointConnection; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"privateEndpoint\":{\"id\":\"tpwoqhihejq\"},\"groupIds\":[\"pnfqntcyp\",\"xjvfoimwksl\",\"rcizjxvyd\",\"ceacvlhvygdy\"],\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"rtwnawjslbi\",\"actionsRequired\":\"ojgcyzt\"}},\"etag\":\"mznbaeqphch\",\"id\":\"nrnrp\",\"name\":\"ehuwrykqgaifmvik\",\"type\":\"bydvkhbejdz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .update( - "rymsgaojfmw", - "cotmr", - "hirctymoxoftpipi", - new PrivateEndpointConnectionInner() - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.REJECTED) - .withDescription("gz")), - "ublwpcesutrg", - Context.NONE); - - Assertions - .assertEquals( - PrivateLinkServiceConnectionStatus.REJECTED, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("rtwnawjslbi", response.privateLinkServiceConnectionState().description()); - } -} 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 deleted file mode 100644 index 9fd25795683c..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,22 +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.PrivateEndpoint; -import org.junit.jupiter.api.Test; - -public final class PrivateEndpointTests { - @Test - public void testDeserialize() { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"fxxypininmayhuy\"}").toObject(PrivateEndpoint.class); - } - - @Test - public void testSerialize() { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).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 deleted file mode 100644 index 4d1790036302..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourceInnerTests.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.fluent.models.PrivateLinkResourceInner; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourceInnerTests { - @Test - public void testDeserialize() { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"debfqkkrbmpukgri\",\"requiredMembers\":[\"zlfbxzpuzycispnq\",\"ahmgkbrp\",\"y\"],\"requiredZoneNames\":[\"bnuqqkpik\",\"drgvtqagn\",\"uynhijg\"]},\"etag\":\"ebf\",\"id\":\"iarbutrcvpna\",\"name\":\"zmhjrunmp\",\"type\":\"ttdbhrbnl\"}") - .toObject(PrivateLinkResourceInner.class); - } - - @Test - public void testSerialize() { - PrivateLinkResourceInner model = new PrivateLinkResourceInner(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - } -} 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 deleted file mode 100644 index 2262dca069f5..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcePropertiesTests.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.fluent.models.PrivateLinkResourceProperties; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkResourcePropertiesTests { - @Test - public void testDeserialize() { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"kx\",\"requiredMembers\":[\"k\",\"bhenbtkcxywnyt\",\"rsyn\",\"qidybyx\"],\"requiredZoneNames\":[\"clha\",\"xdbabphlwr\",\"lfktsths\",\"cocmnyyaztt\"]}") - .toObject(PrivateLinkResourceProperties.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 5d7fd3094faa..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,68 +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.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"ntwjch\",\"requiredMembers\":[\"oihxumwctondzjlu\",\"dfdlwggyts\"],\"requiredZoneNames\":[\"ovvtgseinqfiu\"]},\"etag\":\"qknp\",\"id\":\"rgnepttwqmsniffc\",\"name\":\"mqnrojlpijnkr\",\"type\":\"frddhcrati\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = - manager - .privateLinkResources() - .getWithResponse("bfpncurdo", "wiithtywub", "cbihwqk", Context.NONE) - .getValue(); - } -} 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 deleted file mode 100644 index dc0fa2c46510..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkResourcesListByBatchAccountMockTests.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.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.batch.BatchManager; -import com.azure.resourcemanager.batch.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListByBatchAccountMockTests { - @Test - public void testListByBatchAccount() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"jihy\",\"requiredMembers\":[\"phvwauyqncygu\"],\"requiredZoneNames\":[\"ipmdscwx\",\"upev\",\"hfstotxhojujbyp\",\"lmcuvhixb\"]},\"etag\":\"yfwnylr\",\"id\":\"ool\",\"name\":\"ttpkiwkkbnujrywv\",\"type\":\"y\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - BatchManager manager = - BatchManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateLinkResources().listByBatchAccount("zlwfffiakp", "pqqmted", 925858179, Context.NONE); - } -} 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 deleted file mode 100644 index 21df4546ede9..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,35 +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.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.batch.models.PrivateLinkServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PrivateLinkServiceConnectionStateTests { - @Test - public void testDeserialize() { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString( - "{\"status\":\"Disconnected\",\"description\":\"podepoo\",\"actionsRequired\":\"nuvamiheogna\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("podepoo", model.description()); - } - - @Test - public void testSerialize() { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateLinkServiceConnectionStatus.DISCONNECTED) - .withDescription("podepoo"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateLinkServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("podepoo", model.description()); - } -} 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 deleted file mode 100644 index e788d17da7f1..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/PublicIpAddressConfigurationTests.java +++ /dev/null @@ -1,35 +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.IpAddressProvisioningType; -import com.azure.resourcemanager.batch.models.PublicIpAddressConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class PublicIpAddressConfigurationTests { - @Test - public void testDeserialize() { - PublicIpAddressConfiguration model = - BinaryData - .fromString("{\"provision\":\"UserManaged\",\"ipAddressIds\":[\"mutwuoe\",\"rpkhjwn\"]}") - .toObject(PublicIpAddressConfiguration.class); - Assertions.assertEquals(IpAddressProvisioningType.USER_MANAGED, model.provision()); - Assertions.assertEquals("mutwuoe", model.ipAddressIds().get(0)); - } - - @Test - public void testSerialize() { - PublicIpAddressConfiguration model = - new PublicIpAddressConfiguration() - .withProvision(IpAddressProvisioningType.USER_MANAGED) - .withIpAddressIds(Arrays.asList("mutwuoe", "rpkhjwn")); - model = BinaryData.fromObject(model).toObject(PublicIpAddressConfiguration.class); - Assertions.assertEquals(IpAddressProvisioningType.USER_MANAGED, model.provision()); - Assertions.assertEquals("mutwuoe", model.ipAddressIds().get(0)); - } -} 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 deleted file mode 100644 index 87613545432b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ResourceFileTests.java +++ /dev/null @@ -1,50 +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.ComputeNodeIdentityReference; -import com.azure.resourcemanager.batch.models.ResourceFile; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ResourceFileTests { - @Test - public void testDeserialize() { - ResourceFile model = - BinaryData - .fromString( - "{\"autoStorageContainerName\":\"ljphuopxodl\",\"storageContainerUrl\":\"ynt\",\"httpUrl\":\"zihleosjswsr\",\"blobPrefix\":\"lyzrpzbchckqqzqi\",\"filePath\":\"iysui\",\"fileMode\":\"ynkedyatrwyhqmib\",\"identityReference\":{\"resourceId\":\"wit\"}}") - .toObject(ResourceFile.class); - Assertions.assertEquals("ljphuopxodl", model.autoStorageContainerName()); - Assertions.assertEquals("ynt", model.storageContainerUrl()); - Assertions.assertEquals("zihleosjswsr", model.httpUrl()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.blobPrefix()); - Assertions.assertEquals("iysui", model.filePath()); - Assertions.assertEquals("ynkedyatrwyhqmib", model.fileMode()); - Assertions.assertEquals("wit", model.identityReference().resourceId()); - } - - @Test - public void testSerialize() { - ResourceFile model = - new ResourceFile() - .withAutoStorageContainerName("ljphuopxodl") - .withStorageContainerUrl("ynt") - .withHttpUrl("zihleosjswsr") - .withBlobPrefix("lyzrpzbchckqqzqi") - .withFilePath("iysui") - .withFileMode("ynkedyatrwyhqmib") - .withIdentityReference(new ComputeNodeIdentityReference().withResourceId("wit")); - model = BinaryData.fromObject(model).toObject(ResourceFile.class); - Assertions.assertEquals("ljphuopxodl", model.autoStorageContainerName()); - Assertions.assertEquals("ynt", model.storageContainerUrl()); - Assertions.assertEquals("zihleosjswsr", model.httpUrl()); - Assertions.assertEquals("lyzrpzbchckqqzqi", model.blobPrefix()); - Assertions.assertEquals("iysui", model.filePath()); - Assertions.assertEquals("ynkedyatrwyhqmib", model.fileMode()); - Assertions.assertEquals("wit", model.identityReference().resourceId()); - } -} 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 deleted file mode 100644 index 05f0fdd39f28..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/ScaleSettingsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.AutoScaleSettings; -import com.azure.resourcemanager.batch.models.ComputeNodeDeallocationOption; -import com.azure.resourcemanager.batch.models.FixedScaleSettings; -import com.azure.resourcemanager.batch.models.ScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleSettingsTests { - @Test - public void testDeserialize() { - ScaleSettings model = - BinaryData - .fromString( - "{\"fixedScale\":{\"resizeTimeout\":\"PT206H14M3S\",\"targetDedicatedNodes\":1448354996,\"targetLowPriorityNodes\":54809998,\"nodeDeallocationOption\":\"TaskCompletion\"},\"autoScale\":{\"formula\":\"weriofzpyqsem\",\"evaluationInterval\":\"PT128H24M12S\"}}") - .toObject(ScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT206H14M3S"), model.fixedScale().resizeTimeout()); - Assertions.assertEquals(1448354996, model.fixedScale().targetDedicatedNodes()); - Assertions.assertEquals(54809998, model.fixedScale().targetLowPriorityNodes()); - Assertions - .assertEquals(ComputeNodeDeallocationOption.TASK_COMPLETION, model.fixedScale().nodeDeallocationOption()); - Assertions.assertEquals("weriofzpyqsem", model.autoScale().formula()); - Assertions.assertEquals(Duration.parse("PT128H24M12S"), model.autoScale().evaluationInterval()); - } - - @Test - public void testSerialize() { - ScaleSettings model = - new ScaleSettings() - .withFixedScale( - new FixedScaleSettings() - .withResizeTimeout(Duration.parse("PT206H14M3S")) - .withTargetDedicatedNodes(1448354996) - .withTargetLowPriorityNodes(54809998) - .withNodeDeallocationOption(ComputeNodeDeallocationOption.TASK_COMPLETION)) - .withAutoScale( - new AutoScaleSettings() - .withFormula("weriofzpyqsem") - .withEvaluationInterval(Duration.parse("PT128H24M12S"))); - model = BinaryData.fromObject(model).toObject(ScaleSettings.class); - Assertions.assertEquals(Duration.parse("PT206H14M3S"), model.fixedScale().resizeTimeout()); - Assertions.assertEquals(1448354996, model.fixedScale().targetDedicatedNodes()); - Assertions.assertEquals(54809998, model.fixedScale().targetLowPriorityNodes()); - Assertions - .assertEquals(ComputeNodeDeallocationOption.TASK_COMPLETION, model.fixedScale().nodeDeallocationOption()); - Assertions.assertEquals("weriofzpyqsem", model.autoScale().formula()); - Assertions.assertEquals(Duration.parse("PT128H24M12S"), model.autoScale().evaluationInterval()); - } -} 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 deleted file mode 100644 index 17faf21085d7..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SkuCapabilityTests.java +++ /dev/null @@ -1,23 +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.SkuCapability; -import org.junit.jupiter.api.Test; - -public final class SkuCapabilityTests { - @Test - public void testDeserialize() { - SkuCapability model = - BinaryData.fromString("{\"name\":\"snjampmng\",\"value\":\"scxaq\"}").toObject(SkuCapability.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 9d7db435cb5c..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkuInnerTests.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.fluent.models.SupportedSkuInner; -import org.junit.jupiter.api.Test; - -public final class SupportedSkuInnerTests { - @Test - public void testDeserialize() { - SupportedSkuInner model = - BinaryData - .fromString( - "{\"name\":\"l\",\"familyName\":\"x\",\"capabilities\":[{\"name\":\"tzxdpnqbqqwx\",\"value\":\"feallnwsu\"}]}") - .toObject(SupportedSkuInner.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 701ae9d8464b..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/SupportedSkusResultTests.java +++ /dev/null @@ -1,28 +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.fluent.models.SupportedSkuInner; -import com.azure.resourcemanager.batch.models.SupportedSkusResult; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class SupportedSkusResultTests { - @Test - public void testDeserialize() { - SupportedSkusResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"pmivkwlzu\",\"familyName\":\"c\",\"capabilities\":[]}],\"nextLink\":\"nbacfi\"}") - .toObject(SupportedSkusResult.class); - } - - @Test - public void testSerialize() { - SupportedSkusResult model = new SupportedSkusResult().withValue(Arrays.asList(new SupportedSkuInner())); - model = BinaryData.fromObject(model).toObject(SupportedSkusResult.class); - } -} 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 deleted file mode 100644 index 9b8a45687866..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/TaskSchedulingPolicyTests.java +++ /dev/null @@ -1,27 +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.ComputeNodeFillType; -import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TaskSchedulingPolicyTests { - @Test - public void testDeserialize() { - TaskSchedulingPolicy model = - BinaryData.fromString("{\"nodeFillType\":\"Spread\"}").toObject(TaskSchedulingPolicy.class); - Assertions.assertEquals(ComputeNodeFillType.SPREAD, model.nodeFillType()); - } - - @Test - public void testSerialize() { - TaskSchedulingPolicy model = new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.SPREAD); - model = BinaryData.fromObject(model).toObject(TaskSchedulingPolicy.class); - Assertions.assertEquals(ComputeNodeFillType.SPREAD, model.nodeFillType()); - } -} 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 deleted file mode 100644 index dc16b719d5ce..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserAssignedIdentitiesTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.UserAssignedIdentities; -import org.junit.jupiter.api.Test; - -public final class UserAssignedIdentitiesTests { - @Test - public void testDeserialize() { - UserAssignedIdentities model = - BinaryData - .fromString("{\"principalId\":\"jgrtfwvukxga\",\"clientId\":\"ccsnhsjc\"}") - .toObject(UserAssignedIdentities.class); - } - - @Test - public void testSerialize() { - UserAssignedIdentities model = new UserAssignedIdentities(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentities.class); - } -} 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 deleted file mode 100644 index 04e6f5deea50..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/UserIdentityTests.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.AutoUserScope; -import com.azure.resourcemanager.batch.models.AutoUserSpecification; -import com.azure.resourcemanager.batch.models.ElevationLevel; -import com.azure.resourcemanager.batch.models.UserIdentity; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class UserIdentityTests { - @Test - public void testDeserialize() { - UserIdentity model = - BinaryData - .fromString("{\"userName\":\"gj\",\"autoUser\":{\"scope\":\"Task\",\"elevationLevel\":\"NonAdmin\"}}") - .toObject(UserIdentity.class); - Assertions.assertEquals("gj", model.username()); - Assertions.assertEquals(AutoUserScope.TASK, model.autoUser().scope()); - Assertions.assertEquals(ElevationLevel.NON_ADMIN, model.autoUser().elevationLevel()); - } - - @Test - public void testSerialize() { - UserIdentity model = - new UserIdentity() - .withUsername("gj") - .withAutoUser( - new AutoUserSpecification() - .withScope(AutoUserScope.TASK) - .withElevationLevel(ElevationLevel.NON_ADMIN)); - model = BinaryData.fromObject(model).toObject(UserIdentity.class); - Assertions.assertEquals("gj", model.username()); - Assertions.assertEquals(AutoUserScope.TASK, model.autoUser().scope()); - Assertions.assertEquals(ElevationLevel.NON_ADMIN, model.autoUser().elevationLevel()); - } -} 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 deleted file mode 100644 index 42d33b9e3c51..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VMExtensionTests.java +++ /dev/null @@ -1,49 +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.VMExtension; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VMExtensionTests { - @Test - public void testDeserialize() { - VMExtension model = - BinaryData - .fromString( - "{\"name\":\"maqolbgycduie\",\"publisher\":\"tgccymvaolpss\",\"type\":\"qlfmmdnbb\",\"typeHandlerVersion\":\"zpswiydmc\",\"autoUpgradeMinorVersion\":true,\"settings\":\"datadxssadbzm\",\"protectedSettings\":\"datadfznudaodv\",\"provisionAfterExtensions\":[\"ncblylpst\",\"bhhxsrzdzuc\",\"rsc\",\"ntnev\"]}") - .toObject(VMExtension.class); - Assertions.assertEquals("maqolbgycduie", model.name()); - Assertions.assertEquals("tgccymvaolpss", model.publisher()); - Assertions.assertEquals("qlfmmdnbb", model.type()); - Assertions.assertEquals("zpswiydmc", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); - Assertions.assertEquals("ncblylpst", model.provisionAfterExtensions().get(0)); - } - - @Test - public void testSerialize() { - VMExtension model = - new VMExtension() - .withName("maqolbgycduie") - .withPublisher("tgccymvaolpss") - .withType("qlfmmdnbb") - .withTypeHandlerVersion("zpswiydmc") - .withAutoUpgradeMinorVersion(true) - .withSettings("datadxssadbzm") - .withProtectedSettings("datadfznudaodv") - .withProvisionAfterExtensions(Arrays.asList("ncblylpst", "bhhxsrzdzuc", "rsc", "ntnev")); - model = BinaryData.fromObject(model).toObject(VMExtension.class); - Assertions.assertEquals("maqolbgycduie", model.name()); - Assertions.assertEquals("tgccymvaolpss", model.publisher()); - Assertions.assertEquals("qlfmmdnbb", model.type()); - Assertions.assertEquals("zpswiydmc", model.typeHandlerVersion()); - Assertions.assertEquals(true, model.autoUpgradeMinorVersion()); - Assertions.assertEquals("ncblylpst", 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 deleted file mode 100644 index d6b9e5b6943e..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/VirtualMachineFamilyCoreQuotaTests.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; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.batch.models.VirtualMachineFamilyCoreQuota; -import org.junit.jupiter.api.Test; - -public final class VirtualMachineFamilyCoreQuotaTests { - @Test - public void testDeserialize() { - VirtualMachineFamilyCoreQuota model = - BinaryData - .fromString("{\"name\":\"xth\",\"coreQuota\":1638968400}") - .toObject(VirtualMachineFamilyCoreQuota.class); - } - - @Test - public void testSerialize() { - 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 deleted file mode 100644 index 792212f59f81..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsConfigurationTests.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.WindowsConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WindowsConfigurationTests { - @Test - public void testDeserialize() { - WindowsConfiguration model = - BinaryData.fromString("{\"enableAutomaticUpdates\":true}").toObject(WindowsConfiguration.class); - Assertions.assertEquals(true, model.enableAutomaticUpdates()); - } - - @Test - public void testSerialize() { - WindowsConfiguration model = new WindowsConfiguration().withEnableAutomaticUpdates(true); - model = BinaryData.fromObject(model).toObject(WindowsConfiguration.class); - Assertions.assertEquals(true, 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 deleted file mode 100644 index 4c1c54515aa8..000000000000 --- a/sdk/batch/azure-resourcemanager-batch/src/test/java/com/azure/resourcemanager/batch/generated/WindowsUserConfigurationTests.java +++ /dev/null @@ -1,27 +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.LoginMode; -import com.azure.resourcemanager.batch.models.WindowsUserConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WindowsUserConfigurationTests { - @Test - public void testDeserialize() { - WindowsUserConfiguration model = - BinaryData.fromString("{\"loginMode\":\"Batch\"}").toObject(WindowsUserConfiguration.class); - Assertions.assertEquals(LoginMode.BATCH, model.loginMode()); - } - - @Test - public void testSerialize() { - WindowsUserConfiguration model = new WindowsUserConfiguration().withLoginMode(LoginMode.BATCH); - model = BinaryData.fromObject(model).toObject(WindowsUserConfiguration.class); - Assertions.assertEquals(LoginMode.BATCH, model.loginMode()); - } -}