From f7f8d281c63e339702c564181e8b39a73a1f58e9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 9 May 2025 04:09:19 +0000 Subject: [PATCH] CodeGen from PR 34552 in Azure/azure-rest-api-specs Merge 3e99e5c3b2278e48740c2642e9e2128eb40eb20e into 9f69db7532b6706baedc004f2eda762196a3e1eb --- .../CHANGELOG.md | 10 +- .../README.md | 155 +-- .../SAMPLE.md | 980 ------------------ .../ComputeFleetManagementClientImpl.java | 2 +- .../FleetsCreateOrUpdateSamples.java | 453 -------- .../generated/FleetsDeleteSamples.java | 22 - .../FleetsGetByResourceGroupSamples.java | 22 - .../FleetsListByResourceGroupSamples.java | 22 - .../generated/FleetsListSamples.java | 22 - ...etsListVirtualMachineScaleSetsSamples.java | 23 - .../generated/FleetsUpdateSamples.java | 388 ------- .../generated/OperationsListSamples.java | 22 - .../AdditionalCapabilitiesTests.java | 8 +- .../generated/ApplicationProfileTests.java | 8 +- .../generated/BootDiagnosticsTests.java | 4 +- .../generated/DiagnosticsProfileTests.java | 4 +- .../generated/LinuxPatchSettingsTests.java | 4 +- ...PatchAutomaticByPlatformSettingsTests.java | 4 +- .../ManagedServiceIdentityTests.java | 2 +- .../ManagedServiceIdentityUpdateTests.java | 2 +- .../OSImageNotificationProfileTests.java | 4 +- .../generated/OperationsListMockTests.java | 36 - .../generated/PatchSettingsTests.java | 8 +- .../ScheduledEventsProfileTests.java | 8 +- .../SecurityPostureReferenceTests.java | 4 +- .../generated/SpotPriorityProfileTests.java | 4 +- .../TerminateNotificationProfileTests.java | 4 +- .../generated/UefiSettingsTests.java | 8 +- .../generated/UserAssignedIdentityTests.java | 2 +- .../generated/VMGalleryApplicationTests.java | 8 +- .../VirtualMachineScaleSetDataDiskTests.java | 4 +- ...caleSetIPConfigurationPropertiesTests.java | 4 +- ...alMachineScaleSetIPConfigurationTests.java | 4 +- ...etNetworkConfigurationPropertiesTests.java | 24 +- ...hineScaleSetNetworkConfigurationTests.java | 24 +- ...ualMachineScaleSetNetworkProfileTests.java | 24 +- .../VirtualMachineScaleSetOSDiskTests.java | 4 +- ...ualMachineScaleSetStorageProfileTests.java | 8 +- .../generated/WindowsConfigurationTests.java | 24 +- ...PatchAutomaticByPlatformSettingsTests.java | 4 +- .../tsp-location.yaml | 2 +- 41 files changed, 163 insertions(+), 2206 deletions(-) delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsCreateOrUpdateSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsDeleteSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsGetByResourceGroupSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListByResourceGroupSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListVirtualMachineScaleSetsSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsUpdateSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/OperationsListSamples.java delete mode 100644 sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OperationsListMockTests.java diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/CHANGELOG.md b/sdk/computefleet/azure-resourcemanager-computefleet/CHANGELOG.md index e6bd243fd42b..7dda36af9965 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/CHANGELOG.md +++ b/sdk/computefleet/azure-resourcemanager-computefleet/CHANGELOG.md @@ -1,14 +1,8 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2025-05-09) -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Azure Resource Manager Compute Fleet client library for Java. This package contains Microsoft Azure SDK for Compute Fleet Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0 (2024-10-22) diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/README.md b/sdk/computefleet/azure-resourcemanager-computefleet/README.md index 0dee5ed27391..b9e4be19bea1 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/README.md +++ b/sdk/computefleet/azure-resourcemanager-computefleet/README.md @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ ComputeFleetManager manager = ComputeFleetManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -99,101 +99,60 @@ fleet = computeFleetManager.fleets() .define(fleetName) .withRegion(REGION) .withExistingResourceGroup(resourceGroupName) - .withProperties( - new FleetProperties() - .withSpotPriorityProfile( - new SpotPriorityProfile() - .withMaintain(false) - .withCapacity(1) - .withEvictionPolicy(EvictionPolicy.DELETE) - .withAllocationStrategy(SpotAllocationStrategy.LOWEST_PRICE) - ) - .withVmSizesProfile( - Arrays.asList( - new VmSizeProfile().withName("Standard_D4s_v3") - ) - ) - .withComputeProfile( - new ComputeProfile() - .withBaseVirtualMachineProfile( - new BaseVirtualMachineProfile() - .withStorageProfile( - new VirtualMachineScaleSetStorageProfile() - .withImageReference( - new ImageReference() - .withPublisher("canonical") - .withOffer("ubuntu-24_04-lts") - .withSku("server") - .withVersion("latest") - ) - .withOsDisk( - new VirtualMachineScaleSetOSDisk() - .withManagedDisk( - new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS) - ) - .withOsType(OperatingSystemTypes.LINUX) - .withDiskSizeGB(30) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDeleteOption(DiskDeleteOptionTypes.DELETE) - .withCaching(CachingTypes.READ_WRITE) - ) - .withDiskControllerType(DiskControllerTypes.SCSI) - ) - .withOsProfile( - new VirtualMachineScaleSetOSProfile() - .withComputerNamePrefix(randomPadding()) - .withAdminUsername(adminUser) - .withAdminPassword(adminPwd) - .withLinuxConfiguration( - new LinuxConfiguration().withDisablePasswordAuthentication(false) - ) - ) - .withNetworkProfile( - new VirtualMachineScaleSetNetworkProfile() - .withNetworkInterfaceConfigurations( - Arrays.asList( - new VirtualMachineScaleSetNetworkConfiguration() - .withName(vmName) - .withProperties( - new VirtualMachineScaleSetNetworkConfigurationProperties() - .withPrimary(true) - .withEnableAcceleratedNetworking(false) - .withDeleteOption(DeleteOptions.DELETE) - .withIpConfigurations( - Arrays.asList( - new VirtualMachineScaleSetIPConfiguration() - .withName(vmName) - .withProperties( - new VirtualMachineScaleSetIPConfigurationProperties() - .withPrimary(true) - .withSubnet( - new ApiEntityReference() - .withId(network.subnets().get("default").id()) - ) - .withLoadBalancerBackendAddressPools( - loadBalancer.loadBalancingRules() - .get(loadBalancerName + "-lbrule") - .innerModel().backendAddressPools() - ) - ) - ) - ) - ) - ) - ) - .withNetworkApiVersion(NetworkApiVersion.fromString("2024-03-01")) - ) - ) - .withComputeApiVersion("2024-03-01") - .withPlatformFaultDomainCount(1) - ) - .withRegularPriorityProfile(new RegularPriorityProfile() - .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE) - .withMinCapacity(1) - .withCapacity(2) - ) - ) + .withProperties(new FleetProperties() + .withSpotPriorityProfile(new SpotPriorityProfile().withMaintain(false) + .withCapacity(1) + .withEvictionPolicy(EvictionPolicy.DELETE) + .withAllocationStrategy(SpotAllocationStrategy.LOWEST_PRICE)) + .withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_D4s_v3"))) + .withComputeProfile(new ComputeProfile() + .withBaseVirtualMachineProfile(new BaseVirtualMachineProfile() + .withStorageProfile(new VirtualMachineScaleSetStorageProfile() + .withImageReference(new ImageReference().withPublisher("canonical") + .withOffer("ubuntu-24_04-lts") + .withSku("server") + .withVersion("latest")) + .withOsDisk(new VirtualMachineScaleSetOSDisk() + .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() + .withStorageAccountType(StorageAccountTypes.PREMIUM_LRS)) + .withOsType(OperatingSystemTypes.LINUX) + .withDiskSizeGB(30) + .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) + .withDeleteOption(DiskDeleteOptionTypes.DELETE) + .withCaching(CachingTypes.READ_WRITE)) + .withDiskControllerType(DiskControllerTypes.SCSI)) + .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix(randomPadding()) + .withAdminUsername(adminUser) + .withAdminPassword(adminPwd) + .withLinuxConfiguration( + new LinuxConfiguration().withDisablePasswordAuthentication(false))) + .withNetworkProfile( + new VirtualMachineScaleSetNetworkProfile() + .withNetworkInterfaceConfigurations( + Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName(vmName) + .withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties() + .withPrimary(true) + .withEnableAcceleratedNetworking(false) + .withDeleteOption(DeleteOptions.DELETE) + .withIpConfigurations(Arrays + .asList(new VirtualMachineScaleSetIPConfiguration().withName(vmName) + .withProperties( + new VirtualMachineScaleSetIPConfigurationProperties() + .withPrimary(true) + .withSubnet(new ApiEntityReference() + .withId(network.subnets().get("default").id())) + .withLoadBalancerBackendAddressPools( + loadBalancer.loadBalancingRules() + .get(loadBalancerName + "-lbrule") + .innerModel() + .backendAddressPools()))))))) + .withNetworkApiVersion(NetworkApiVersion.fromString("2024-03-01")))) + .withComputeApiVersion("2024-03-01") + .withPlatformFaultDomainCount(1)) + .withRegularPriorityProfile(new RegularPriorityProfile() + .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE) + .withMinCapacity(1) + .withCapacity(2))) .create(); ``` [Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md) @@ -226,5 +185,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md b/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md index df5eac7a8d92..77e24ff3efbd 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md +++ b/sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md @@ -1,982 +1,2 @@ # Code snippets and samples - -## Fleets - -- [CreateOrUpdate](#fleets_createorupdate) -- [Delete](#fleets_delete) -- [GetByResourceGroup](#fleets_getbyresourcegroup) -- [List](#fleets_list) -- [ListByResourceGroup](#fleets_listbyresourcegroup) -- [ListVirtualMachineScaleSets](#fleets_listvirtualmachinescalesets) -- [Update](#fleets_update) - -## Operations - -- [List](#operations_list) -### Fleets_CreateOrUpdate - -```java -import com.azure.core.management.SubResource; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContent; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentComponentName; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentPassName; -import com.azure.resourcemanager.computefleet.models.ApiEntityReference; -import com.azure.resourcemanager.computefleet.models.ApplicationProfile; -import com.azure.resourcemanager.computefleet.models.BaseVirtualMachineProfile; -import com.azure.resourcemanager.computefleet.models.BootDiagnostics; -import com.azure.resourcemanager.computefleet.models.CachingTypes; -import com.azure.resourcemanager.computefleet.models.CapacityReservationProfile; -import com.azure.resourcemanager.computefleet.models.ComputeProfile; -import com.azure.resourcemanager.computefleet.models.DeleteOptions; -import com.azure.resourcemanager.computefleet.models.DiagnosticsProfile; -import com.azure.resourcemanager.computefleet.models.DiffDiskOptions; -import com.azure.resourcemanager.computefleet.models.DiffDiskPlacement; -import com.azure.resourcemanager.computefleet.models.DiffDiskSettings; -import com.azure.resourcemanager.computefleet.models.DiskControllerTypes; -import com.azure.resourcemanager.computefleet.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskDeleteOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskEncryptionSetParameters; -import com.azure.resourcemanager.computefleet.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computefleet.models.EncryptionIdentity; -import com.azure.resourcemanager.computefleet.models.EvictionPolicy; -import com.azure.resourcemanager.computefleet.models.FleetProperties; -import com.azure.resourcemanager.computefleet.models.IPVersion; -import com.azure.resourcemanager.computefleet.models.ImageReference; -import com.azure.resourcemanager.computefleet.models.KeyVaultSecretReference; -import com.azure.resourcemanager.computefleet.models.LinuxConfiguration; -import com.azure.resourcemanager.computefleet.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.LinuxPatchSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.computefleet.models.Mode; -import com.azure.resourcemanager.computefleet.models.NetworkApiVersion; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliaryMode; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.computefleet.models.OSImageNotificationProfile; -import com.azure.resourcemanager.computefleet.models.OperatingSystemTypes; -import com.azure.resourcemanager.computefleet.models.PatchSettings; -import com.azure.resourcemanager.computefleet.models.Plan; -import com.azure.resourcemanager.computefleet.models.ProtocolTypes; -import com.azure.resourcemanager.computefleet.models.ProxyAgentSettings; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSku; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computefleet.models.RegularPriorityAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.RegularPriorityProfile; -import com.azure.resourcemanager.computefleet.models.ScheduledEventsProfile; -import com.azure.resourcemanager.computefleet.models.SecurityEncryptionTypes; -import com.azure.resourcemanager.computefleet.models.SecurityPostureReference; -import com.azure.resourcemanager.computefleet.models.SecurityProfile; -import com.azure.resourcemanager.computefleet.models.SecurityTypes; -import com.azure.resourcemanager.computefleet.models.ServiceArtifactReference; -import com.azure.resourcemanager.computefleet.models.SettingNames; -import com.azure.resourcemanager.computefleet.models.SpotAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.SpotPriorityProfile; -import com.azure.resourcemanager.computefleet.models.SshConfiguration; -import com.azure.resourcemanager.computefleet.models.SshPublicKey; -import com.azure.resourcemanager.computefleet.models.StorageAccountTypes; -import com.azure.resourcemanager.computefleet.models.TerminateNotificationProfile; -import com.azure.resourcemanager.computefleet.models.UefiSettings; -import com.azure.resourcemanager.computefleet.models.UserAssignedIdentity; -import com.azure.resourcemanager.computefleet.models.VMDiskSecurityProfile; -import com.azure.resourcemanager.computefleet.models.VMGalleryApplication; -import com.azure.resourcemanager.computefleet.models.VMSizeProperties; -import com.azure.resourcemanager.computefleet.models.VaultCertificate; -import com.azure.resourcemanager.computefleet.models.VaultSecretGroup; -import com.azure.resourcemanager.computefleet.models.VirtualHardDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetDataDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtension; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetHardwareProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIpTag; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetManagedDiskParameters; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetStorageProfile; -import com.azure.resourcemanager.computefleet.models.VmSizeProfile; -import com.azure.resourcemanager.computefleet.models.WinRMConfiguration; -import com.azure.resourcemanager.computefleet.models.WinRMListener; -import com.azure.resourcemanager.computefleet.models.WindowsConfiguration; -import com.azure.resourcemanager.computefleet.models.WindowsPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchMode; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Fleets CreateOrUpdate. - */ -public final class FleetsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_CreateOrUpdate.json - */ - /** - * Sample code: Fleets_CreateOrUpdate. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsCreateOrUpdate(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets() - .define("testFleet") - .withRegion("westus") - .withExistingResourceGroup("rgazurefleet") - .withTags(mapOf("key3518", "fakeTokenPlaceholder")) - .withProperties(new FleetProperties().withSpotPriorityProfile(new SpotPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withMaxPricePerVM(0.00865D) - .withEvictionPolicy(EvictionPolicy.DELETE) - .withAllocationStrategy(SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED) - .withMaintain(true)) - .withRegularPriorityProfile(new RegularPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)) - .withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_d1_v2").withRank(19225))) - .withComputeProfile( - new ComputeProfile() - .withBaseVirtualMachineProfile(new BaseVirtualMachineProfile() - .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("o") - .withAdminUsername("nrgzqciiaaxjrqldbmjbqkyhntp") - .withAdminPassword("fakeTokenPlaceholder") - .withCustomData("xjjib") - .withWindowsConfiguration(new WindowsConfiguration().withProvisionVMAgent(true) - .withEnableAutomaticUpdates(true) - .withTimeZone("hlyjiqcfksgrpjrct") - .withAdditionalUnattendContent( - Arrays.asList(new AdditionalUnattendContent() - .withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) - .withComponentName( - AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) - .withSettingName(SettingNames.AUTO_LOGON) - .withContent("bubmqbxjkj"))) - .withPatchSettings(new PatchSettings() - .withPatchMode(WindowsVMGuestPatchMode.MANUAL) - .withEnableHotpatching(true) - .withAssessmentMode(WindowsPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new WindowsVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - WindowsVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withWinRM(new WinRMConfiguration().withListeners(Arrays.asList(new WinRMListener() - .withProtocol(ProtocolTypes.HTTPS) - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName")))) - .withEnableVMAgentPlatformUpdates(true)) - .withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration().withPublicKeys(Arrays.asList( - new SshPublicKey().withPath("kmqz").withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.IMAGE_DEFAULT) - .withAssessmentMode(LinuxPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new LinuxVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withEnableVMAgentPlatformUpdates(true)) - .withSecrets(Arrays.asList(new VaultSecretGroup() - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")) - .withVaultCertificates(Arrays.asList(new VaultCertificate() - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName") - .withCertificateStore("nlxrwavpzhueffxsshlun"))))) - .withAllowExtensionOperations(true) - .withRequireGuestProvisionSignal(true)) - .withStorageProfile(new VirtualMachineScaleSetStorageProfile() - .withImageReference(new ImageReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}") - .withPublisher("mqxgwbiyjzmxavhbkd") - .withOffer("isxgumkarlkomp") - .withSku("eojmppqcrnpmxirtp") - .withVersion("wvpcqefgtmqdgltiuz") - .withSharedGalleryImageId("kmkgihoxwlawuuhcinfirktdwkmx") - .withCommunityGalleryImageId("vlqe")) - .withOsDisk(new VirtualMachineScaleSetOSDisk().withName("wfttw") - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiffDiskSettings(new DiffDiskSettings() - .withOption(DiffDiskOptions.LOCAL) - .withPlacement(DiffDiskPlacement.CACHE_DISK)) - .withDiskSizeGB(14) - .withOsType(OperatingSystemTypes.WINDOWS) - .withImage(new VirtualHardDisk().withUri( - "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd")) - .withVhdContainers(Arrays.asList("tkzcwddtinkfpnfklatw")) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks(Arrays.asList(new VirtualMachineScaleSetDataDisk() - .withName("eogiykmdmeikswxmigjws") - .withLun(14) - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(6) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDiskIOPSReadWrite(27L) - .withDiskMBpsReadWrite(2L) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.fromString("uzb"))) - .withNetworkProfile(new VirtualMachineScaleSetNetworkProfile() - .withHealthProbe(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}")) - .withNetworkInterfaceConfigurations( - Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("i") - .withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties() - .withPrimary(true) - .withEnableAcceleratedNetworking(true) - .withDisableTcpStateTracking(true) - .withEnableFpga(true) - .withNetworkSecurityGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}")) - .withDnsSettings(new VirtualMachineScaleSetNetworkConfigurationDnsSettings() - .withDnsServers(Arrays.asList("nxmmfolhclsesu"))) - .withIpConfigurations( - Arrays.asList(new VirtualMachineScaleSetIPConfiguration() - .withName("oezqhkidfhyywlfzwuotilrpbqnjg") - .withProperties( - new VirtualMachineScaleSetIPConfigurationProperties() - .withSubnet(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}")) - .withPrimary(true) - .withPublicIPAddressConfiguration( - new VirtualMachineScaleSetPublicIPAddressConfiguration() - .withName("fvpqf") - .withProperties( - new VirtualMachineScaleSetPublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(9) - .withDnsSettings( - new VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings() - .withDomainNameLabel( - "ukrddzvmorpmfsczjwtbvp") - .withDomainNameLabelScope( - DomainNameLabelScopeTypes.TENANT_REUSE)) - .withIpTags(Arrays.asList( - new VirtualMachineScaleSetIpTag() - .withIpTagType("sddgsoemnzgqizale") - .withTag("wufmhrjsakbiaetyara"))) - .withPublicIPPrefix( - new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}")) - .withPublicIPAddressVersion(IPVersion.IPV4) - .withDeleteOption(DeleteOptions.DELETE)) - .withSku(new PublicIPAddressSku() - .withName(PublicIPAddressSkuName.BASIC) - .withTier(PublicIPAddressSkuTier.REGIONAL))) - .withPrivateIPAddressVersion(IPVersion.IPV4) - .withApplicationGatewayBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"))) - .withApplicationSecurityGroups(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"))) - .withLoadBalancerBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}")))))) - .withEnableIPForwarding(true) - .withDeleteOption(DeleteOptions.DELETE) - .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.NONE) - .withAuxiliarySku(NetworkInterfaceAuxiliarySku.NONE)))) - .withNetworkApiVersion(NetworkApiVersion.V2020_11_01)) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true)) - .withEncryptionAtHost(true) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH) - .withEncryptionIdentity(new EncryptionIdentity().withUserAssignedIdentityResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}")) - .withProxyAgentSettings(new ProxyAgentSettings().withEnabled(true) - .withMode(Mode.AUDIT) - .withKeyIncarnationId(20))) - .withDiagnosticsProfile( - new DiagnosticsProfile().withBootDiagnostics(new BootDiagnostics() - .withEnabled(true) - .withStorageUri("http://myStorageAccountName.blob.core.windows.net"))) - .withExtensionProfile(new VirtualMachineScaleSetExtensionProfile() - .withExtensions(Arrays.asList(new VirtualMachineScaleSetExtension().withName("bndxuxx") - .withProperties(new VirtualMachineScaleSetExtensionProperties() - .withForceUpdateTag("yhgxw") - .withPublisher("kpxtirxjfprhs") - .withType("pgjilctjjwaa") - .withTypeHandlerVersion("zevivcoilxmbwlrihhhibq") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withProtectedSettings(mapOf()) - .withProvisionAfterExtensions(Arrays.asList("nftzosroolbcwmpupujzqwqe")) - .withSuppressFailures(true) - .withProtectedSettingsFromKeyVault(new KeyVaultSecretReference() - .withSecretUrl("fakeTokenPlaceholder") - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")))))) - .withExtensionsTimeBudget("mbhjahtdygwgyszdwjtvlvtgchdwil")) - .withLicenseType("v") - .withScheduledEventsProfile(new ScheduledEventsProfile() - .withTerminateNotificationProfile(new TerminateNotificationProfile() - .withNotBeforeTimeout("iljppmmw") - .withEnable(true)) - .withOsImageNotificationProfile( - new OSImageNotificationProfile().withNotBeforeTimeout("olbpadmevekyczfokodtfprxti") - .withEnable(true))) - .withUserData("s") - .withCapacityReservation(new CapacityReservationProfile() - .withCapacityReservationGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"))) - .withApplicationProfile(new ApplicationProfile().withGalleryApplications( - Arrays.asList(new VMGalleryApplication().withTags("eyrqjbib") - .withOrder(5) - .withPackageReferenceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}") - .withConfigurationReference("ulztmiavpojpbpbddgnuuiimxcpau") - .withTreatFailureAsDeploymentFailure(true) - .withEnableAutomaticUpgrade(true)))) - .withHardwareProfile( - new VirtualMachineScaleSetHardwareProfile().withVmSizeProperties(new VMSizeProperties() - .withVCPUsAvailable(16) - .withVCPUsPerCore(23))) - .withServiceArtifactReference(new ServiceArtifactReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}")) - .withSecurityPostureReference(new SecurityPostureReference().withId( - "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest") - .withExcludeExtensions(Arrays.asList("{securityPostureVMExtensionName}")) - .withIsOverridable(true))) - .withComputeApiVersion("2023-07-01") - .withPlatformFaultDomainCount(1))) - .withZones(Arrays.asList("zone1", "zone2")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("key9851", new UserAssignedIdentity()))) - .withPlan(new Plan().withName("jwgrcrnrtfoxn") - .withPublisher("iozjbiqqckqm") - .withProduct("cgopbyvdyqikahwyxfpzwaqk") - .withPromotionCode("fakeTokenPlaceholder") - .withVersion("wa")) - .create(); - } - - /* - * x-ms-original-file: 2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json - */ - /** - * Sample code: Fleets_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void - fleetsCreateOrUpdateMinimumSet(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets() - .define("testFleet") - .withRegion("eastus2euap") - .withExistingResourceGroup("rgazurefleet") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties(new FleetProperties() - .withSpotPriorityProfile(new SpotPriorityProfile().withCapacity(2) - .withMinCapacity(1) - .withEvictionPolicy(EvictionPolicy.DELETE) - .withAllocationStrategy(SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED) - .withMaintain(true)) - .withRegularPriorityProfile(new RegularPriorityProfile().withCapacity(2) - .withMinCapacity(1) - .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)) - .withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3"), - new VmSizeProfile().withName("Standard_D4s_v3"), new VmSizeProfile().withName("Standard_E2s_v3"))) - .withComputeProfile(new ComputeProfile() - .withBaseVirtualMachineProfile(new BaseVirtualMachineProfile() - .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("prefix") - .withAdminUsername("azureuser") - .withAdminPassword("fakeTokenPlaceholder") - .withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(false))) - .withStorageProfile(new VirtualMachineScaleSetStorageProfile() - .withImageReference(new ImageReference().withPublisher("canonical") - .withOffer("0001-com-ubuntu-server-focal") - .withSku("20_04-lts-gen2") - .withVersion("latest")) - .withOsDisk(new VirtualMachineScaleSetOSDisk() - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withOsType(OperatingSystemTypes.LINUX) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS)))) - .withNetworkProfile(new VirtualMachineScaleSetNetworkProfile() - .withNetworkInterfaceConfigurations( - Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("vmNameTest") - .withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties() - .withPrimary(true) - .withEnableAcceleratedNetworking(false) - .withIpConfigurations(Arrays.asList(new VirtualMachineScaleSetIPConfiguration() - .withName("vmNameTest") - .withProperties(new VirtualMachineScaleSetIPConfigurationProperties() - .withSubnet(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}")) - .withPrimary(true) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}")))))) - .withEnableIPForwarding(true)))) - .withNetworkApiVersion(NetworkApiVersion.fromString("2022-07-01")))) - .withComputeApiVersion("2023-09-01") - .withPlatformFaultDomainCount(1))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Fleets_Delete - -```java -/** - * Samples for Fleets Delete. - */ -public final class FleetsDeleteSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_Delete.json - */ - /** - * Sample code: Fleets_Delete. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsDelete(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().delete("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE); - } -} -``` - -### Fleets_GetByResourceGroup - -```java -/** - * Samples for Fleets GetByResourceGroup. - */ -public final class FleetsGetByResourceGroupSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_Get.json - */ - /** - * Sample code: Fleets_Get. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsGet(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().getByResourceGroupWithResponse("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE); - } -} -``` - -### Fleets_List - -```java -/** - * Samples for Fleets List. - */ -public final class FleetsListSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_ListBySubscription.json - */ - /** - * Sample code: Fleets_ListBySubscription. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsListBySubscription(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().list(com.azure.core.util.Context.NONE); - } -} -``` - -### Fleets_ListByResourceGroup - -```java -/** - * Samples for Fleets ListByResourceGroup. - */ -public final class FleetsListByResourceGroupSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_ListByResourceGroup.json - */ - /** - * Sample code: Fleets_ListByResourceGroup. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsListByResourceGroup(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().listByResourceGroup("rgazurefleet", com.azure.core.util.Context.NONE); - } -} -``` - -### Fleets_ListVirtualMachineScaleSets - -```java -/** - * Samples for Fleets ListVirtualMachineScaleSets. - */ -public final class FleetsListVirtualMachineScaleSetsSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_ListVirtualMachineScaleSets.json - */ - /** - * Sample code: Fleets_ListVirtualMachineScaleSets. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void - fleetsListVirtualMachineScaleSets(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().listVirtualMachineScaleSets("rgazurefleet", "myFleet", com.azure.core.util.Context.NONE); - } -} -``` - -### Fleets_Update - -```java -import com.azure.core.management.SubResource; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContent; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentComponentName; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentPassName; -import com.azure.resourcemanager.computefleet.models.ApiEntityReference; -import com.azure.resourcemanager.computefleet.models.ApplicationProfile; -import com.azure.resourcemanager.computefleet.models.BaseVirtualMachineProfile; -import com.azure.resourcemanager.computefleet.models.BootDiagnostics; -import com.azure.resourcemanager.computefleet.models.CachingTypes; -import com.azure.resourcemanager.computefleet.models.CapacityReservationProfile; -import com.azure.resourcemanager.computefleet.models.ComputeProfile; -import com.azure.resourcemanager.computefleet.models.DeleteOptions; -import com.azure.resourcemanager.computefleet.models.DiagnosticsProfile; -import com.azure.resourcemanager.computefleet.models.DiffDiskOptions; -import com.azure.resourcemanager.computefleet.models.DiffDiskPlacement; -import com.azure.resourcemanager.computefleet.models.DiffDiskSettings; -import com.azure.resourcemanager.computefleet.models.DiskControllerTypes; -import com.azure.resourcemanager.computefleet.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskDeleteOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskEncryptionSetParameters; -import com.azure.resourcemanager.computefleet.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computefleet.models.EncryptionIdentity; -import com.azure.resourcemanager.computefleet.models.EvictionPolicy; -import com.azure.resourcemanager.computefleet.models.Fleet; -import com.azure.resourcemanager.computefleet.models.FleetProperties; -import com.azure.resourcemanager.computefleet.models.IPVersion; -import com.azure.resourcemanager.computefleet.models.ImageReference; -import com.azure.resourcemanager.computefleet.models.KeyVaultSecretReference; -import com.azure.resourcemanager.computefleet.models.LinuxConfiguration; -import com.azure.resourcemanager.computefleet.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.LinuxPatchSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentityUpdate; -import com.azure.resourcemanager.computefleet.models.Mode; -import com.azure.resourcemanager.computefleet.models.NetworkApiVersion; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliaryMode; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.computefleet.models.OSImageNotificationProfile; -import com.azure.resourcemanager.computefleet.models.OperatingSystemTypes; -import com.azure.resourcemanager.computefleet.models.PatchSettings; -import com.azure.resourcemanager.computefleet.models.ProtocolTypes; -import com.azure.resourcemanager.computefleet.models.ProxyAgentSettings; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSku; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computefleet.models.RegularPriorityAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.RegularPriorityProfile; -import com.azure.resourcemanager.computefleet.models.ResourcePlanUpdate; -import com.azure.resourcemanager.computefleet.models.ScheduledEventsProfile; -import com.azure.resourcemanager.computefleet.models.SecurityEncryptionTypes; -import com.azure.resourcemanager.computefleet.models.SecurityPostureReference; -import com.azure.resourcemanager.computefleet.models.SecurityProfile; -import com.azure.resourcemanager.computefleet.models.SecurityTypes; -import com.azure.resourcemanager.computefleet.models.ServiceArtifactReference; -import com.azure.resourcemanager.computefleet.models.SettingNames; -import com.azure.resourcemanager.computefleet.models.SpotAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.SpotPriorityProfile; -import com.azure.resourcemanager.computefleet.models.SshConfiguration; -import com.azure.resourcemanager.computefleet.models.SshPublicKey; -import com.azure.resourcemanager.computefleet.models.StorageAccountTypes; -import com.azure.resourcemanager.computefleet.models.TerminateNotificationProfile; -import com.azure.resourcemanager.computefleet.models.UefiSettings; -import com.azure.resourcemanager.computefleet.models.VMDiskSecurityProfile; -import com.azure.resourcemanager.computefleet.models.VMGalleryApplication; -import com.azure.resourcemanager.computefleet.models.VMSizeProperties; -import com.azure.resourcemanager.computefleet.models.VaultCertificate; -import com.azure.resourcemanager.computefleet.models.VaultSecretGroup; -import com.azure.resourcemanager.computefleet.models.VirtualHardDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetDataDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtension; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetHardwareProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIpTag; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetManagedDiskParameters; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetStorageProfile; -import com.azure.resourcemanager.computefleet.models.VmSizeProfile; -import com.azure.resourcemanager.computefleet.models.WinRMConfiguration; -import com.azure.resourcemanager.computefleet.models.WinRMListener; -import com.azure.resourcemanager.computefleet.models.WindowsConfiguration; -import com.azure.resourcemanager.computefleet.models.WindowsPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchMode; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Fleets Update. - */ -public final class FleetsUpdateSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_Update.json - */ - /** - * Sample code: Fleets_Update. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsUpdate(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - Fleet resource = manager.fleets() - .getByResourceGroupWithResponse("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentityUpdate().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withPlan(new ResourcePlanUpdate().withName("jwgrcrnrtfoxn") - .withPublisher("iozjbiqqckqm") - .withProduct("cgopbyvdyqikahwyxfpzwaqk") - .withPromotionCode("fakeTokenPlaceholder") - .withVersion("wa")) - .withProperties(new FleetProperties() - .withSpotPriorityProfile(new SpotPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withMaxPricePerVM(0.00865D) - .withEvictionPolicy(EvictionPolicy.DELETE) - .withAllocationStrategy(SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED) - .withMaintain(true)) - .withRegularPriorityProfile(new RegularPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)) - .withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_d1_v2").withRank(19225))) - .withComputeProfile( - new ComputeProfile() - .withBaseVirtualMachineProfile(new BaseVirtualMachineProfile() - .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("o") - .withAdminUsername("nrgzqciiaaxjrqldbmjbqkyhntp") - .withAdminPassword("fakeTokenPlaceholder") - .withCustomData("xjjib") - .withWindowsConfiguration(new WindowsConfiguration().withProvisionVMAgent(true) - .withEnableAutomaticUpdates(true) - .withTimeZone("hlyjiqcfksgrpjrct") - .withAdditionalUnattendContent( - Arrays.asList(new AdditionalUnattendContent() - .withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) - .withComponentName( - AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) - .withSettingName(SettingNames.AUTO_LOGON) - .withContent("bubmqbxjkj"))) - .withPatchSettings(new PatchSettings() - .withPatchMode(WindowsVMGuestPatchMode.MANUAL) - .withEnableHotpatching(true) - .withAssessmentMode(WindowsPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new WindowsVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - WindowsVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withWinRM(new WinRMConfiguration().withListeners(Arrays.asList(new WinRMListener() - .withProtocol(ProtocolTypes.HTTP) - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName")))) - .withEnableVMAgentPlatformUpdates(true)) - .withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration().withPublicKeys(Arrays.asList( - new SshPublicKey().withPath("kmqz").withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.IMAGE_DEFAULT) - .withAssessmentMode(LinuxPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new LinuxVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withEnableVMAgentPlatformUpdates(true)) - .withSecrets(Arrays.asList(new VaultSecretGroup() - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")) - .withVaultCertificates(Arrays.asList(new VaultCertificate() - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName") - .withCertificateStore("nlxrwavpzhueffxsshlun"))))) - .withAllowExtensionOperations(true) - .withRequireGuestProvisionSignal(true)) - .withStorageProfile(new VirtualMachineScaleSetStorageProfile() - .withImageReference(new ImageReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}") - .withPublisher("mqxgwbiyjzmxavhbkd") - .withOffer("isxgumkarlkomp") - .withSku("eojmppqcrnpmxirtp") - .withVersion("wvpcqefgtmqdgltiuz") - .withSharedGalleryImageId("kmkgihoxwlawuuhcinfirktdwkmx") - .withCommunityGalleryImageId("vlqe")) - .withOsDisk(new VirtualMachineScaleSetOSDisk().withName("wfttw") - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiffDiskSettings(new DiffDiskSettings() - .withOption(DiffDiskOptions.LOCAL) - .withPlacement(DiffDiskPlacement.CACHE_DISK)) - .withDiskSizeGB(14) - .withOsType(OperatingSystemTypes.WINDOWS) - .withImage(new VirtualHardDisk().withUri( - "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd")) - .withVhdContainers(Arrays.asList("tkzcwddtinkfpnfklatw")) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks(Arrays.asList(new VirtualMachineScaleSetDataDisk() - .withName("eogiykmdmeikswxmigjws") - .withLun(14) - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(6) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDiskIOPSReadWrite(27L) - .withDiskMBpsReadWrite(2L) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.fromString("uzb"))) - .withNetworkProfile(new VirtualMachineScaleSetNetworkProfile() - .withHealthProbe(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}")) - .withNetworkInterfaceConfigurations( - Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("i") - .withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties() - .withPrimary(true) - .withEnableAcceleratedNetworking(true) - .withDisableTcpStateTracking(true) - .withEnableFpga(true) - .withNetworkSecurityGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}")) - .withDnsSettings(new VirtualMachineScaleSetNetworkConfigurationDnsSettings() - .withDnsServers(Arrays.asList("nxmmfolhclsesu"))) - .withIpConfigurations( - Arrays.asList(new VirtualMachineScaleSetIPConfiguration() - .withName("oezqhkidfhyywlfzwuotilrpbqnjg") - .withProperties( - new VirtualMachineScaleSetIPConfigurationProperties() - .withSubnet(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}")) - .withPrimary(true) - .withPublicIPAddressConfiguration( - new VirtualMachineScaleSetPublicIPAddressConfiguration() - .withName("fvpqf") - .withProperties( - new VirtualMachineScaleSetPublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(9) - .withDnsSettings( - new VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings() - .withDomainNameLabel( - "ukrddzvmorpmfsczjwtbvp") - .withDomainNameLabelScope( - DomainNameLabelScopeTypes.TENANT_REUSE)) - .withIpTags(Arrays.asList( - new VirtualMachineScaleSetIpTag() - .withIpTagType("sddgsoemnzgqizale") - .withTag("wufmhrjsakbiaetyara"))) - .withPublicIPPrefix( - new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}")) - .withPublicIPAddressVersion(IPVersion.IPV4) - .withDeleteOption(DeleteOptions.DELETE)) - .withSku(new PublicIPAddressSku() - .withName(PublicIPAddressSkuName.BASIC) - .withTier(PublicIPAddressSkuTier.REGIONAL))) - .withPrivateIPAddressVersion(IPVersion.IPV4) - .withApplicationGatewayBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"))) - .withApplicationSecurityGroups(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"))) - .withLoadBalancerBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}")))))) - .withEnableIPForwarding(true) - .withDeleteOption(DeleteOptions.DELETE) - .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.NONE) - .withAuxiliarySku(NetworkInterfaceAuxiliarySku.NONE)))) - .withNetworkApiVersion(NetworkApiVersion.V2020_11_01)) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true)) - .withEncryptionAtHost(true) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH) - .withEncryptionIdentity(new EncryptionIdentity().withUserAssignedIdentityResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}")) - .withProxyAgentSettings(new ProxyAgentSettings().withEnabled(true) - .withMode(Mode.AUDIT) - .withKeyIncarnationId(20))) - .withDiagnosticsProfile( - new DiagnosticsProfile().withBootDiagnostics(new BootDiagnostics() - .withEnabled(true) - .withStorageUri("http://myStorageAccountName.blob.core.windows.net"))) - .withExtensionProfile(new VirtualMachineScaleSetExtensionProfile() - .withExtensions(Arrays.asList(new VirtualMachineScaleSetExtension().withName("bndxuxx") - .withProperties(new VirtualMachineScaleSetExtensionProperties() - .withForceUpdateTag("yhgxw") - .withPublisher("kpxtirxjfprhs") - .withType("pgjilctjjwaa") - .withTypeHandlerVersion("zevivcoilxmbwlrihhhibq") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withProtectedSettings(mapOf()) - .withProvisionAfterExtensions(Arrays.asList("nftzosroolbcwmpupujzqwqe")) - .withSuppressFailures(true) - .withProtectedSettingsFromKeyVault(new KeyVaultSecretReference() - .withSecretUrl("fakeTokenPlaceholder") - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")))))) - .withExtensionsTimeBudget("mbhjahtdygwgyszdwjtvlvtgchdwil")) - .withLicenseType("v") - .withScheduledEventsProfile(new ScheduledEventsProfile() - .withTerminateNotificationProfile(new TerminateNotificationProfile() - .withNotBeforeTimeout("iljppmmw") - .withEnable(true)) - .withOsImageNotificationProfile( - new OSImageNotificationProfile().withNotBeforeTimeout("olbpadmevekyczfokodtfprxti") - .withEnable(true))) - .withUserData("s") - .withCapacityReservation(new CapacityReservationProfile() - .withCapacityReservationGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"))) - .withApplicationProfile(new ApplicationProfile().withGalleryApplications( - Arrays.asList(new VMGalleryApplication().withTags("eyrqjbib") - .withOrder(5) - .withPackageReferenceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}") - .withConfigurationReference("ulztmiavpojpbpbddgnuuiimxcpau") - .withTreatFailureAsDeploymentFailure(true) - .withEnableAutomaticUpgrade(true)))) - .withHardwareProfile( - new VirtualMachineScaleSetHardwareProfile().withVmSizeProperties(new VMSizeProperties() - .withVCPUsAvailable(16) - .withVCPUsPerCore(23))) - .withServiceArtifactReference(new ServiceArtifactReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}")) - .withSecurityPostureReference(new SecurityPostureReference().withId( - "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest") - .withExcludeExtensions(Arrays.asList("{securityPostureVMExtensionName}")) - .withIsOverridable(true))) - .withComputeApiVersion("2023-07-01") - .withPlatformFaultDomainCount(1))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Operations_List - -```java -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2024-11-01/Operations_List.json - */ - /** - * Sample code: Operations_List. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void operationsList(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} -``` - diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/ComputeFleetManagementClientImpl.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/ComputeFleetManagementClientImpl.java index 47446a8be096..96eded103421 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/ComputeFleetManagementClientImpl.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/main/java/com/azure/resourcemanager/computefleet/implementation/ComputeFleetManagementClientImpl.java @@ -169,7 +169,7 @@ public FleetsClient getFleets() { this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; this.subscriptionId = subscriptionId; - this.apiVersion = "2024-11-01"; + this.apiVersion = "2025-03-01"; this.operations = new OperationsClientImpl(this); this.fleets = new FleetsClientImpl(this); } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsCreateOrUpdateSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsCreateOrUpdateSamples.java deleted file mode 100644 index 21d1bce77f94..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsCreateOrUpdateSamples.java +++ /dev/null @@ -1,453 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -import com.azure.core.management.SubResource; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContent; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentComponentName; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentPassName; -import com.azure.resourcemanager.computefleet.models.ApiEntityReference; -import com.azure.resourcemanager.computefleet.models.ApplicationProfile; -import com.azure.resourcemanager.computefleet.models.BaseVirtualMachineProfile; -import com.azure.resourcemanager.computefleet.models.BootDiagnostics; -import com.azure.resourcemanager.computefleet.models.CachingTypes; -import com.azure.resourcemanager.computefleet.models.CapacityReservationProfile; -import com.azure.resourcemanager.computefleet.models.ComputeProfile; -import com.azure.resourcemanager.computefleet.models.DeleteOptions; -import com.azure.resourcemanager.computefleet.models.DiagnosticsProfile; -import com.azure.resourcemanager.computefleet.models.DiffDiskOptions; -import com.azure.resourcemanager.computefleet.models.DiffDiskPlacement; -import com.azure.resourcemanager.computefleet.models.DiffDiskSettings; -import com.azure.resourcemanager.computefleet.models.DiskControllerTypes; -import com.azure.resourcemanager.computefleet.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskDeleteOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskEncryptionSetParameters; -import com.azure.resourcemanager.computefleet.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computefleet.models.EncryptionIdentity; -import com.azure.resourcemanager.computefleet.models.EvictionPolicy; -import com.azure.resourcemanager.computefleet.models.FleetProperties; -import com.azure.resourcemanager.computefleet.models.IPVersion; -import com.azure.resourcemanager.computefleet.models.ImageReference; -import com.azure.resourcemanager.computefleet.models.KeyVaultSecretReference; -import com.azure.resourcemanager.computefleet.models.LinuxConfiguration; -import com.azure.resourcemanager.computefleet.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.LinuxPatchSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentity; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.computefleet.models.Mode; -import com.azure.resourcemanager.computefleet.models.NetworkApiVersion; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliaryMode; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.computefleet.models.OSImageNotificationProfile; -import com.azure.resourcemanager.computefleet.models.OperatingSystemTypes; -import com.azure.resourcemanager.computefleet.models.PatchSettings; -import com.azure.resourcemanager.computefleet.models.Plan; -import com.azure.resourcemanager.computefleet.models.ProtocolTypes; -import com.azure.resourcemanager.computefleet.models.ProxyAgentSettings; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSku; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computefleet.models.RegularPriorityAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.RegularPriorityProfile; -import com.azure.resourcemanager.computefleet.models.ScheduledEventsProfile; -import com.azure.resourcemanager.computefleet.models.SecurityEncryptionTypes; -import com.azure.resourcemanager.computefleet.models.SecurityPostureReference; -import com.azure.resourcemanager.computefleet.models.SecurityProfile; -import com.azure.resourcemanager.computefleet.models.SecurityTypes; -import com.azure.resourcemanager.computefleet.models.ServiceArtifactReference; -import com.azure.resourcemanager.computefleet.models.SettingNames; -import com.azure.resourcemanager.computefleet.models.SpotAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.SpotPriorityProfile; -import com.azure.resourcemanager.computefleet.models.SshConfiguration; -import com.azure.resourcemanager.computefleet.models.SshPublicKey; -import com.azure.resourcemanager.computefleet.models.StorageAccountTypes; -import com.azure.resourcemanager.computefleet.models.TerminateNotificationProfile; -import com.azure.resourcemanager.computefleet.models.UefiSettings; -import com.azure.resourcemanager.computefleet.models.UserAssignedIdentity; -import com.azure.resourcemanager.computefleet.models.VMDiskSecurityProfile; -import com.azure.resourcemanager.computefleet.models.VMGalleryApplication; -import com.azure.resourcemanager.computefleet.models.VMSizeProperties; -import com.azure.resourcemanager.computefleet.models.VaultCertificate; -import com.azure.resourcemanager.computefleet.models.VaultSecretGroup; -import com.azure.resourcemanager.computefleet.models.VirtualHardDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetDataDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtension; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetHardwareProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIpTag; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetManagedDiskParameters; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetStorageProfile; -import com.azure.resourcemanager.computefleet.models.VmSizeProfile; -import com.azure.resourcemanager.computefleet.models.WinRMConfiguration; -import com.azure.resourcemanager.computefleet.models.WinRMListener; -import com.azure.resourcemanager.computefleet.models.WindowsConfiguration; -import com.azure.resourcemanager.computefleet.models.WindowsPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchMode; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Fleets CreateOrUpdate. - */ -public final class FleetsCreateOrUpdateSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_CreateOrUpdate.json - */ - /** - * Sample code: Fleets_CreateOrUpdate. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsCreateOrUpdate(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets() - .define("testFleet") - .withRegion("westus") - .withExistingResourceGroup("rgazurefleet") - .withTags(mapOf("key3518", "fakeTokenPlaceholder")) - .withProperties(new FleetProperties().withSpotPriorityProfile(new SpotPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withMaxPricePerVM(0.00865D) - .withEvictionPolicy(EvictionPolicy.DELETE) - .withAllocationStrategy(SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED) - .withMaintain(true)) - .withRegularPriorityProfile(new RegularPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)) - .withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_d1_v2").withRank(19225))) - .withComputeProfile( - new ComputeProfile() - .withBaseVirtualMachineProfile(new BaseVirtualMachineProfile() - .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("o") - .withAdminUsername("nrgzqciiaaxjrqldbmjbqkyhntp") - .withAdminPassword("fakeTokenPlaceholder") - .withCustomData("xjjib") - .withWindowsConfiguration(new WindowsConfiguration().withProvisionVMAgent(true) - .withEnableAutomaticUpdates(true) - .withTimeZone("hlyjiqcfksgrpjrct") - .withAdditionalUnattendContent( - Arrays.asList(new AdditionalUnattendContent() - .withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) - .withComponentName( - AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) - .withSettingName(SettingNames.AUTO_LOGON) - .withContent("bubmqbxjkj"))) - .withPatchSettings(new PatchSettings() - .withPatchMode(WindowsVMGuestPatchMode.MANUAL) - .withEnableHotpatching(true) - .withAssessmentMode(WindowsPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new WindowsVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - WindowsVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withWinRM(new WinRMConfiguration().withListeners(Arrays.asList(new WinRMListener() - .withProtocol(ProtocolTypes.HTTPS) - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName")))) - .withEnableVMAgentPlatformUpdates(true)) - .withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration().withPublicKeys(Arrays.asList( - new SshPublicKey().withPath("kmqz").withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.IMAGE_DEFAULT) - .withAssessmentMode(LinuxPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new LinuxVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withEnableVMAgentPlatformUpdates(true)) - .withSecrets(Arrays.asList(new VaultSecretGroup() - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")) - .withVaultCertificates(Arrays.asList(new VaultCertificate() - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName") - .withCertificateStore("nlxrwavpzhueffxsshlun"))))) - .withAllowExtensionOperations(true) - .withRequireGuestProvisionSignal(true)) - .withStorageProfile(new VirtualMachineScaleSetStorageProfile() - .withImageReference(new ImageReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}") - .withPublisher("mqxgwbiyjzmxavhbkd") - .withOffer("isxgumkarlkomp") - .withSku("eojmppqcrnpmxirtp") - .withVersion("wvpcqefgtmqdgltiuz") - .withSharedGalleryImageId("kmkgihoxwlawuuhcinfirktdwkmx") - .withCommunityGalleryImageId("vlqe")) - .withOsDisk(new VirtualMachineScaleSetOSDisk().withName("wfttw") - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiffDiskSettings(new DiffDiskSettings() - .withOption(DiffDiskOptions.LOCAL) - .withPlacement(DiffDiskPlacement.CACHE_DISK)) - .withDiskSizeGB(14) - .withOsType(OperatingSystemTypes.WINDOWS) - .withImage(new VirtualHardDisk().withUri( - "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd")) - .withVhdContainers(Arrays.asList("tkzcwddtinkfpnfklatw")) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks(Arrays.asList(new VirtualMachineScaleSetDataDisk() - .withName("eogiykmdmeikswxmigjws") - .withLun(14) - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(6) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDiskIOPSReadWrite(27L) - .withDiskMBpsReadWrite(2L) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.fromString("uzb"))) - .withNetworkProfile(new VirtualMachineScaleSetNetworkProfile() - .withHealthProbe(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}")) - .withNetworkInterfaceConfigurations( - Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("i") - .withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties() - .withPrimary(true) - .withEnableAcceleratedNetworking(true) - .withDisableTcpStateTracking(true) - .withEnableFpga(true) - .withNetworkSecurityGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}")) - .withDnsSettings(new VirtualMachineScaleSetNetworkConfigurationDnsSettings() - .withDnsServers(Arrays.asList("nxmmfolhclsesu"))) - .withIpConfigurations( - Arrays.asList(new VirtualMachineScaleSetIPConfiguration() - .withName("oezqhkidfhyywlfzwuotilrpbqnjg") - .withProperties( - new VirtualMachineScaleSetIPConfigurationProperties() - .withSubnet(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}")) - .withPrimary(true) - .withPublicIPAddressConfiguration( - new VirtualMachineScaleSetPublicIPAddressConfiguration() - .withName("fvpqf") - .withProperties( - new VirtualMachineScaleSetPublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(9) - .withDnsSettings( - new VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings() - .withDomainNameLabel( - "ukrddzvmorpmfsczjwtbvp") - .withDomainNameLabelScope( - DomainNameLabelScopeTypes.TENANT_REUSE)) - .withIpTags(Arrays.asList( - new VirtualMachineScaleSetIpTag() - .withIpTagType("sddgsoemnzgqizale") - .withTag("wufmhrjsakbiaetyara"))) - .withPublicIPPrefix( - new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}")) - .withPublicIPAddressVersion(IPVersion.IPV4) - .withDeleteOption(DeleteOptions.DELETE)) - .withSku(new PublicIPAddressSku() - .withName(PublicIPAddressSkuName.BASIC) - .withTier(PublicIPAddressSkuTier.REGIONAL))) - .withPrivateIPAddressVersion(IPVersion.IPV4) - .withApplicationGatewayBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"))) - .withApplicationSecurityGroups(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"))) - .withLoadBalancerBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}")))))) - .withEnableIPForwarding(true) - .withDeleteOption(DeleteOptions.DELETE) - .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.NONE) - .withAuxiliarySku(NetworkInterfaceAuxiliarySku.NONE)))) - .withNetworkApiVersion(NetworkApiVersion.V2020_11_01)) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true)) - .withEncryptionAtHost(true) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH) - .withEncryptionIdentity(new EncryptionIdentity().withUserAssignedIdentityResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}")) - .withProxyAgentSettings(new ProxyAgentSettings().withEnabled(true) - .withMode(Mode.AUDIT) - .withKeyIncarnationId(20))) - .withDiagnosticsProfile( - new DiagnosticsProfile().withBootDiagnostics(new BootDiagnostics() - .withEnabled(true) - .withStorageUri("http://myStorageAccountName.blob.core.windows.net"))) - .withExtensionProfile(new VirtualMachineScaleSetExtensionProfile() - .withExtensions(Arrays.asList(new VirtualMachineScaleSetExtension().withName("bndxuxx") - .withProperties(new VirtualMachineScaleSetExtensionProperties() - .withForceUpdateTag("yhgxw") - .withPublisher("kpxtirxjfprhs") - .withType("pgjilctjjwaa") - .withTypeHandlerVersion("zevivcoilxmbwlrihhhibq") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withProtectedSettings(mapOf()) - .withProvisionAfterExtensions(Arrays.asList("nftzosroolbcwmpupujzqwqe")) - .withSuppressFailures(true) - .withProtectedSettingsFromKeyVault(new KeyVaultSecretReference() - .withSecretUrl("fakeTokenPlaceholder") - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")))))) - .withExtensionsTimeBudget("mbhjahtdygwgyszdwjtvlvtgchdwil")) - .withLicenseType("v") - .withScheduledEventsProfile(new ScheduledEventsProfile() - .withTerminateNotificationProfile(new TerminateNotificationProfile() - .withNotBeforeTimeout("iljppmmw") - .withEnable(true)) - .withOsImageNotificationProfile( - new OSImageNotificationProfile().withNotBeforeTimeout("olbpadmevekyczfokodtfprxti") - .withEnable(true))) - .withUserData("s") - .withCapacityReservation(new CapacityReservationProfile() - .withCapacityReservationGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"))) - .withApplicationProfile(new ApplicationProfile().withGalleryApplications( - Arrays.asList(new VMGalleryApplication().withTags("eyrqjbib") - .withOrder(5) - .withPackageReferenceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}") - .withConfigurationReference("ulztmiavpojpbpbddgnuuiimxcpau") - .withTreatFailureAsDeploymentFailure(true) - .withEnableAutomaticUpgrade(true)))) - .withHardwareProfile( - new VirtualMachineScaleSetHardwareProfile().withVmSizeProperties(new VMSizeProperties() - .withVCPUsAvailable(16) - .withVCPUsPerCore(23))) - .withServiceArtifactReference(new ServiceArtifactReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}")) - .withSecurityPostureReference(new SecurityPostureReference().withId( - "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest") - .withExcludeExtensions(Arrays.asList("{securityPostureVMExtensionName}")) - .withIsOverridable(true))) - .withComputeApiVersion("2023-07-01") - .withPlatformFaultDomainCount(1))) - .withZones(Arrays.asList("zone1", "zone2")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("key9851", new UserAssignedIdentity()))) - .withPlan(new Plan().withName("jwgrcrnrtfoxn") - .withPublisher("iozjbiqqckqm") - .withProduct("cgopbyvdyqikahwyxfpzwaqk") - .withPromotionCode("fakeTokenPlaceholder") - .withVersion("wa")) - .create(); - } - - /* - * x-ms-original-file: 2024-11-01/Fleets_CreateOrUpdate_MinimumSet.json - */ - /** - * Sample code: Fleets_CreateOrUpdate_MinimumSet. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void - fleetsCreateOrUpdateMinimumSet(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets() - .define("testFleet") - .withRegion("eastus2euap") - .withExistingResourceGroup("rgazurefleet") - .withTags(mapOf("key", "fakeTokenPlaceholder")) - .withProperties(new FleetProperties() - .withSpotPriorityProfile(new SpotPriorityProfile().withCapacity(2) - .withMinCapacity(1) - .withEvictionPolicy(EvictionPolicy.DELETE) - .withAllocationStrategy(SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED) - .withMaintain(true)) - .withRegularPriorityProfile(new RegularPriorityProfile().withCapacity(2) - .withMinCapacity(1) - .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)) - .withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_D2s_v3"), - new VmSizeProfile().withName("Standard_D4s_v3"), new VmSizeProfile().withName("Standard_E2s_v3"))) - .withComputeProfile(new ComputeProfile() - .withBaseVirtualMachineProfile(new BaseVirtualMachineProfile() - .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("prefix") - .withAdminUsername("azureuser") - .withAdminPassword("fakeTokenPlaceholder") - .withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(false))) - .withStorageProfile(new VirtualMachineScaleSetStorageProfile() - .withImageReference(new ImageReference().withPublisher("canonical") - .withOffer("0001-com-ubuntu-server-focal") - .withSku("20_04-lts-gen2") - .withVersion("latest")) - .withOsDisk(new VirtualMachineScaleSetOSDisk() - .withCaching(CachingTypes.READ_WRITE) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withOsType(OperatingSystemTypes.LINUX) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS)))) - .withNetworkProfile(new VirtualMachineScaleSetNetworkProfile() - .withNetworkInterfaceConfigurations( - Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("vmNameTest") - .withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties() - .withPrimary(true) - .withEnableAcceleratedNetworking(false) - .withIpConfigurations(Arrays.asList(new VirtualMachineScaleSetIPConfiguration() - .withName("vmNameTest") - .withProperties(new VirtualMachineScaleSetIPConfigurationProperties() - .withSubnet(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}")) - .withPrimary(true) - .withLoadBalancerBackendAddressPools( - Arrays.asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}")))))) - .withEnableIPForwarding(true)))) - .withNetworkApiVersion(NetworkApiVersion.fromString("2022-07-01")))) - .withComputeApiVersion("2023-09-01") - .withPlatformFaultDomainCount(1))) - .create(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsDeleteSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsDeleteSamples.java deleted file mode 100644 index 73efc9ffc0b2..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -/** - * Samples for Fleets Delete. - */ -public final class FleetsDeleteSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_Delete.json - */ - /** - * Sample code: Fleets_Delete. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsDelete(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().delete("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsGetByResourceGroupSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsGetByResourceGroupSamples.java deleted file mode 100644 index a4aa2c7df75d..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -/** - * Samples for Fleets GetByResourceGroup. - */ -public final class FleetsGetByResourceGroupSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_Get.json - */ - /** - * Sample code: Fleets_Get. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsGet(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().getByResourceGroupWithResponse("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListByResourceGroupSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListByResourceGroupSamples.java deleted file mode 100644 index 957a3dd4a0c0..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -/** - * Samples for Fleets ListByResourceGroup. - */ -public final class FleetsListByResourceGroupSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_ListByResourceGroup.json - */ - /** - * Sample code: Fleets_ListByResourceGroup. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsListByResourceGroup(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().listByResourceGroup("rgazurefleet", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListSamples.java deleted file mode 100644 index a0d76729af93..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -/** - * Samples for Fleets List. - */ -public final class FleetsListSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_ListBySubscription.json - */ - /** - * Sample code: Fleets_ListBySubscription. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsListBySubscription(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListVirtualMachineScaleSetsSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListVirtualMachineScaleSetsSamples.java deleted file mode 100644 index 5c528de10e58..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsListVirtualMachineScaleSetsSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -/** - * Samples for Fleets ListVirtualMachineScaleSets. - */ -public final class FleetsListVirtualMachineScaleSetsSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_ListVirtualMachineScaleSets.json - */ - /** - * Sample code: Fleets_ListVirtualMachineScaleSets. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void - fleetsListVirtualMachineScaleSets(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.fleets().listVirtualMachineScaleSets("rgazurefleet", "myFleet", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsUpdateSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsUpdateSamples.java deleted file mode 100644 index 16f19869f129..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/FleetsUpdateSamples.java +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -import com.azure.core.management.SubResource; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContent; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentComponentName; -import com.azure.resourcemanager.computefleet.models.AdditionalUnattendContentPassName; -import com.azure.resourcemanager.computefleet.models.ApiEntityReference; -import com.azure.resourcemanager.computefleet.models.ApplicationProfile; -import com.azure.resourcemanager.computefleet.models.BaseVirtualMachineProfile; -import com.azure.resourcemanager.computefleet.models.BootDiagnostics; -import com.azure.resourcemanager.computefleet.models.CachingTypes; -import com.azure.resourcemanager.computefleet.models.CapacityReservationProfile; -import com.azure.resourcemanager.computefleet.models.ComputeProfile; -import com.azure.resourcemanager.computefleet.models.DeleteOptions; -import com.azure.resourcemanager.computefleet.models.DiagnosticsProfile; -import com.azure.resourcemanager.computefleet.models.DiffDiskOptions; -import com.azure.resourcemanager.computefleet.models.DiffDiskPlacement; -import com.azure.resourcemanager.computefleet.models.DiffDiskSettings; -import com.azure.resourcemanager.computefleet.models.DiskControllerTypes; -import com.azure.resourcemanager.computefleet.models.DiskCreateOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskDeleteOptionTypes; -import com.azure.resourcemanager.computefleet.models.DiskEncryptionSetParameters; -import com.azure.resourcemanager.computefleet.models.DomainNameLabelScopeTypes; -import com.azure.resourcemanager.computefleet.models.EncryptionIdentity; -import com.azure.resourcemanager.computefleet.models.EvictionPolicy; -import com.azure.resourcemanager.computefleet.models.Fleet; -import com.azure.resourcemanager.computefleet.models.FleetProperties; -import com.azure.resourcemanager.computefleet.models.IPVersion; -import com.azure.resourcemanager.computefleet.models.ImageReference; -import com.azure.resourcemanager.computefleet.models.KeyVaultSecretReference; -import com.azure.resourcemanager.computefleet.models.LinuxConfiguration; -import com.azure.resourcemanager.computefleet.models.LinuxPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.LinuxPatchSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.LinuxVMGuestPatchMode; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.computefleet.models.ManagedServiceIdentityUpdate; -import com.azure.resourcemanager.computefleet.models.Mode; -import com.azure.resourcemanager.computefleet.models.NetworkApiVersion; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliaryMode; -import com.azure.resourcemanager.computefleet.models.NetworkInterfaceAuxiliarySku; -import com.azure.resourcemanager.computefleet.models.OSImageNotificationProfile; -import com.azure.resourcemanager.computefleet.models.OperatingSystemTypes; -import com.azure.resourcemanager.computefleet.models.PatchSettings; -import com.azure.resourcemanager.computefleet.models.ProtocolTypes; -import com.azure.resourcemanager.computefleet.models.ProxyAgentSettings; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSku; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuName; -import com.azure.resourcemanager.computefleet.models.PublicIPAddressSkuTier; -import com.azure.resourcemanager.computefleet.models.RegularPriorityAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.RegularPriorityProfile; -import com.azure.resourcemanager.computefleet.models.ResourcePlanUpdate; -import com.azure.resourcemanager.computefleet.models.ScheduledEventsProfile; -import com.azure.resourcemanager.computefleet.models.SecurityEncryptionTypes; -import com.azure.resourcemanager.computefleet.models.SecurityPostureReference; -import com.azure.resourcemanager.computefleet.models.SecurityProfile; -import com.azure.resourcemanager.computefleet.models.SecurityTypes; -import com.azure.resourcemanager.computefleet.models.ServiceArtifactReference; -import com.azure.resourcemanager.computefleet.models.SettingNames; -import com.azure.resourcemanager.computefleet.models.SpotAllocationStrategy; -import com.azure.resourcemanager.computefleet.models.SpotPriorityProfile; -import com.azure.resourcemanager.computefleet.models.SshConfiguration; -import com.azure.resourcemanager.computefleet.models.SshPublicKey; -import com.azure.resourcemanager.computefleet.models.StorageAccountTypes; -import com.azure.resourcemanager.computefleet.models.TerminateNotificationProfile; -import com.azure.resourcemanager.computefleet.models.UefiSettings; -import com.azure.resourcemanager.computefleet.models.VMDiskSecurityProfile; -import com.azure.resourcemanager.computefleet.models.VMGalleryApplication; -import com.azure.resourcemanager.computefleet.models.VMSizeProperties; -import com.azure.resourcemanager.computefleet.models.VaultCertificate; -import com.azure.resourcemanager.computefleet.models.VaultSecretGroup; -import com.azure.resourcemanager.computefleet.models.VirtualHardDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetDataDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtension; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetExtensionProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetHardwareProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIPConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetIpTag; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetManagedDiskParameters; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetNetworkProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSDisk; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetOSProfile; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfiguration; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetPublicIPAddressConfigurationProperties; -import com.azure.resourcemanager.computefleet.models.VirtualMachineScaleSetStorageProfile; -import com.azure.resourcemanager.computefleet.models.VmSizeProfile; -import com.azure.resourcemanager.computefleet.models.WinRMConfiguration; -import com.azure.resourcemanager.computefleet.models.WinRMListener; -import com.azure.resourcemanager.computefleet.models.WindowsConfiguration; -import com.azure.resourcemanager.computefleet.models.WindowsPatchAssessmentMode; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformRebootSetting; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchAutomaticByPlatformSettings; -import com.azure.resourcemanager.computefleet.models.WindowsVMGuestPatchMode; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Fleets Update. - */ -public final class FleetsUpdateSamples { - /* - * x-ms-original-file: 2024-11-01/Fleets_Update.json - */ - /** - * Sample code: Fleets_Update. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void fleetsUpdate(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - Fleet resource = manager.fleets() - .getByResourceGroupWithResponse("rgazurefleet", "testFleet", com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withTags(mapOf()) - .withIdentity(new ManagedServiceIdentityUpdate().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withPlan(new ResourcePlanUpdate().withName("jwgrcrnrtfoxn") - .withPublisher("iozjbiqqckqm") - .withProduct("cgopbyvdyqikahwyxfpzwaqk") - .withPromotionCode("fakeTokenPlaceholder") - .withVersion("wa")) - .withProperties(new FleetProperties() - .withSpotPriorityProfile(new SpotPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withMaxPricePerVM(0.00865D) - .withEvictionPolicy(EvictionPolicy.DELETE) - .withAllocationStrategy(SpotAllocationStrategy.PRICE_CAPACITY_OPTIMIZED) - .withMaintain(true)) - .withRegularPriorityProfile(new RegularPriorityProfile().withCapacity(20) - .withMinCapacity(10) - .withAllocationStrategy(RegularPriorityAllocationStrategy.LOWEST_PRICE)) - .withVmSizesProfile(Arrays.asList(new VmSizeProfile().withName("Standard_d1_v2").withRank(19225))) - .withComputeProfile( - new ComputeProfile() - .withBaseVirtualMachineProfile(new BaseVirtualMachineProfile() - .withOsProfile(new VirtualMachineScaleSetOSProfile().withComputerNamePrefix("o") - .withAdminUsername("nrgzqciiaaxjrqldbmjbqkyhntp") - .withAdminPassword("fakeTokenPlaceholder") - .withCustomData("xjjib") - .withWindowsConfiguration(new WindowsConfiguration().withProvisionVMAgent(true) - .withEnableAutomaticUpdates(true) - .withTimeZone("hlyjiqcfksgrpjrct") - .withAdditionalUnattendContent( - Arrays.asList(new AdditionalUnattendContent() - .withPassName(AdditionalUnattendContentPassName.OOBE_SYSTEM) - .withComponentName( - AdditionalUnattendContentComponentName.MICROSOFT_WINDOWS_SHELL_SETUP) - .withSettingName(SettingNames.AUTO_LOGON) - .withContent("bubmqbxjkj"))) - .withPatchSettings(new PatchSettings() - .withPatchMode(WindowsVMGuestPatchMode.MANUAL) - .withEnableHotpatching(true) - .withAssessmentMode(WindowsPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new WindowsVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - WindowsVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withWinRM(new WinRMConfiguration().withListeners(Arrays.asList(new WinRMListener() - .withProtocol(ProtocolTypes.HTTP) - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName")))) - .withEnableVMAgentPlatformUpdates(true)) - .withLinuxConfiguration(new LinuxConfiguration().withDisablePasswordAuthentication(true) - .withSsh(new SshConfiguration().withPublicKeys(Arrays.asList( - new SshPublicKey().withPath("kmqz").withKeyData("fakeTokenPlaceholder")))) - .withProvisionVMAgent(true) - .withPatchSettings(new LinuxPatchSettings() - .withPatchMode(LinuxVMGuestPatchMode.IMAGE_DEFAULT) - .withAssessmentMode(LinuxPatchAssessmentMode.IMAGE_DEFAULT) - .withAutomaticByPlatformSettings( - new LinuxVMGuestPatchAutomaticByPlatformSettings() - .withRebootSetting( - LinuxVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN) - .withBypassPlatformSafetyChecksOnUserSchedule(true))) - .withEnableVMAgentPlatformUpdates(true)) - .withSecrets(Arrays.asList(new VaultSecretGroup() - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")) - .withVaultCertificates(Arrays.asList(new VaultCertificate() - .withCertificateUrl("https://myVaultName.vault.azure.net/secrets/myCertName") - .withCertificateStore("nlxrwavpzhueffxsshlun"))))) - .withAllowExtensionOperations(true) - .withRequireGuestProvisionSignal(true)) - .withStorageProfile(new VirtualMachineScaleSetStorageProfile() - .withImageReference(new ImageReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageName}/versions/{versionName}") - .withPublisher("mqxgwbiyjzmxavhbkd") - .withOffer("isxgumkarlkomp") - .withSku("eojmppqcrnpmxirtp") - .withVersion("wvpcqefgtmqdgltiuz") - .withSharedGalleryImageId("kmkgihoxwlawuuhcinfirktdwkmx") - .withCommunityGalleryImageId("vlqe")) - .withOsDisk(new VirtualMachineScaleSetOSDisk().withName("wfttw") - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiffDiskSettings(new DiffDiskSettings() - .withOption(DiffDiskOptions.LOCAL) - .withPlacement(DiffDiskPlacement.CACHE_DISK)) - .withDiskSizeGB(14) - .withOsType(OperatingSystemTypes.WINDOWS) - .withImage(new VirtualHardDisk().withUri( - "https://myStorageAccountName.blob.core.windows.net/myContainerName/myVhdName.vhd")) - .withVhdContainers(Arrays.asList("tkzcwddtinkfpnfklatw")) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDeleteOption(DiskDeleteOptionTypes.DELETE)) - .withDataDisks(Arrays.asList(new VirtualMachineScaleSetDataDisk() - .withName("eogiykmdmeikswxmigjws") - .withLun(14) - .withCaching(CachingTypes.NONE) - .withWriteAcceleratorEnabled(true) - .withCreateOption(DiskCreateOptionTypes.FROM_IMAGE) - .withDiskSizeGB(6) - .withManagedDisk(new VirtualMachineScaleSetManagedDiskParameters() - .withStorageAccountType(StorageAccountTypes.STANDARD_LRS) - .withDiskEncryptionSet(new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")) - .withSecurityProfile(new VMDiskSecurityProfile() - .withSecurityEncryptionType(SecurityEncryptionTypes.VMGUEST_STATE_ONLY) - .withDiskEncryptionSet( - new DiskEncryptionSetParameters().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}")))) - .withDiskIOPSReadWrite(27L) - .withDiskMBpsReadWrite(2L) - .withDeleteOption(DiskDeleteOptionTypes.DELETE))) - .withDiskControllerType(DiskControllerTypes.fromString("uzb"))) - .withNetworkProfile(new VirtualMachineScaleSetNetworkProfile() - .withHealthProbe(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}")) - .withNetworkInterfaceConfigurations( - Arrays.asList(new VirtualMachineScaleSetNetworkConfiguration().withName("i") - .withProperties(new VirtualMachineScaleSetNetworkConfigurationProperties() - .withPrimary(true) - .withEnableAcceleratedNetworking(true) - .withDisableTcpStateTracking(true) - .withEnableFpga(true) - .withNetworkSecurityGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}")) - .withDnsSettings(new VirtualMachineScaleSetNetworkConfigurationDnsSettings() - .withDnsServers(Arrays.asList("nxmmfolhclsesu"))) - .withIpConfigurations( - Arrays.asList(new VirtualMachineScaleSetIPConfiguration() - .withName("oezqhkidfhyywlfzwuotilrpbqnjg") - .withProperties( - new VirtualMachineScaleSetIPConfigurationProperties() - .withSubnet(new ApiEntityReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}")) - .withPrimary(true) - .withPublicIPAddressConfiguration( - new VirtualMachineScaleSetPublicIPAddressConfiguration() - .withName("fvpqf") - .withProperties( - new VirtualMachineScaleSetPublicIPAddressConfigurationProperties() - .withIdleTimeoutInMinutes(9) - .withDnsSettings( - new VirtualMachineScaleSetPublicIPAddressConfigurationDnsSettings() - .withDomainNameLabel( - "ukrddzvmorpmfsczjwtbvp") - .withDomainNameLabelScope( - DomainNameLabelScopeTypes.TENANT_REUSE)) - .withIpTags(Arrays.asList( - new VirtualMachineScaleSetIpTag() - .withIpTagType("sddgsoemnzgqizale") - .withTag("wufmhrjsakbiaetyara"))) - .withPublicIPPrefix( - new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}")) - .withPublicIPAddressVersion(IPVersion.IPV4) - .withDeleteOption(DeleteOptions.DELETE)) - .withSku(new PublicIPAddressSku() - .withName(PublicIPAddressSkuName.BASIC) - .withTier(PublicIPAddressSkuTier.REGIONAL))) - .withPrivateIPAddressVersion(IPVersion.IPV4) - .withApplicationGatewayBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}"))) - .withApplicationSecurityGroups(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}"))) - .withLoadBalancerBackendAddressPools(Arrays - .asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}"))) - .withLoadBalancerInboundNatPools( - Arrays.asList(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}")))))) - .withEnableIPForwarding(true) - .withDeleteOption(DeleteOptions.DELETE) - .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.NONE) - .withAuxiliarySku(NetworkInterfaceAuxiliarySku.NONE)))) - .withNetworkApiVersion(NetworkApiVersion.V2020_11_01)) - .withSecurityProfile(new SecurityProfile() - .withUefiSettings(new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true)) - .withEncryptionAtHost(true) - .withSecurityType(SecurityTypes.TRUSTED_LAUNCH) - .withEncryptionIdentity(new EncryptionIdentity().withUserAssignedIdentityResourceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{userAssignedIdentityName}")) - .withProxyAgentSettings(new ProxyAgentSettings().withEnabled(true) - .withMode(Mode.AUDIT) - .withKeyIncarnationId(20))) - .withDiagnosticsProfile( - new DiagnosticsProfile().withBootDiagnostics(new BootDiagnostics() - .withEnabled(true) - .withStorageUri("http://myStorageAccountName.blob.core.windows.net"))) - .withExtensionProfile(new VirtualMachineScaleSetExtensionProfile() - .withExtensions(Arrays.asList(new VirtualMachineScaleSetExtension().withName("bndxuxx") - .withProperties(new VirtualMachineScaleSetExtensionProperties() - .withForceUpdateTag("yhgxw") - .withPublisher("kpxtirxjfprhs") - .withType("pgjilctjjwaa") - .withTypeHandlerVersion("zevivcoilxmbwlrihhhibq") - .withAutoUpgradeMinorVersion(true) - .withEnableAutomaticUpgrade(true) - .withSettings(mapOf()) - .withProtectedSettings(mapOf()) - .withProvisionAfterExtensions(Arrays.asList("nftzosroolbcwmpupujzqwqe")) - .withSuppressFailures(true) - .withProtectedSettingsFromKeyVault(new KeyVaultSecretReference() - .withSecretUrl("fakeTokenPlaceholder") - .withSourceVault(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}")))))) - .withExtensionsTimeBudget("mbhjahtdygwgyszdwjtvlvtgchdwil")) - .withLicenseType("v") - .withScheduledEventsProfile(new ScheduledEventsProfile() - .withTerminateNotificationProfile(new TerminateNotificationProfile() - .withNotBeforeTimeout("iljppmmw") - .withEnable(true)) - .withOsImageNotificationProfile( - new OSImageNotificationProfile().withNotBeforeTimeout("olbpadmevekyczfokodtfprxti") - .withEnable(true))) - .withUserData("s") - .withCapacityReservation(new CapacityReservationProfile() - .withCapacityReservationGroup(new SubResource().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}"))) - .withApplicationProfile(new ApplicationProfile().withGalleryApplications( - Arrays.asList(new VMGalleryApplication().withTags("eyrqjbib") - .withOrder(5) - .withPackageReferenceId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{applicationName}/versions/{versionName}") - .withConfigurationReference("ulztmiavpojpbpbddgnuuiimxcpau") - .withTreatFailureAsDeploymentFailure(true) - .withEnableAutomaticUpgrade(true)))) - .withHardwareProfile( - new VirtualMachineScaleSetHardwareProfile().withVmSizeProperties(new VMSizeProperties() - .withVCPUsAvailable(16) - .withVCPUsPerCore(23))) - .withServiceArtifactReference(new ServiceArtifactReference().withId( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/serviceArtifacts/{serviceArtifactsName}/vmArtifactsProfiles/{vmArtifactsProfileName}")) - .withSecurityPostureReference(new SecurityPostureReference().withId( - "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest") - .withExcludeExtensions(Arrays.asList("{securityPostureVMExtensionName}")) - .withIsOverridable(true))) - .withComputeApiVersion("2023-07-01") - .withPlatformFaultDomainCount(1))) - .apply(); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/OperationsListSamples.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/OperationsListSamples.java deleted file mode 100644 index 572367c66ab7..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/samples/java/com/azure/resourcemanager/computefleet/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -/** - * Samples for Operations List. - */ -public final class OperationsListSamples { - /* - * x-ms-original-file: 2024-11-01/Operations_List.json - */ - /** - * Sample code: Operations_List. - * - * @param manager Entry point to ComputeFleetManager. - */ - public static void operationsList(com.azure.resourcemanager.computefleet.ComputeFleetManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/AdditionalCapabilitiesTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/AdditionalCapabilitiesTests.java index ef0c07e17490..93663fc581b9 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/AdditionalCapabilitiesTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/AdditionalCapabilitiesTests.java @@ -13,8 +13,8 @@ public final class AdditionalCapabilitiesTests { public void testDeserialize() throws Exception { AdditionalCapabilities model = BinaryData.fromString("{\"ultraSSDEnabled\":false,\"hibernationEnabled\":false}") .toObject(AdditionalCapabilities.class); - Assertions.assertEquals(false, model.ultraSSDEnabled()); - Assertions.assertEquals(false, model.hibernationEnabled()); + Assertions.assertFalse(model.ultraSSDEnabled()); + Assertions.assertFalse(model.hibernationEnabled()); } @org.junit.jupiter.api.Test @@ -22,7 +22,7 @@ public void testSerialize() throws Exception { AdditionalCapabilities model = new AdditionalCapabilities().withUltraSSDEnabled(false).withHibernationEnabled(false); model = BinaryData.fromObject(model).toObject(AdditionalCapabilities.class); - Assertions.assertEquals(false, model.ultraSSDEnabled()); - Assertions.assertEquals(false, model.hibernationEnabled()); + Assertions.assertFalse(model.ultraSSDEnabled()); + Assertions.assertFalse(model.hibernationEnabled()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ApplicationProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ApplicationProfileTests.java index 9d35b1674e13..d00bcfc94fd2 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ApplicationProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ApplicationProfileTests.java @@ -20,8 +20,8 @@ public void testDeserialize() throws Exception { Assertions.assertEquals(741975656, model.galleryApplications().get(0).order()); Assertions.assertEquals("veual", model.galleryApplications().get(0).packageReferenceId()); Assertions.assertEquals("j", model.galleryApplications().get(0).configurationReference()); - Assertions.assertEquals(true, model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); - Assertions.assertEquals(true, model.galleryApplications().get(0).enableAutomaticUpgrade()); + Assertions.assertTrue(model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); + Assertions.assertTrue(model.galleryApplications().get(0).enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test @@ -50,7 +50,7 @@ public void testSerialize() throws Exception { Assertions.assertEquals(741975656, model.galleryApplications().get(0).order()); Assertions.assertEquals("veual", model.galleryApplications().get(0).packageReferenceId()); Assertions.assertEquals("j", model.galleryApplications().get(0).configurationReference()); - Assertions.assertEquals(true, model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); - Assertions.assertEquals(true, model.galleryApplications().get(0).enableAutomaticUpgrade()); + Assertions.assertTrue(model.galleryApplications().get(0).treatFailureAsDeploymentFailure()); + Assertions.assertTrue(model.galleryApplications().get(0).enableAutomaticUpgrade()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/BootDiagnosticsTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/BootDiagnosticsTests.java index 6eb4c99f925a..0475c58f05f4 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/BootDiagnosticsTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/BootDiagnosticsTests.java @@ -13,7 +13,7 @@ public final class BootDiagnosticsTests { public void testDeserialize() throws Exception { BootDiagnostics model = BinaryData.fromString("{\"enabled\":false,\"storageUri\":\"ykvceoveil\"}") .toObject(BootDiagnostics.class); - Assertions.assertEquals(false, model.enabled()); + Assertions.assertFalse(model.enabled()); Assertions.assertEquals("ykvceoveil", model.storageUri()); } @@ -21,7 +21,7 @@ public void testDeserialize() throws Exception { public void testSerialize() throws Exception { BootDiagnostics model = new BootDiagnostics().withEnabled(false).withStorageUri("ykvceoveil"); model = BinaryData.fromObject(model).toObject(BootDiagnostics.class); - Assertions.assertEquals(false, model.enabled()); + Assertions.assertFalse(model.enabled()); Assertions.assertEquals("ykvceoveil", model.storageUri()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/DiagnosticsProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/DiagnosticsProfileTests.java index 6a41d3e674f0..467bd0a377d7 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/DiagnosticsProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/DiagnosticsProfileTests.java @@ -15,7 +15,7 @@ public void testDeserialize() throws Exception { DiagnosticsProfile model = BinaryData.fromString("{\"bootDiagnostics\":{\"enabled\":true,\"storageUri\":\"xotogtwrupqsxv\"}}") .toObject(DiagnosticsProfile.class); - Assertions.assertEquals(true, model.bootDiagnostics().enabled()); + Assertions.assertTrue(model.bootDiagnostics().enabled()); Assertions.assertEquals("xotogtwrupqsxv", model.bootDiagnostics().storageUri()); } @@ -24,7 +24,7 @@ public void testSerialize() throws Exception { DiagnosticsProfile model = new DiagnosticsProfile() .withBootDiagnostics(new BootDiagnostics().withEnabled(true).withStorageUri("xotogtwrupqsxv")); model = BinaryData.fromObject(model).toObject(DiagnosticsProfile.class); - Assertions.assertEquals(true, model.bootDiagnostics().enabled()); + Assertions.assertTrue(model.bootDiagnostics().enabled()); Assertions.assertEquals("xotogtwrupqsxv", model.bootDiagnostics().storageUri()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxPatchSettingsTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxPatchSettingsTests.java index 89654c30d586..00157f1bd19b 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxPatchSettingsTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxPatchSettingsTests.java @@ -22,7 +22,7 @@ public void testDeserialize() throws Exception { Assertions.assertEquals(LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertEquals(true, model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); } @org.junit.jupiter.api.Test @@ -37,6 +37,6 @@ public void testSerialize() throws Exception { Assertions.assertEquals(LinuxPatchAssessmentMode.AUTOMATIC_BY_PLATFORM, model.assessmentMode()); Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertEquals(true, model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertTrue(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java index 93baef0a6058..c2bb582e75ba 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/LinuxVMGuestPatchAutomaticByPlatformSettingsTests.java @@ -16,7 +16,7 @@ public void testDeserialize() throws Exception { = BinaryData.fromString("{\"rebootSetting\":\"Always\",\"bypassPlatformSafetyChecksOnUserSchedule\":false}") .toObject(LinuxVMGuestPatchAutomaticByPlatformSettings.class); Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, model.rebootSetting()); - Assertions.assertEquals(false, model.bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); } @org.junit.jupiter.api.Test @@ -26,6 +26,6 @@ public void testSerialize() throws Exception { .withBypassPlatformSafetyChecksOnUserSchedule(false); model = BinaryData.fromObject(model).toObject(LinuxVMGuestPatchAutomaticByPlatformSettings.class); Assertions.assertEquals(LinuxVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, model.rebootSetting()); - Assertions.assertEquals(false, model.bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityTests.java index bdb287215157..80c8ee22abda 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"nnprn\",\"tenantId\":\"peilpjzuaejxdu\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"uh\":{\"clientId\":\"bbtdzumvee\",\"principalId\":\"pwo\"},\"waboe\":{\"clientId\":\"p\",\"principalId\":\"jyofdxluusdtto\"}}}") + "{\"principalId\":\"nnprn\",\"tenantId\":\"peilpjzuaejxdu\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"uh\":{\"principalId\":\"bbtdzumvee\",\"clientId\":\"pwo\"},\"waboe\":{\"principalId\":\"p\",\"clientId\":\"jyofdxluusdtto\"}}}") .toObject(ManagedServiceIdentity.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityUpdateTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityUpdateTests.java index 01908bc43435..75f2e1a7dab1 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityUpdateTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ManagedServiceIdentityUpdateTests.java @@ -16,7 +16,7 @@ public final class ManagedServiceIdentityUpdateTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ManagedServiceIdentityUpdate model = BinaryData.fromString( - "{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mcbxvwvxysl\":{\"clientId\":\"ivetvtcq\",\"principalId\":\"tdo\"},\"wwfbkrvrnsvshq\":{\"clientId\":\"hsfxoblytkb\",\"principalId\":\"pe\"}}}") + "{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"mcbxvwvxysl\":{\"principalId\":\"ivetvtcq\",\"clientId\":\"tdo\"},\"wwfbkrvrnsvshq\":{\"principalId\":\"hsfxoblytkb\",\"clientId\":\"pe\"}}}") .toObject(ManagedServiceIdentityUpdate.class); Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type()); } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OSImageNotificationProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OSImageNotificationProfileTests.java index d051d70c6a37..1e467098e5dc 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OSImageNotificationProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OSImageNotificationProfileTests.java @@ -14,7 +14,7 @@ public void testDeserialize() throws Exception { OSImageNotificationProfile model = BinaryData.fromString("{\"notBeforeTimeout\":\"h\",\"enable\":false}") .toObject(OSImageNotificationProfile.class); Assertions.assertEquals("h", model.notBeforeTimeout()); - Assertions.assertEquals(false, model.enable()); + Assertions.assertFalse(model.enable()); } @org.junit.jupiter.api.Test @@ -22,6 +22,6 @@ public void testSerialize() throws Exception { OSImageNotificationProfile model = new OSImageNotificationProfile().withNotBeforeTimeout("h").withEnable(false); model = BinaryData.fromObject(model).toObject(OSImageNotificationProfile.class); Assertions.assertEquals("h", model.notBeforeTimeout()); - Assertions.assertEquals(false, model.enable()); + Assertions.assertFalse(model.enable()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OperationsListMockTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OperationsListMockTests.java deleted file mode 100644 index 929f62c68c9a..000000000000 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/OperationsListMockTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) TypeSpec Code Generator. - -package com.azure.resourcemanager.computefleet.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.computefleet.ComputeFleetManager; -import com.azure.resourcemanager.computefleet.models.Operation; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"cjwvn\",\"isDataAction\":false,\"display\":{\"provider\":\"mgxcxrslpm\",\"resource\":\"wuoegrpk\",\"operation\":\"wniyqsluicpd\",\"description\":\"kzzlvmbmpaxmodf\"},\"origin\":\"system\",\"actionType\":\"Internal\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ComputeFleetManager manager = ComputeFleetManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/PatchSettingsTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/PatchSettingsTests.java index 88026292c746..565e798bf0ec 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/PatchSettingsTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/PatchSettingsTests.java @@ -19,11 +19,11 @@ public void testDeserialize() throws Exception { "{\"patchMode\":\"AutomaticByOS\",\"enableHotpatching\":true,\"assessmentMode\":\"ImageDefault\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Unknown\",\"bypassPlatformSafetyChecksOnUserSchedule\":false}}") .toObject(PatchSettings.class); Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_OS, model.patchMode()); - Assertions.assertEquals(true, model.enableHotpatching()); + Assertions.assertTrue(model.enableHotpatching()); Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.assessmentMode()); Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN, model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertEquals(false, model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertFalse(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); } @org.junit.jupiter.api.Test @@ -36,10 +36,10 @@ public void testSerialize() throws Exception { .withBypassPlatformSafetyChecksOnUserSchedule(false)); model = BinaryData.fromObject(model).toObject(PatchSettings.class); Assertions.assertEquals(WindowsVMGuestPatchMode.AUTOMATIC_BY_OS, model.patchMode()); - Assertions.assertEquals(true, model.enableHotpatching()); + Assertions.assertTrue(model.enableHotpatching()); Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.assessmentMode()); Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.UNKNOWN, model.automaticByPlatformSettings().rebootSetting()); - Assertions.assertEquals(false, model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertFalse(model.automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ScheduledEventsProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ScheduledEventsProfileTests.java index 63193bd284c3..25c6b48cc162 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ScheduledEventsProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/ScheduledEventsProfileTests.java @@ -17,9 +17,9 @@ public void testDeserialize() throws Exception { "{\"terminateNotificationProfile\":{\"notBeforeTimeout\":\"qwgxhniskx\",\"enable\":true},\"osImageNotificationProfile\":{\"notBeforeTimeout\":\"cg\",\"enable\":false}}") .toObject(ScheduledEventsProfile.class); Assertions.assertEquals("qwgxhniskx", model.terminateNotificationProfile().notBeforeTimeout()); - Assertions.assertEquals(true, model.terminateNotificationProfile().enable()); + Assertions.assertTrue(model.terminateNotificationProfile().enable()); Assertions.assertEquals("cg", model.osImageNotificationProfile().notBeforeTimeout()); - Assertions.assertEquals(false, model.osImageNotificationProfile().enable()); + Assertions.assertFalse(model.osImageNotificationProfile().enable()); } @org.junit.jupiter.api.Test @@ -31,8 +31,8 @@ public void testSerialize() throws Exception { new OSImageNotificationProfile().withNotBeforeTimeout("cg").withEnable(false)); model = BinaryData.fromObject(model).toObject(ScheduledEventsProfile.class); Assertions.assertEquals("qwgxhniskx", model.terminateNotificationProfile().notBeforeTimeout()); - Assertions.assertEquals(true, model.terminateNotificationProfile().enable()); + Assertions.assertTrue(model.terminateNotificationProfile().enable()); Assertions.assertEquals("cg", model.osImageNotificationProfile().notBeforeTimeout()); - Assertions.assertEquals(false, model.osImageNotificationProfile().enable()); + Assertions.assertFalse(model.osImageNotificationProfile().enable()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SecurityPostureReferenceTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SecurityPostureReferenceTests.java index 5949f8e0f036..645d503f3caa 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SecurityPostureReferenceTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SecurityPostureReferenceTests.java @@ -17,7 +17,7 @@ public void testDeserialize() throws Exception { .toObject(SecurityPostureReference.class); Assertions.assertEquals("ah", model.id()); Assertions.assertEquals("y", model.excludeExtensions().get(0)); - Assertions.assertEquals(true, model.isOverridable()); + Assertions.assertTrue(model.isOverridable()); } @org.junit.jupiter.api.Test @@ -28,6 +28,6 @@ public void testSerialize() throws Exception { model = BinaryData.fromObject(model).toObject(SecurityPostureReference.class); Assertions.assertEquals("ah", model.id()); Assertions.assertEquals("y", model.excludeExtensions().get(0)); - Assertions.assertEquals(true, model.isOverridable()); + Assertions.assertTrue(model.isOverridable()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SpotPriorityProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SpotPriorityProfileTests.java index 7ecbcd31d8d6..d73339d263ce 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SpotPriorityProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/SpotPriorityProfileTests.java @@ -21,7 +21,7 @@ public void testDeserialize() throws Exception { Assertions.assertEquals(63.71141995389771D, model.maxPricePerVM()); Assertions.assertEquals(EvictionPolicy.DEALLOCATE, model.evictionPolicy()); Assertions.assertEquals(SpotAllocationStrategy.LOWEST_PRICE, model.allocationStrategy()); - Assertions.assertEquals(true, model.maintain()); + Assertions.assertTrue(model.maintain()); } @org.junit.jupiter.api.Test @@ -38,6 +38,6 @@ public void testSerialize() throws Exception { Assertions.assertEquals(63.71141995389771D, model.maxPricePerVM()); Assertions.assertEquals(EvictionPolicy.DEALLOCATE, model.evictionPolicy()); Assertions.assertEquals(SpotAllocationStrategy.LOWEST_PRICE, model.allocationStrategy()); - Assertions.assertEquals(true, model.maintain()); + Assertions.assertTrue(model.maintain()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/TerminateNotificationProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/TerminateNotificationProfileTests.java index df7fac0172ef..163c3a1dc7cc 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/TerminateNotificationProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/TerminateNotificationProfileTests.java @@ -15,7 +15,7 @@ public void testDeserialize() throws Exception { = BinaryData.fromString("{\"notBeforeTimeout\":\"dnhjdauwhvylw\",\"enable\":true}") .toObject(TerminateNotificationProfile.class); Assertions.assertEquals("dnhjdauwhvylw", model.notBeforeTimeout()); - Assertions.assertEquals(true, model.enable()); + Assertions.assertTrue(model.enable()); } @org.junit.jupiter.api.Test @@ -24,6 +24,6 @@ public void testSerialize() throws Exception { = new TerminateNotificationProfile().withNotBeforeTimeout("dnhjdauwhvylw").withEnable(true); model = BinaryData.fromObject(model).toObject(TerminateNotificationProfile.class); Assertions.assertEquals("dnhjdauwhvylw", model.notBeforeTimeout()); - Assertions.assertEquals(true, model.enable()); + Assertions.assertTrue(model.enable()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UefiSettingsTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UefiSettingsTests.java index 4032ab18bb86..180d1ad9d7a6 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UefiSettingsTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UefiSettingsTests.java @@ -13,15 +13,15 @@ public final class UefiSettingsTests { public void testDeserialize() throws Exception { UefiSettings model = BinaryData.fromString("{\"secureBootEnabled\":true,\"vTpmEnabled\":true}").toObject(UefiSettings.class); - Assertions.assertEquals(true, model.secureBootEnabled()); - Assertions.assertEquals(true, model.vTpmEnabled()); + Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertTrue(model.vTpmEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { UefiSettings model = new UefiSettings().withSecureBootEnabled(true).withVTpmEnabled(true); model = BinaryData.fromObject(model).toObject(UefiSettings.class); - Assertions.assertEquals(true, model.secureBootEnabled()); - Assertions.assertEquals(true, model.vTpmEnabled()); + Assertions.assertTrue(model.secureBootEnabled()); + Assertions.assertTrue(model.vTpmEnabled()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UserAssignedIdentityTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UserAssignedIdentityTests.java index c01a99d3d970..ba8193aa04b8 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UserAssignedIdentityTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/UserAssignedIdentityTests.java @@ -10,7 +10,7 @@ public final class UserAssignedIdentityTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString("{\"clientId\":\"v\",\"principalId\":\"lns\"}") + UserAssignedIdentity model = BinaryData.fromString("{\"principalId\":\"v\",\"clientId\":\"lns\"}") .toObject(UserAssignedIdentity.class); } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VMGalleryApplicationTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VMGalleryApplicationTests.java index fa803347c34e..6f548cc10143 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VMGalleryApplicationTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VMGalleryApplicationTests.java @@ -18,8 +18,8 @@ public void testDeserialize() throws Exception { Assertions.assertEquals(1220568259, model.order()); Assertions.assertEquals("tguvriuhp", model.packageReferenceId()); Assertions.assertEquals("mdyvxqtayriw", model.configurationReference()); - Assertions.assertEquals(false, model.treatFailureAsDeploymentFailure()); - Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); + Assertions.assertFalse(model.enableAutomaticUpgrade()); } @org.junit.jupiter.api.Test @@ -35,7 +35,7 @@ public void testSerialize() throws Exception { Assertions.assertEquals(1220568259, model.order()); Assertions.assertEquals("tguvriuhp", model.packageReferenceId()); Assertions.assertEquals("mdyvxqtayriw", model.configurationReference()); - Assertions.assertEquals(false, model.treatFailureAsDeploymentFailure()); - Assertions.assertEquals(false, model.enableAutomaticUpgrade()); + Assertions.assertFalse(model.treatFailureAsDeploymentFailure()); + Assertions.assertFalse(model.enableAutomaticUpgrade()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetDataDiskTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetDataDiskTests.java index dbc7d3084459..ba02d26c2875 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetDataDiskTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetDataDiskTests.java @@ -25,7 +25,7 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("hcbonqvpkvlr", model.name()); Assertions.assertEquals(1945684802, model.lun()); Assertions.assertEquals(CachingTypes.NONE, model.caching()); - Assertions.assertEquals(false, model.writeAcceleratorEnabled()); + Assertions.assertFalse(model.writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.ATTACH, model.createOption()); Assertions.assertEquals(625674029, model.diskSizeGB()); Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.managedDisk().storageAccountType()); @@ -60,7 +60,7 @@ public void testSerialize() throws Exception { Assertions.assertEquals("hcbonqvpkvlr", model.name()); Assertions.assertEquals(1945684802, model.lun()); Assertions.assertEquals(CachingTypes.NONE, model.caching()); - Assertions.assertEquals(false, model.writeAcceleratorEnabled()); + Assertions.assertFalse(model.writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.ATTACH, model.createOption()); Assertions.assertEquals(625674029, model.diskSizeGB()); Assertions.assertEquals(StorageAccountTypes.PREMIUM_LRS, model.managedDisk().storageAccountType()); diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationPropertiesTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationPropertiesTests.java index f91510c52692..b198eaf4c5b7 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationPropertiesTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationPropertiesTests.java @@ -28,7 +28,7 @@ public void testDeserialize() throws Exception { "{\"subnet\":{\"id\":\"mpukgriw\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"fbxzpuzycisp\",\"properties\":{\"idleTimeoutInMinutes\":2071345899,\"dnsSettings\":{\"domainNameLabel\":\"mgkbrpyydhibn\",\"domainNameLabelScope\":\"NoReuse\"},\"ipTags\":[{\"ipTagType\":\"kadrgvt\",\"tag\":\"gnbuy\"},{\"ipTagType\":\"ijggmebfsiar\",\"tag\":\"trcvpnazzmh\"}],\"publicIPPrefix\":{\"id\":\"nmpxttdb\"},\"publicIPAddressVersion\":\"IPv6\",\"deleteOption\":\"Delete\"},\"sku\":{\"name\":\"Basic\",\"tier\":\"Global\"}},\"privateIPAddressVersion\":\"IPv6\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"henbtkcxywnytn\"}],\"applicationSecurityGroups\":[{\"id\":\"lqidyby\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"clha\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"abphlw\"},{\"id\":\"lfktsths\"}]}") .toObject(VirtualMachineScaleSetIPConfigurationProperties.class); Assertions.assertEquals("mpukgriw", model.subnet().id()); - Assertions.assertEquals(true, model.primary()); + Assertions.assertTrue(model.primary()); Assertions.assertEquals("fbxzpuzycisp", model.publicIPAddressConfiguration().name()); Assertions.assertEquals(2071345899, model.publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); Assertions.assertEquals("mgkbrpyydhibn", @@ -80,7 +80,7 @@ public void testSerialize() throws Exception { Arrays.asList(new SubResource().withId("abphlw"), new SubResource().withId("lfktsths"))); model = BinaryData.fromObject(model).toObject(VirtualMachineScaleSetIPConfigurationProperties.class); Assertions.assertEquals("mpukgriw", model.subnet().id()); - Assertions.assertEquals(true, model.primary()); + Assertions.assertTrue(model.primary()); Assertions.assertEquals("fbxzpuzycisp", model.publicIPAddressConfiguration().name()); Assertions.assertEquals(2071345899, model.publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); Assertions.assertEquals("mgkbrpyydhibn", diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationTests.java index 997d8ea069a6..73508f5f7834 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetIPConfigurationTests.java @@ -30,7 +30,7 @@ public void testDeserialize() throws Exception { .toObject(VirtualMachineScaleSetIPConfiguration.class); Assertions.assertEquals("hheunmmqhgyx", model.name()); Assertions.assertEquals("ocukoklyax", model.properties().subnet().id()); - Assertions.assertEquals(false, model.properties().primary()); + Assertions.assertFalse(model.properties().primary()); Assertions.assertEquals("uqszfk", model.properties().publicIPAddressConfiguration().name()); Assertions.assertEquals(868316225, model.properties().publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); @@ -92,7 +92,7 @@ public void testSerialize() throws Exception { model = BinaryData.fromObject(model).toObject(VirtualMachineScaleSetIPConfiguration.class); Assertions.assertEquals("hheunmmqhgyx", model.name()); Assertions.assertEquals("ocukoklyax", model.properties().subnet().id()); - Assertions.assertEquals(false, model.properties().primary()); + Assertions.assertFalse(model.properties().primary()); Assertions.assertEquals("uqszfk", model.properties().publicIPAddressConfiguration().name()); Assertions.assertEquals(868316225, model.properties().publicIPAddressConfiguration().properties().idleTimeoutInMinutes()); diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationPropertiesTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationPropertiesTests.java index c40584552439..28de0907154d 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationPropertiesTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationPropertiesTests.java @@ -31,15 +31,15 @@ public void testDeserialize() throws Exception { VirtualMachineScaleSetNetworkConfigurationProperties model = BinaryData.fromString( "{\"primary\":false,\"enableAcceleratedNetworking\":false,\"disableTcpStateTracking\":false,\"enableFpga\":false,\"networkSecurityGroup\":{\"id\":\"fbuhfmvfaxkffe\"},\"dnsSettings\":{\"dnsServers\":[\"lvmezyvshxmzsbbz\"]},\"ipConfigurations\":[{\"name\":\"gigr\",\"properties\":{\"subnet\":{\"id\":\"rvjx\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"pydptko\",\"properties\":{\"idleTimeoutInMinutes\":368872056,\"dnsSettings\":{\"domainNameLabel\":\"knvudwtiukb\"},\"ipTags\":[{},{},{}],\"publicIPPrefix\":{},\"publicIPAddressVersion\":\"IPv6\",\"deleteOption\":\"Detach\"},\"sku\":{\"name\":\"Standard\",\"tier\":\"Global\"}},\"privateIPAddressVersion\":\"IPv4\",\"applicationGatewayBackendAddressPools\":[{\"id\":\"kgjn\"},{\"id\":\"ucgygevqz\"},{\"id\":\"yp\"},{\"id\":\"bpizcdrqjsdpydn\"}],\"applicationSecurityGroups\":[{\"id\":\"de\"},{\"id\":\"jzicwifsjt\"}],\"loadBalancerBackendAddressPools\":[{\"id\":\"bishcbkhajdeyea\"},{\"id\":\"p\"},{\"id\":\"g\"}],\"loadBalancerInboundNatPools\":[{\"id\":\"uxwgipwho\"},{\"id\":\"wkgshwa\"},{\"id\":\"ixzbinjeputtmryw\"}]}}],\"enableIPForwarding\":true,\"deleteOption\":\"Delete\",\"auxiliaryMode\":\"AcceleratedConnections\",\"auxiliarySku\":\"A8\"}") .toObject(VirtualMachineScaleSetNetworkConfigurationProperties.class); - Assertions.assertEquals(false, model.primary()); - Assertions.assertEquals(false, model.enableAcceleratedNetworking()); - Assertions.assertEquals(false, model.disableTcpStateTracking()); - Assertions.assertEquals(false, model.enableFpga()); + Assertions.assertFalse(model.primary()); + Assertions.assertFalse(model.enableAcceleratedNetworking()); + Assertions.assertFalse(model.disableTcpStateTracking()); + Assertions.assertFalse(model.enableFpga()); Assertions.assertEquals("fbuhfmvfaxkffe", model.networkSecurityGroup().id()); Assertions.assertEquals("lvmezyvshxmzsbbz", model.dnsSettings().dnsServers().get(0)); Assertions.assertEquals("gigr", model.ipConfigurations().get(0).name()); Assertions.assertEquals("rvjx", model.ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertEquals(true, model.ipConfigurations().get(0).properties().primary()); + Assertions.assertTrue(model.ipConfigurations().get(0).properties().primary()); Assertions.assertEquals("pydptko", model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); Assertions.assertEquals(368872056, @@ -79,7 +79,7 @@ public void testDeserialize() throws Exception { model.ipConfigurations().get(0).properties().loadBalancerBackendAddressPools().get(0).id()); Assertions.assertEquals("uxwgipwho", model.ipConfigurations().get(0).properties().loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals(true, model.enableIPForwarding()); + Assertions.assertTrue(model.enableIPForwarding()); Assertions.assertEquals(DeleteOptions.DELETE, model.deleteOption()); Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.ACCELERATED_CONNECTIONS, model.auxiliaryMode()); Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A8, model.auxiliarySku()); @@ -129,15 +129,15 @@ public void testSerialize() throws Exception { .withAuxiliaryMode(NetworkInterfaceAuxiliaryMode.ACCELERATED_CONNECTIONS) .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A8); model = BinaryData.fromObject(model).toObject(VirtualMachineScaleSetNetworkConfigurationProperties.class); - Assertions.assertEquals(false, model.primary()); - Assertions.assertEquals(false, model.enableAcceleratedNetworking()); - Assertions.assertEquals(false, model.disableTcpStateTracking()); - Assertions.assertEquals(false, model.enableFpga()); + Assertions.assertFalse(model.primary()); + Assertions.assertFalse(model.enableAcceleratedNetworking()); + Assertions.assertFalse(model.disableTcpStateTracking()); + Assertions.assertFalse(model.enableFpga()); Assertions.assertEquals("fbuhfmvfaxkffe", model.networkSecurityGroup().id()); Assertions.assertEquals("lvmezyvshxmzsbbz", model.dnsSettings().dnsServers().get(0)); Assertions.assertEquals("gigr", model.ipConfigurations().get(0).name()); Assertions.assertEquals("rvjx", model.ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertEquals(true, model.ipConfigurations().get(0).properties().primary()); + Assertions.assertTrue(model.ipConfigurations().get(0).properties().primary()); Assertions.assertEquals("pydptko", model.ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); Assertions.assertEquals(368872056, @@ -177,7 +177,7 @@ public void testSerialize() throws Exception { model.ipConfigurations().get(0).properties().loadBalancerBackendAddressPools().get(0).id()); Assertions.assertEquals("uxwgipwho", model.ipConfigurations().get(0).properties().loadBalancerInboundNatPools().get(0).id()); - Assertions.assertEquals(true, model.enableIPForwarding()); + Assertions.assertTrue(model.enableIPForwarding()); Assertions.assertEquals(DeleteOptions.DELETE, model.deleteOption()); Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.ACCELERATED_CONNECTIONS, model.auxiliaryMode()); Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A8, model.auxiliarySku()); diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationTests.java index e3da7f4149f8..7bb4b64265af 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkConfigurationTests.java @@ -29,20 +29,20 @@ public void testDeserialize() throws Exception { "{\"name\":\"dystkiiuxhqyud\",\"properties\":{\"primary\":false,\"enableAcceleratedNetworking\":true,\"disableTcpStateTracking\":true,\"enableFpga\":false,\"networkSecurityGroup\":{\"id\":\"yifqrvkdvjsllrmv\"},\"dnsSettings\":{\"dnsServers\":[\"atkpnp\",\"lexxbczwtru\",\"iqzbq\",\"vsovmyokac\"]},\"ipConfigurations\":[{\"name\":\"kwlhzdo\",\"properties\":{\"subnet\":{\"id\":\"mflbv\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"rkcciwwzjuqk\",\"properties\":{},\"sku\":{}},\"privateIPAddressVersion\":\"IPv6\",\"applicationGatewayBackendAddressPools\":[{},{},{},{}],\"applicationSecurityGroups\":[{}],\"loadBalancerBackendAddressPools\":[{},{},{},{}],\"loadBalancerInboundNatPools\":[{},{},{}]}},{\"name\":\"kg\",\"properties\":{\"subnet\":{\"id\":\"uimjmvx\"},\"primary\":true,\"publicIPAddressConfiguration\":{\"name\":\"ugidyjrr\",\"properties\":{},\"sku\":{}},\"privateIPAddressVersion\":\"IPv6\",\"applicationGatewayBackendAddressPools\":[{}],\"applicationSecurityGroups\":[{}],\"loadBalancerBackendAddressPools\":[{},{},{}],\"loadBalancerInboundNatPools\":[{}]}}],\"enableIPForwarding\":true,\"deleteOption\":\"Detach\",\"auxiliaryMode\":\"None\",\"auxiliarySku\":\"A2\"}}") .toObject(VirtualMachineScaleSetNetworkConfiguration.class); Assertions.assertEquals("dystkiiuxhqyud", model.name()); - Assertions.assertEquals(false, model.properties().primary()); - Assertions.assertEquals(true, model.properties().enableAcceleratedNetworking()); - Assertions.assertEquals(true, model.properties().disableTcpStateTracking()); - Assertions.assertEquals(false, model.properties().enableFpga()); + Assertions.assertFalse(model.properties().primary()); + Assertions.assertTrue(model.properties().enableAcceleratedNetworking()); + Assertions.assertTrue(model.properties().disableTcpStateTracking()); + Assertions.assertFalse(model.properties().enableFpga()); Assertions.assertEquals("yifqrvkdvjsllrmv", model.properties().networkSecurityGroup().id()); Assertions.assertEquals("atkpnp", model.properties().dnsSettings().dnsServers().get(0)); Assertions.assertEquals("kwlhzdo", model.properties().ipConfigurations().get(0).name()); Assertions.assertEquals("mflbv", model.properties().ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertEquals(true, model.properties().ipConfigurations().get(0).properties().primary()); + Assertions.assertTrue(model.properties().ipConfigurations().get(0).properties().primary()); Assertions.assertEquals("rkcciwwzjuqk", model.properties().ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); Assertions.assertEquals(IPVersion.IPV6, model.properties().ipConfigurations().get(0).properties().privateIPAddressVersion()); - Assertions.assertEquals(true, model.properties().enableIPForwarding()); + Assertions.assertTrue(model.properties().enableIPForwarding()); Assertions.assertEquals(DeleteOptions.DETACH, model.properties().deleteOption()); Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.NONE, model.properties().auxiliaryMode()); Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A2, model.properties().auxiliarySku()); @@ -98,20 +98,20 @@ public void testSerialize() throws Exception { .withAuxiliarySku(NetworkInterfaceAuxiliarySku.A2)); model = BinaryData.fromObject(model).toObject(VirtualMachineScaleSetNetworkConfiguration.class); Assertions.assertEquals("dystkiiuxhqyud", model.name()); - Assertions.assertEquals(false, model.properties().primary()); - Assertions.assertEquals(true, model.properties().enableAcceleratedNetworking()); - Assertions.assertEquals(true, model.properties().disableTcpStateTracking()); - Assertions.assertEquals(false, model.properties().enableFpga()); + Assertions.assertFalse(model.properties().primary()); + Assertions.assertTrue(model.properties().enableAcceleratedNetworking()); + Assertions.assertTrue(model.properties().disableTcpStateTracking()); + Assertions.assertFalse(model.properties().enableFpga()); Assertions.assertEquals("yifqrvkdvjsllrmv", model.properties().networkSecurityGroup().id()); Assertions.assertEquals("atkpnp", model.properties().dnsSettings().dnsServers().get(0)); Assertions.assertEquals("kwlhzdo", model.properties().ipConfigurations().get(0).name()); Assertions.assertEquals("mflbv", model.properties().ipConfigurations().get(0).properties().subnet().id()); - Assertions.assertEquals(true, model.properties().ipConfigurations().get(0).properties().primary()); + Assertions.assertTrue(model.properties().ipConfigurations().get(0).properties().primary()); Assertions.assertEquals("rkcciwwzjuqk", model.properties().ipConfigurations().get(0).properties().publicIPAddressConfiguration().name()); Assertions.assertEquals(IPVersion.IPV6, model.properties().ipConfigurations().get(0).properties().privateIPAddressVersion()); - Assertions.assertEquals(true, model.properties().enableIPForwarding()); + Assertions.assertTrue(model.properties().enableIPForwarding()); Assertions.assertEquals(DeleteOptions.DETACH, model.properties().deleteOption()); Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.NONE, model.properties().auxiliaryMode()); Assertions.assertEquals(NetworkInterfaceAuxiliarySku.A2, model.properties().auxiliarySku()); diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkProfileTests.java index 1ac2dd948f6a..521b6c146696 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetNetworkProfileTests.java @@ -28,19 +28,17 @@ public void testDeserialize() throws Exception { .toObject(VirtualMachineScaleSetNetworkProfile.class); Assertions.assertEquals("lhbxxhejjzzvdud", model.healthProbe().id()); Assertions.assertEquals("slfhotwm", model.networkInterfaceConfigurations().get(0).name()); - Assertions.assertEquals(false, model.networkInterfaceConfigurations().get(0).properties().primary()); - Assertions.assertEquals(true, - model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); - Assertions.assertEquals(false, - model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); - Assertions.assertEquals(true, model.networkInterfaceConfigurations().get(0).properties().enableFpga()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().primary()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableFpga()); Assertions.assertEquals("cftadeh", model.networkInterfaceConfigurations().get(0).properties().networkSecurityGroup().id()); Assertions.assertEquals("yfsoppu", model.networkInterfaceConfigurations().get(0).properties().dnsSettings().dnsServers().get(0)); Assertions.assertEquals("dnvowg", model.networkInterfaceConfigurations().get(0).properties().ipConfigurations().get(0).name()); - Assertions.assertEquals(true, model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); Assertions.assertEquals(DeleteOptions.DELETE, model.networkInterfaceConfigurations().get(0).properties().deleteOption()); Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, @@ -116,19 +114,17 @@ public void testSerialize() throws Exception { model = BinaryData.fromObject(model).toObject(VirtualMachineScaleSetNetworkProfile.class); Assertions.assertEquals("lhbxxhejjzzvdud", model.healthProbe().id()); Assertions.assertEquals("slfhotwm", model.networkInterfaceConfigurations().get(0).name()); - Assertions.assertEquals(false, model.networkInterfaceConfigurations().get(0).properties().primary()); - Assertions.assertEquals(true, - model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); - Assertions.assertEquals(false, - model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); - Assertions.assertEquals(true, model.networkInterfaceConfigurations().get(0).properties().enableFpga()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().primary()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableAcceleratedNetworking()); + Assertions.assertFalse(model.networkInterfaceConfigurations().get(0).properties().disableTcpStateTracking()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableFpga()); Assertions.assertEquals("cftadeh", model.networkInterfaceConfigurations().get(0).properties().networkSecurityGroup().id()); Assertions.assertEquals("yfsoppu", model.networkInterfaceConfigurations().get(0).properties().dnsSettings().dnsServers().get(0)); Assertions.assertEquals("dnvowg", model.networkInterfaceConfigurations().get(0).properties().ipConfigurations().get(0).name()); - Assertions.assertEquals(true, model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); + Assertions.assertTrue(model.networkInterfaceConfigurations().get(0).properties().enableIPForwarding()); Assertions.assertEquals(DeleteOptions.DELETE, model.networkInterfaceConfigurations().get(0).properties().deleteOption()); Assertions.assertEquals(NetworkInterfaceAuxiliaryMode.FLOATING, diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetOSDiskTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetOSDiskTests.java index 7171ab7644de..3301fbd1e2df 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetOSDiskTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetOSDiskTests.java @@ -30,7 +30,7 @@ public void testDeserialize() throws Exception { .toObject(VirtualMachineScaleSetOSDisk.class); Assertions.assertEquals("bowsk", model.name()); Assertions.assertEquals(CachingTypes.READ_WRITE, model.caching()); - Assertions.assertEquals(true, model.writeAcceleratorEnabled()); + Assertions.assertTrue(model.writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.COPY, model.createOption()); Assertions.assertEquals(DiffDiskOptions.LOCAL, model.diffDiskSettings().option()); Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.diffDiskSettings().placement()); @@ -69,7 +69,7 @@ public void testSerialize() throws Exception { model = BinaryData.fromObject(model).toObject(VirtualMachineScaleSetOSDisk.class); Assertions.assertEquals("bowsk", model.name()); Assertions.assertEquals(CachingTypes.READ_WRITE, model.caching()); - Assertions.assertEquals(true, model.writeAcceleratorEnabled()); + Assertions.assertTrue(model.writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.COPY, model.createOption()); Assertions.assertEquals(DiffDiskOptions.LOCAL, model.diffDiskSettings().option()); Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.diffDiskSettings().placement()); diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetStorageProfileTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetStorageProfileTests.java index 8a94b80c1383..fd53a7d3506c 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetStorageProfileTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/VirtualMachineScaleSetStorageProfileTests.java @@ -41,7 +41,7 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("bnbdxkqpxokajion", model.imageReference().communityGalleryImageId()); Assertions.assertEquals("ex", model.osDisk().name()); Assertions.assertEquals(CachingTypes.READ_ONLY, model.osDisk().caching()); - Assertions.assertEquals(false, model.osDisk().writeAcceleratorEnabled()); + Assertions.assertFalse(model.osDisk().writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.COPY, model.osDisk().createOption()); Assertions.assertEquals(DiffDiskOptions.LOCAL, model.osDisk().diffDiskSettings().option()); Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.osDisk().diffDiskSettings().placement()); @@ -59,7 +59,7 @@ public void testDeserialize() throws Exception { Assertions.assertEquals("eic", model.dataDisks().get(0).name()); Assertions.assertEquals(1638817627, model.dataDisks().get(0).lun()); Assertions.assertEquals(CachingTypes.READ_WRITE, model.dataDisks().get(0).caching()); - Assertions.assertEquals(false, model.dataDisks().get(0).writeAcceleratorEnabled()); + Assertions.assertFalse(model.dataDisks().get(0).writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.RESTORE, model.dataDisks().get(0).createOption()); Assertions.assertEquals(2122151049, model.dataDisks().get(0).diskSizeGB()); Assertions.assertEquals(StorageAccountTypes.STANDARD_SSD_LRS, @@ -128,7 +128,7 @@ public void testSerialize() throws Exception { Assertions.assertEquals("bnbdxkqpxokajion", model.imageReference().communityGalleryImageId()); Assertions.assertEquals("ex", model.osDisk().name()); Assertions.assertEquals(CachingTypes.READ_ONLY, model.osDisk().caching()); - Assertions.assertEquals(false, model.osDisk().writeAcceleratorEnabled()); + Assertions.assertFalse(model.osDisk().writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.COPY, model.osDisk().createOption()); Assertions.assertEquals(DiffDiskOptions.LOCAL, model.osDisk().diffDiskSettings().option()); Assertions.assertEquals(DiffDiskPlacement.NVME_DISK, model.osDisk().diffDiskSettings().placement()); @@ -146,7 +146,7 @@ public void testSerialize() throws Exception { Assertions.assertEquals("eic", model.dataDisks().get(0).name()); Assertions.assertEquals(1638817627, model.dataDisks().get(0).lun()); Assertions.assertEquals(CachingTypes.READ_WRITE, model.dataDisks().get(0).caching()); - Assertions.assertEquals(false, model.dataDisks().get(0).writeAcceleratorEnabled()); + Assertions.assertFalse(model.dataDisks().get(0).writeAcceleratorEnabled()); Assertions.assertEquals(DiskCreateOptionTypes.RESTORE, model.dataDisks().get(0).createOption()); Assertions.assertEquals(2122151049, model.dataDisks().get(0).diskSizeGB()); Assertions.assertEquals(StorageAccountTypes.STANDARD_SSD_LRS, diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsConfigurationTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsConfigurationTests.java index ad515ffb6352..7edb6ca267c2 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsConfigurationTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsConfigurationTests.java @@ -27,8 +27,8 @@ public void testDeserialize() throws Exception { WindowsConfiguration model = BinaryData.fromString( "{\"provisionVMAgent\":false,\"enableAutomaticUpdates\":false,\"timeZone\":\"vqwhbmdgbbjfd\",\"additionalUnattendContent\":[{\"passName\":\"OobeSystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"bhtqqrolfpfpsa\"},{\"passName\":\"OobeSystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"AutoLogon\",\"content\":\"jyj\"},{\"passName\":\"OobeSystem\",\"componentName\":\"Microsoft-Windows-Shell-Setup\",\"settingName\":\"FirstLogonCommands\",\"content\":\"rtxilner\"}],\"patchSettings\":{\"patchMode\":\"Manual\",\"enableHotpatching\":true,\"assessmentMode\":\"ImageDefault\",\"automaticByPlatformSettings\":{\"rebootSetting\":\"Always\",\"bypassPlatformSafetyChecksOnUserSchedule\":true}},\"winRM\":{\"listeners\":[{\"protocol\":\"Http\",\"certificateUrl\":\"wjkcp\"},{\"protocol\":\"Https\",\"certificateUrl\":\"b\"},{\"protocol\":\"Https\",\"certificateUrl\":\"tbvpysszdnru\"},{\"protocol\":\"Https\",\"certificateUrl\":\"hmuouqfprwzwbn\"}]},\"enableVMAgentPlatformUpdates\":true}") .toObject(WindowsConfiguration.class); - Assertions.assertEquals(false, model.provisionVMAgent()); - Assertions.assertEquals(false, model.enableAutomaticUpdates()); + Assertions.assertFalse(model.provisionVMAgent()); + Assertions.assertFalse(model.enableAutomaticUpdates()); Assertions.assertEquals("vqwhbmdgbbjfd", model.timeZone()); Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, model.additionalUnattendContent().get(0).passName()); @@ -38,15 +38,15 @@ public void testDeserialize() throws Exception { model.additionalUnattendContent().get(0).settingName()); Assertions.assertEquals("bhtqqrolfpfpsa", model.additionalUnattendContent().get(0).content()); Assertions.assertEquals(WindowsVMGuestPatchMode.MANUAL, model.patchSettings().patchMode()); - Assertions.assertEquals(true, model.patchSettings().enableHotpatching()); + Assertions.assertTrue(model.patchSettings().enableHotpatching()); Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.patchSettings().assessmentMode()); Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, model.patchSettings().automaticByPlatformSettings().rebootSetting()); - Assertions.assertEquals(true, - model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions + .assertTrue(model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); Assertions.assertEquals(ProtocolTypes.HTTP, model.winRM().listeners().get(0).protocol()); Assertions.assertEquals("wjkcp", model.winRM().listeners().get(0).certificateUrl()); - Assertions.assertEquals(true, model.enableVMAgentPlatformUpdates()); + Assertions.assertTrue(model.enableVMAgentPlatformUpdates()); } @org.junit.jupiter.api.Test @@ -80,8 +80,8 @@ public void testSerialize() throws Exception { new WinRMListener().withProtocol(ProtocolTypes.HTTPS).withCertificateUrl("hmuouqfprwzwbn")))) .withEnableVMAgentPlatformUpdates(true); model = BinaryData.fromObject(model).toObject(WindowsConfiguration.class); - Assertions.assertEquals(false, model.provisionVMAgent()); - Assertions.assertEquals(false, model.enableAutomaticUpdates()); + Assertions.assertFalse(model.provisionVMAgent()); + Assertions.assertFalse(model.enableAutomaticUpdates()); Assertions.assertEquals("vqwhbmdgbbjfd", model.timeZone()); Assertions.assertEquals(AdditionalUnattendContentPassName.OOBE_SYSTEM, model.additionalUnattendContent().get(0).passName()); @@ -91,14 +91,14 @@ public void testSerialize() throws Exception { model.additionalUnattendContent().get(0).settingName()); Assertions.assertEquals("bhtqqrolfpfpsa", model.additionalUnattendContent().get(0).content()); Assertions.assertEquals(WindowsVMGuestPatchMode.MANUAL, model.patchSettings().patchMode()); - Assertions.assertEquals(true, model.patchSettings().enableHotpatching()); + Assertions.assertTrue(model.patchSettings().enableHotpatching()); Assertions.assertEquals(WindowsPatchAssessmentMode.IMAGE_DEFAULT, model.patchSettings().assessmentMode()); Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.ALWAYS, model.patchSettings().automaticByPlatformSettings().rebootSetting()); - Assertions.assertEquals(true, - model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); + Assertions + .assertTrue(model.patchSettings().automaticByPlatformSettings().bypassPlatformSafetyChecksOnUserSchedule()); Assertions.assertEquals(ProtocolTypes.HTTP, model.winRM().listeners().get(0).protocol()); Assertions.assertEquals("wjkcp", model.winRM().listeners().get(0).certificateUrl()); - Assertions.assertEquals(true, model.enableVMAgentPlatformUpdates()); + Assertions.assertTrue(model.enableVMAgentPlatformUpdates()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java index 0ad28b092dbd..199ecd9f5d9a 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java +++ b/sdk/computefleet/azure-resourcemanager-computefleet/src/test/java/com/azure/resourcemanager/computefleet/generated/WindowsVMGuestPatchAutomaticByPlatformSettingsTests.java @@ -16,7 +16,7 @@ public void testDeserialize() throws Exception { = BinaryData.fromString("{\"rebootSetting\":\"Never\",\"bypassPlatformSafetyChecksOnUserSchedule\":false}") .toObject(WindowsVMGuestPatchAutomaticByPlatformSettings.class); Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER, model.rebootSetting()); - Assertions.assertEquals(false, model.bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); } @org.junit.jupiter.api.Test @@ -26,6 +26,6 @@ public void testSerialize() throws Exception { .withBypassPlatformSafetyChecksOnUserSchedule(false); model = BinaryData.fromObject(model).toObject(WindowsVMGuestPatchAutomaticByPlatformSettings.class); Assertions.assertEquals(WindowsVMGuestPatchAutomaticByPlatformRebootSetting.NEVER, model.rebootSetting()); - Assertions.assertEquals(false, model.bypassPlatformSafetyChecksOnUserSchedule()); + Assertions.assertFalse(model.bypassPlatformSafetyChecksOnUserSchedule()); } } diff --git a/sdk/computefleet/azure-resourcemanager-computefleet/tsp-location.yaml b/sdk/computefleet/azure-resourcemanager-computefleet/tsp-location.yaml index 085e0b510664..b735b8de48e9 100644 --- a/sdk/computefleet/azure-resourcemanager-computefleet/tsp-location.yaml +++ b/sdk/computefleet/azure-resourcemanager-computefleet/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/azurefleet/AzureFleet.Management -commit: 6f175c9c006269a1d0f1928fbc768cacc6ac379a +commit: 8588c88c49b079c9a76300ee36d9f7e5a4384562 repo: Azure/azure-rest-api-specs additionalDirectories: